New version helper breaks Monica update script #1564

Closed
opened 2026-02-05 01:34:05 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @BennyExtreme on GitHub (Aug 31, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Monica

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/monica.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📈 Which Proxmox version are you on?

pve-manager/8.4.12/c2ea8261d32a5020 (running kernel: 6.8.12-13-pve)

📝 Provide a clear and concise description of the issue.

When running the command in the LXC Console, the expected behavior is that it should check for updates and, if none are found, do nothing.

Instead, the script just continues executing and moves the folder /opt/monica to /opt/monica-backup, which makes both the Monica installation and the update script unusable until the folder is manually moved back.

🔄 Steps to reproduce the issue.

Step 1: create a new Proxmox VE Monica LXC by running the command
Step 2: enter the LXC Console and run the command to check for updates

Paste the full error output (if available).

First run

    __  ___            _           
   /  |/  /___  ____  (_)________ _
  / /|_/ / __ \/ __ \/ / ___/ __ `/
 / /  / / /_/ / / / / / /__/ /_/ / 
/_/  /_/\____/_/ /_/_/\___/\__,_/  
                                   

  ✔️   Stopped Service
  ✔️   Backup created
  ✔️   monica is already up-to-date (v4.1.2)
  ⏳   Configuring monicaenvironment: line 42: cd: /opt/monica/: No such file or directory

[ERROR] in line 42: exit code 0: while executing command cd /opt/monica/

Further runs just fails because the folder is not there anymore

    __  ___            _           
   /  |/  /___  ____  (_)________ _
  / /|_/ / __ \/ __ \/ / ___/ __ `/
 / /  / / /_/ / / / / / /__/ /_/ / 
/_/  /_/\____/_/ /_/_/\___/\__,_/  
                                   

   ✖️   No Monica Installation Found!

🖼️ Additional context (optional).

No response

Originally created by @BennyExtreme on GitHub (Aug 31, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Monica ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/monica.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📈 Which Proxmox version are you on? pve-manager/8.4.12/c2ea8261d32a5020 (running kernel: 6.8.12-13-pve) ### 📝 Provide a clear and concise description of the issue. When running the command in the LXC Console, the expected behavior is that it should check for updates and, if none are found, do nothing. Instead, the script just continues executing and moves the folder `/opt/monica` to `/opt/monica-backup`, which makes both the Monica installation and the update script unusable until the folder is manually moved back. ### 🔄 Steps to reproduce the issue. Step 1: create a new Proxmox VE Monica LXC by running the command Step 2: enter the LXC Console and run the command to check for updates ### ❌ Paste the full error output (if available). First run ``` __ ___ _ / |/ /___ ____ (_)________ _ / /|_/ / __ \/ __ \/ / ___/ __ `/ / / / / /_/ / / / / / /__/ /_/ / /_/ /_/\____/_/ /_/_/\___/\__,_/ ✔️ Stopped Service ✔️ Backup created ✔️ monica is already up-to-date (v4.1.2) ⏳ Configuring monicaenvironment: line 42: cd: /opt/monica/: No such file or directory [ERROR] in line 42: exit code 0: while executing command cd /opt/monica/ ``` Further runs just fails because the folder is not there anymore ``` __ ___ _ / |/ /___ ____ (_)________ _ / /|_/ / __ \/ __ \/ / ___/ __ `/ / / / / /_/ / / / / / /__/ /_/ / /_/ /_/\____/_/ /_/_/\___/\__,_/ ✖️ No Monica Installation Found! ``` ### 🖼️ Additional context (optional). _No response_
OVERLORD added the questionbug labels 2026-02-05 01:34:05 +03:00
Author
Owner

@MickLesk commented on GitHub (Sep 1, 2025):

Working fine here 🤔
Whats the Output if you do: cat ~/.monica before and after Update

@MickLesk commented on GitHub (Sep 1, 2025): Working fine here 🤔 Whats the Output if you do: cat ~/.monica before and after Update
Author
Owner

@BennyExtreme commented on GitHub (Sep 1, 2025):

Always 4.1.2

@BennyExtreme commented on GitHub (Sep 1, 2025): Always `4.1.2`
Author
Owner

@MickLesk commented on GitHub (Sep 1, 2025):

What surprises me is that you don't get any output from the function, normally there is an output.

@MickLesk commented on GitHub (Sep 1, 2025): What surprises me is that you don't get any output from the function, normally there is an output.
Author
Owner

@BennyExtreme commented on GitHub (Sep 1, 2025):

Ok, i downloaded the monica.sh script and added a little bit of debug myself.
Apparently the function check_for_gh_release returns 0 because it says that a new version has been found
⏳ New release available: v5.0.0-beta.5 (current: v4.1.2)
then the console gets cleared and the function fetch_and_deploy_gh_release fails because it says that the version is already up to date
✔️ monica is already up-to-date (v4.1.2)

@BennyExtreme commented on GitHub (Sep 1, 2025): Ok, i downloaded the monica.sh script and added a little bit of debug myself. Apparently the function `check_for_gh_release` returns 0 because it says that a new version has been found `⏳ New release available: v5.0.0-beta.5 (current: v4.1.2)` then the console gets cleared and the function `fetch_and_deploy_gh_release` fails because it says that the version is already up to date `✔️ monica is already up-to-date (v4.1.2)`
Author
Owner

@BennyExtreme commented on GitHub (Sep 1, 2025):

988bd3ef19/misc/tools.func (L1942)

v5.0.0-beta.5 its a pre-release tho 😅

@BennyExtreme commented on GitHub (Sep 1, 2025): https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L1942 [v5.0.0-beta.5](https://github.com/monicahq/monica/releases/tag/v5.0.0-beta.5) its a pre-release tho 😅
Author
Owner

@MickLesk commented on GitHub (Sep 1, 2025):

Hm Strange, it recognize at my Dev build the 4.1.2. i investigate tomorrow

@MickLesk commented on GitHub (Sep 1, 2025): Hm Strange, it recognize at my Dev build the 4.1.2. i investigate tomorrow
Author
Owner

@BennyExtreme commented on GitHub (Sep 1, 2025):

Hm Strange, it recognize at my Dev build the 4.1.2. i investigate tomorrow

I mean it doesn't make any sense, the script just makes the GET request to Github API (https://api.github.com/repos/monicahq/monica/releases) to get the releases (and you can clearly see yourself that the response contains drafts and prereleases as well)
988bd3ef19/misc/tools.func (L1969)
and then just takes the first one as the latest
988bd3ef19/misc/tools.func (L1984)
and then you compare it with the current one
988bd3ef19/misc/tools.func (L2037)

While in the fetch_and_deploy_gh_release function you actually check using the /latest endpoint (https://api.github.com/repos/monicahq/monica/releases/latest) that automatically excludes drafts and pre-releases from the response (because as per documentation "Drafts and prereleases cannot be set as latest")
988bd3ef19/misc/tools.func (L813)

@BennyExtreme commented on GitHub (Sep 1, 2025): > Hm Strange, it recognize at my Dev build the 4.1.2. i investigate tomorrow I mean it doesn't make any sense, the script just makes the GET request to Github API (https://api.github.com/repos/monicahq/monica/releases) to get the releases (and you can clearly see yourself that the response contains drafts and prereleases as well) https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L1969 and then just takes the first one as the latest https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L1984 and then you compare it with the current one https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L2037 While in the `fetch_and_deploy_gh_release` function you actually check using the `/latest` endpoint (https://api.github.com/repos/monicahq/monica/releases/latest) that automatically excludes drafts and pre-releases from the response (because as per [documentation](https://docs.github.com/en/rest/releases/releases) "Drafts and prereleases cannot be set as latest") https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L813
Author
Owner

@BennyExtreme commented on GitHub (Sep 1, 2025):

If skipping drafts and prereleases was the intended behaviour then there should be at least a check here (to maintain all the other code like it is) or something else
988bd3ef19/misc/tools.func (L1974)
to

jq -r '.[] | select(.prerelease == false and .draft == false) | .tag_name' | sed 's/^v//'
@BennyExtreme commented on GitHub (Sep 1, 2025): If skipping drafts and prereleases was the intended behaviour then there should be at least a check here (to maintain all the other code like it is) or something else https://github.com/community-scripts/ProxmoxVE/blob/988bd3ef193e10c6593e6262045bf76038ce60fb/misc/tools.func#L1974 to ```bash jq -r '.[] | select(.prerelease == false and .draft == false) | .tag_name' | sed 's/^v//' ```
Author
Owner

@MickLesk commented on GitHub (Sep 1, 2025):

right, my local install has another version. i have push it now

@MickLesk commented on GitHub (Sep 1, 2025): right, my local install has another version. i have push it now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1564