Actualbudget Update from 25.1.0 to 25.2.1 #525

Closed
opened 2026-02-04 19:32:41 +03:00 by OVERLORD · 17 comments
Owner

Originally created by @albanqafa on GitHub (Feb 19, 2025).

Have you read and understood the above guidelines?

yes

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

Actualbudget

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

"update"

📝 Provide a clear and concise description of the issue.

the "update" command on an Actualbudget version 25.1.0 LXC container fails

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

run the "update" command in an Actualbudget 25.1.0 LXC container (its possible this may only affect containers built with the original helper scripts)

Paste the full error output (if available).

⠦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory

🖼️ Additional context (optional).

Apologies in advance for the long post here

I had an issue attempting to run the "update" command in my Actualbudget 25.1.0 LXC container

my container was created with the original helper scripts, i ran a command to switch it over to the new repo's scripts a while back (i did that with multiple other containers when the switch first happened with no issues)

during the attempted update i got an error that cancelled the update and put my actualbudget instance into a broken state:
⠦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory

i have backups and can always restore to a working version on 25.1.0

per the hover text on the green "updateable" badge at the following page (https://community-scripts.github.io/ProxmoxVE/scripts?id=actualbudget)

Image

i ran the install script on my proxmox host thinking it would forcibly update my actualbudget LXC container, but instead it created a new one (thus the hover text is not accurate)

anyways, now that ive got a fresh container to compare with i noticed the contents of my "prod" instances /opt/ directory looks like this:
/opt/actualbudget/

while the new containers /opt/ directory looks like this:
/opt/actualbudget/
/opt/actualbudget-data/
/opt/actualbudget_version.txt

i have backups of my actualbudget container going back to 9-22-2024, ive checked the backup from that date and my container still had the same /opt/ file structure back then as well

additionally, the /opt/actualbudget/.env file also does not exist in any of my backups

the oldest backup from 9-22-2024 is running Actualbudget 24.9.0 and when connecting to its console its greeter says:
"Actual Budget LXC provided by https://helper-scripts.com/"

so, this container had been switched to the new repo before that point

being that im running version 25.1.0 and backups as far back as 9-22-2024 have the same /opt/ structure and missing .env file im assuming (with very high confidence) i updated this container via the "update" command to version 25.1.0 successfully without issue since then, and it appears those differences only now break the update process and did not previously

anyways, in my attempt to fix my problems myself i went ahead and created the missing folder (/opt/actualbudget-data/), an appropriate version text file (/opt/actualbudget_version.txt) with my actual version, as well as created a /opt/actualbudget/.env file with the following contents (as per the file from the latest container):
ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files
ACTUAL_DATA_DIR=/opt/actualbudget-data
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget/server-files
PORT=5006

after making those changes i ran the "update" command and it completed successfully

now that my actualbudget instance has been updated to the latest version 25.2.1 with the help of your script (and some manual intervention) - when i use the "sync" button on my account within Actualbudget i get an error:
"We had problems syncing your changes. Please report this as a bug by opening a GitHub issue."

journalctl output shows an error:
Feb 19 05:30:51 actualbudget yarn[307]: Rejection: TypeError: Cannot open database because the directory does not exist

in my /opt/actualbudget/ directory i have a folder "server-files" that contains "account.sqlite"

in the new container it appears the same file exists at /opt/actualbudget-data/server-files/account.sqlite

in my prod container, if i copy that file from /opt/actualbudget/server-files/account.sqlite to /opt/actualbudget-data/server-files/account.sqlite i still get the same error within actualbudget as well as journalctl, permissions on both files are the same:

root@actualbudget:~# ls -al /opt/actualbudget-data/server-files/
total 68
drwxr-xr-x 2 root root  4096 Feb 19 06:09 .
drwxr-xr-x 3 root root  4096 Feb 19 06:09 ..
-rw-r--r-- 1 root root 61440 Feb 19 06:09 account.sqlite
root@actualbudget:~# ls -al /opt/actualbudget/server-files/
total 68
drwxr-xr-x  2 root root  4096 Dec 20 05:41 .
drwxrwxr-x 10 root root  4096 Feb 19 04:47 ..
-rw-r--r--  1 root root 61440 Dec 20 05:41 account.sqlite

direct questions:

  • was there a change made to the sqlite db's location?

  • are there multiple locations the db could reside at that are not being taken account for by the update script?

  • is there proper validation happening to ensure that /opt/actualbudget/.env exists and has the right contents since its required to update?

  • with the manual changes i made to successfully update, what could still be missing that is preventing Actualbudget from functioning properly at version 25.2.1?

thank you in advance

Originally created by @albanqafa on GitHub (Feb 19, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Actualbudget ### 📂 What was the exact command used to execute the script? "update" ### 📝 Provide a clear and concise description of the issue. the "update" command on an Actualbudget version 25.1.0 LXC container fails ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. run the "update" command in an Actualbudget 25.1.0 LXC container (its possible this may only affect containers built with the original helper scripts) ### ❌ Paste the full error output (if available). ⠦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory ### 🖼️ Additional context (optional). Apologies in advance for the long post here I had an issue attempting to run the "update" command in my Actualbudget 25.1.0 LXC container my container was created with the original helper scripts, i ran a command to switch it over to the new repo's scripts a while back (i did that with multiple other containers when the switch first happened with no issues) during the attempted update i got an error that cancelled the update and put my actualbudget instance into a broken state: ⠦mv: cannot stat '/opt/actualbudget_bak/.env': No such file or directory i have backups and can always restore to a working version on 25.1.0 per the hover text on the green "updateable" badge at the following page (https://community-scripts.github.io/ProxmoxVE/scripts?id=actualbudget) ![Image](https://github.com/user-attachments/assets/bbfda8cd-1193-4771-843e-075635309cf9) i ran the install script on my proxmox host thinking it would forcibly update my actualbudget LXC container, but instead it created a new one (thus the hover text is not accurate) anyways, now that ive got a fresh container to compare with i noticed the contents of my "prod" instances /opt/ directory looks like this: /opt/actualbudget/ while the new containers /opt/ directory looks like this: /opt/actualbudget/ /opt/actualbudget-data/ /opt/actualbudget_version.txt i have backups of my actualbudget container going back to 9-22-2024, ive checked the backup from that date and my container still had the same /opt/ file structure back then as well additionally, the /opt/actualbudget/.env file also does not exist in any of my backups the oldest backup from 9-22-2024 is running Actualbudget 24.9.0 and when connecting to its console its greeter says: "Actual Budget LXC provided by https://helper-scripts.com/" so, this container had been switched to the new repo before that point being that im running version 25.1.0 and backups as far back as 9-22-2024 have the same /opt/ structure and missing .env file im assuming (with very high confidence) i updated this container via the "update" command to version 25.1.0 successfully without issue since then, and it appears those differences only now break the update process and did not previously anyways, in my attempt to fix my problems myself i went ahead and created the missing folder (/opt/actualbudget-data/), an appropriate version text file (/opt/actualbudget_version.txt) *with my actual version*, as well as created a /opt/actualbudget/.env file with the following contents (as per the file from the latest container): ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files ACTUAL_DATA_DIR=/opt/actualbudget-data ACTUAL_SERVER_FILES_DIR=/opt/actualbudget/server-files PORT=5006 after making those changes i ran the "update" command and it completed successfully now that my actualbudget instance has been updated to the latest version 25.2.1 with the help of your script (and some manual intervention) - when i use the "sync" button on my account within Actualbudget i get an error: "We had problems syncing your changes. Please report this as a bug by opening a GitHub issue." journalctl output shows an error: Feb 19 05:30:51 actualbudget yarn[307]: Rejection: TypeError: Cannot open database because the directory does not exist in my /opt/actualbudget/ directory i have a folder "server-files" that contains "account.sqlite" in the new container it appears the same file exists at /opt/actualbudget-data/server-files/account.sqlite in my prod container, if i copy that file from /opt/actualbudget/server-files/account.sqlite to /opt/actualbudget-data/server-files/account.sqlite i still get the same error within actualbudget as well as journalctl, permissions on both files are the same: ``` root@actualbudget:~# ls -al /opt/actualbudget-data/server-files/ total 68 drwxr-xr-x 2 root root 4096 Feb 19 06:09 . drwxr-xr-x 3 root root 4096 Feb 19 06:09 .. -rw-r--r-- 1 root root 61440 Feb 19 06:09 account.sqlite root@actualbudget:~# ls -al /opt/actualbudget/server-files/ total 68 drwxr-xr-x 2 root root 4096 Dec 20 05:41 . drwxrwxr-x 10 root root 4096 Feb 19 04:47 .. -rw-r--r-- 1 root root 61440 Dec 20 05:41 account.sqlite ``` direct questions: - was there a change made to the sqlite db's location? - are there multiple locations the db could reside at that are not being taken account for by the update script? - is there proper validation happening to ensure that /opt/actualbudget/.env exists and has the right contents since its required to update? - with the manual changes i made to successfully update, what could still be missing that is preventing Actualbudget from functioning properly at version 25.2.1? thank you in advance
OVERLORD added the bug label 2026-02-04 19:32:41 +03:00
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

after looking over this i realize when i said:

the oldest backup from 9-22-2024 is running Actualbudget 24.9.0 and when connecting to its console its greeter says:
"Actual Budget LXC provided by https://helper-scripts.com/"

that might not mean the container was switched to the new repo at that time

im not sure when i did that exactly, but for reference here are the backups i have available to test with/reference (they were pretty much all taken right before performing the "update" command within the LXC container)

Image

@albanqafa commented on GitHub (Feb 19, 2025): after looking over this i realize when i said: > the oldest backup from 9-22-2024 is running Actualbudget 24.9.0 and when connecting to its console its greeter says: > "Actual Budget LXC provided by https://helper-scripts.com/" that might not mean the container was switched to the new repo at that time im not sure when i did that exactly, but for reference here are the backups i have available to test with/reference (they were pretty much all taken right before performing the "update" command within the LXC container) ![Image](https://github.com/user-attachments/assets/7ff983be-0317-416f-b25b-ed4a9576ae1a)
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

there was an big update to 25.1 because the project changed something (like an new .env) and so on.
Ive build an initial fix, if .env file is missing.

But i fight with this script. Every Update is something broken

@MickLesk commented on GitHub (Feb 19, 2025): there was an big update to 25.1 because the project changed something (like an new .env) and so on. Ive build an initial fix, if .env file is missing. But i fight with this script. Every Update is something broken
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

thank you, i appreciate your response and for making changes that quickly

it appears there are still issues when attempting to update my instance from 25.1.0 to 25.2.1

  ✔️  Actual Budget Stopped
 ⠇mv: cannot move '/opt/actualbudget_bak/server-files/account.sqlite' to '/opt/actualbudget/server-files/': Not a directory
 ⠏
[ERROR] in line 63: exit code 0: while executing command mv /opt/actualbudget_bak/server-files/* /opt/actualbudget/server-files/

root@actualbudget:~# ls /opt/
actualbudget  actualbudget_bak  actualbudget-data
root@actualbudget:~# ls /opt/actualbudget/
app.js             docker              Dockerfile        jest.global-setup.js     LICENSE.txt  package.json  src            upcoming-release-notes
babel.config.json  docker-compose.yml  jest.config.json  jest.global-teardown.js  migrations   README.md     tsconfig.json  yarn.lock
root@actualbudget:~# 
@albanqafa commented on GitHub (Feb 19, 2025): thank you, i appreciate your response and for making changes that quickly it appears there are still issues when attempting to update my instance from 25.1.0 to 25.2.1 ``` ✔️ Actual Budget Stopped ⠇mv: cannot move '/opt/actualbudget_bak/server-files/account.sqlite' to '/opt/actualbudget/server-files/': Not a directory ⠏ [ERROR] in line 63: exit code 0: while executing command mv /opt/actualbudget_bak/server-files/* /opt/actualbudget/server-files/ root@actualbudget:~# ls /opt/ actualbudget actualbudget_bak actualbudget-data root@actualbudget:~# ls /opt/actualbudget/ app.js docker Dockerfile jest.global-setup.js LICENSE.txt package.json src upcoming-release-notes babel.config.json docker-compose.yml jest.config.json jest.global-teardown.js migrations README.md tsconfig.json yarn.lock root@actualbudget:~# ```
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

what for files are available before update ?

@MickLesk commented on GitHub (Feb 19, 2025): what for files are available before update ?
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

before running the update my file structure looks like this:

root@actualbudget:~# ls /opt
actualbudget
root@actualbudget:~# ls -al /opt/actualbudget/
total 376
drwxr-xr-x  12 root root   4096 Jan  7 22:21 .
drwxr-xr-x   3 root root   4096 Sep 22 09:28 ..
-rw-r--r--   1 root root    363 Nov 12 08:41 app.js
-rw-r--r--   1 root root     46 Sep 22 09:28 babel.config.json
drwxr-xr-x   2 root root   4096 Jan  7 22:21 docker
-rw-r--r--   1 root root   1155 Sep 22 09:28 docker-compose.yml
-rw-r--r--   1 root root    789 Nov 12 08:41 Dockerfile
-rw-r--r--   1 root root    134 Sep 22 09:28 .dockerignore
-rw-r--r--   1 root root    175 Sep 22 09:28 .editorconfig
-rw-r--r--   1 root root     57 Sep 22 09:28 .eslintignore
-rw-r--r--   1 root root    438 Sep 22 09:28 .eslintrc.cjs
drwxr-xr-x   8 root root   4096 Jan  7 22:21 .git
drwxr-xr-x   4 root root   4096 Sep 22 09:28 .github
-rw-r--r--   1 root root    340 Sep 22 09:28 .gitignore
-rw-r--r--   1 root root    535 Sep 22 09:28 jest.config.json
-rw-r--r--   1 root root   2883 Dec 16 18:14 jest.global-setup.js
-rw-r--r--   1 root root    126 Sep 22 09:28 jest.global-teardown.js
-rw-r--r--   1 root root   1045 Sep 22 09:28 LICENSE.txt
-rw-r--r--   1 root root    647 Dec 16 18:14 .migrate
drwxr-xr-x   2 root root   4096 Dec 16 18:14 migrations
drwxr-xr-x 485 root root  20480 Dec 16 18:14 node_modules
-rw-r--r--   1 root root      8 Sep 22 09:28 .node-version
-rw-r--r--   1 root root   2269 Jan  7 22:21 package.json
-rw-r--r--   1 root root     52 Sep 22 09:28 .prettierrc.json
-rw-r--r--   1 root root   1528 Sep 22 09:28 README.md
drwxr-xr-x   2 root root   4096 Dec 20 05:41 server-files
drwxr-xr-x  10 root root   4096 Dec 25 00:59 src
-rw-r--r--   1 root root    605 Dec 16 18:14 tsconfig.json
drwxr-xr-x   2 root root   4096 Jan  7 22:21 upcoming-release-notes
drwxr-xr-x   2 root root   4096 Feb 19 04:25 user-files
drwxr-xr-x   3 root root   4096 Sep 22 09:29 .yarn
-rw-r--r--   1 root root 234183 Jan  7 22:21 yarn.lock
-rw-r--r--   1 root root     66 Sep 22 09:28 .yarnrc.yml
root@actualbudget:~# 
@albanqafa commented on GitHub (Feb 19, 2025): before running the update my file structure looks like this: ``` root@actualbudget:~# ls /opt actualbudget root@actualbudget:~# ls -al /opt/actualbudget/ total 376 drwxr-xr-x 12 root root 4096 Jan 7 22:21 . drwxr-xr-x 3 root root 4096 Sep 22 09:28 .. -rw-r--r-- 1 root root 363 Nov 12 08:41 app.js -rw-r--r-- 1 root root 46 Sep 22 09:28 babel.config.json drwxr-xr-x 2 root root 4096 Jan 7 22:21 docker -rw-r--r-- 1 root root 1155 Sep 22 09:28 docker-compose.yml -rw-r--r-- 1 root root 789 Nov 12 08:41 Dockerfile -rw-r--r-- 1 root root 134 Sep 22 09:28 .dockerignore -rw-r--r-- 1 root root 175 Sep 22 09:28 .editorconfig -rw-r--r-- 1 root root 57 Sep 22 09:28 .eslintignore -rw-r--r-- 1 root root 438 Sep 22 09:28 .eslintrc.cjs drwxr-xr-x 8 root root 4096 Jan 7 22:21 .git drwxr-xr-x 4 root root 4096 Sep 22 09:28 .github -rw-r--r-- 1 root root 340 Sep 22 09:28 .gitignore -rw-r--r-- 1 root root 535 Sep 22 09:28 jest.config.json -rw-r--r-- 1 root root 2883 Dec 16 18:14 jest.global-setup.js -rw-r--r-- 1 root root 126 Sep 22 09:28 jest.global-teardown.js -rw-r--r-- 1 root root 1045 Sep 22 09:28 LICENSE.txt -rw-r--r-- 1 root root 647 Dec 16 18:14 .migrate drwxr-xr-x 2 root root 4096 Dec 16 18:14 migrations drwxr-xr-x 485 root root 20480 Dec 16 18:14 node_modules -rw-r--r-- 1 root root 8 Sep 22 09:28 .node-version -rw-r--r-- 1 root root 2269 Jan 7 22:21 package.json -rw-r--r-- 1 root root 52 Sep 22 09:28 .prettierrc.json -rw-r--r-- 1 root root 1528 Sep 22 09:28 README.md drwxr-xr-x 2 root root 4096 Dec 20 05:41 server-files drwxr-xr-x 10 root root 4096 Dec 25 00:59 src -rw-r--r-- 1 root root 605 Dec 16 18:14 tsconfig.json drwxr-xr-x 2 root root 4096 Jan 7 22:21 upcoming-release-notes drwxr-xr-x 2 root root 4096 Feb 19 04:25 user-files drwxr-xr-x 3 root root 4096 Sep 22 09:29 .yarn -rw-r--r-- 1 root root 234183 Jan 7 22:21 yarn.lock -rw-r--r-- 1 root root 66 Sep 22 09:28 .yarnrc.yml root@actualbudget:~# ```
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

i rebuild the script on my dev repo. You can test it in 30min. I bring an more stable version, annoying script

@MickLesk commented on GitHub (Feb 19, 2025): i rebuild the script on my dev repo. You can test it in 30min. I bring an more stable version, annoying script
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

can you test?

bash -c "$(wget -qLO - https://github.com/MickLesk/Proxmox_DEV/raw/main/ct/actualbudget.sh)"

Warning: The Port is changed for this dev to 9006

@MickLesk commented on GitHub (Feb 19, 2025): can you test? ```bash bash -c "$(wget -qLO - https://github.com/MickLesk/Proxmox_DEV/raw/main/ct/actualbudget.sh)" ``` Warning: The Port is changed for this dev to 9006
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

that script created a new container (it did not update my existing container)

the container it created also does not have autologin enabled and has no data in /opt/

Image

@albanqafa commented on GitHub (Feb 19, 2025): that script created a new container (it did not update my existing container) the container it created also does not have autologin enabled and has no data in /opt/ ![Image](https://github.com/user-attachments/assets/68f97713-905d-4223-88d8-b23a1958423c)
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

Heh? Where you execute this?

Work fine for me 🤔

@MickLesk commented on GitHub (Feb 19, 2025): Heh? Where you execute this? Work fine for me 🤔
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

ah i see, you wanted me to run this within the container

after running it within the container it appears to have updated actualbudget

but, actualbudget is no longer running after the update, i receive the following errors in journalctl

Feb 19 10:14:43 actualbudget systemd[1]: Started actualbudget.service - Actual Budget Service.
Feb 19 10:14:44 actualbudget yarn[518]: Checking if there are any migrations to run for direction "up"...
Feb 19 10:14:44 actualbudget yarn[518]: /opt/actualbudget/node_modules/better-sqlite3/lib/methods/wrappers.js:9
Feb 19 10:14:44 actualbudget yarn[518]:         this[cppdb].exec(sql);
Feb 19 10:14:44 actualbudget yarn[518]:                     ^
Feb 19 10:14:44 actualbudget yarn[518]: SqliteError: no such column: password
Feb 19 10:14:44 actualbudget yarn[518]:     at Database.exec (/opt/actualbudget/node_modules/better-sqlite3/lib/methods/wrappers.js:9:14)
Feb 19 10:14:44 actualbudget yarn[518]:     at WrappedDatabase.exec (file:///opt/actualbudget/src/db.js:30:20)
Feb 19 10:14:44 actualbudget yarn[518]:     at Migration.up (file:///opt/actualbudget/migrations/1718889148000-openid.js:4:24)
Feb 19 10:14:44 actualbudget yarn[518]:     at next (/opt/actualbudget/node_modules/migrate/lib/migrate.js:35:45)
Feb 19 10:14:44 actualbudget yarn[518]:     at migrate (/opt/actualbudget/node_modules/migrate/lib/migrate.js:76:3)
Feb 19 10:14:44 actualbudget yarn[518]:     at MigrationSet.migrate (/opt/actualbudget/node_modules/migrate/lib/set.js:123:3)
Feb 19 10:14:44 actualbudget yarn[518]:     at MigrationSet.up (/opt/actualbudget/node_modules/migrate/lib/set.js:107:8)
Feb 19 10:14:44 actualbudget yarn[518]:     at file:///opt/actualbudget/src/migrations.js:23:23
Feb 19 10:14:44 actualbudget yarn[518]:     at /opt/actualbudget/node_modules/migrate/index.js:62:5
Feb 19 10:14:44 actualbudget yarn[518]:     at /opt/actualbudget/node_modules/migrate/lib/load-migrations.js:97:7 {
Feb 19 10:14:44 actualbudget yarn[518]:   code: 'SQLITE_ERROR'
Feb 19 10:14:44 actualbudget yarn[518]: }
Feb 19 10:14:44 actualbudget yarn[518]: Node.js v20.18.1
Feb 19 10:14:44 actualbudget systemd[1]: actualbudget.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 10:14:44 actualbudget systemd[1]: actualbudget.service: Failed with result 'exit-code'.
@albanqafa commented on GitHub (Feb 19, 2025): ah i see, you wanted me to run this within the container after running it within the container it appears to have updated actualbudget but, actualbudget is no longer running after the update, i receive the following errors in journalctl ``` Feb 19 10:14:43 actualbudget systemd[1]: Started actualbudget.service - Actual Budget Service. Feb 19 10:14:44 actualbudget yarn[518]: Checking if there are any migrations to run for direction "up"... Feb 19 10:14:44 actualbudget yarn[518]: /opt/actualbudget/node_modules/better-sqlite3/lib/methods/wrappers.js:9 Feb 19 10:14:44 actualbudget yarn[518]: this[cppdb].exec(sql); Feb 19 10:14:44 actualbudget yarn[518]: ^ Feb 19 10:14:44 actualbudget yarn[518]: SqliteError: no such column: password Feb 19 10:14:44 actualbudget yarn[518]: at Database.exec (/opt/actualbudget/node_modules/better-sqlite3/lib/methods/wrappers.js:9:14) Feb 19 10:14:44 actualbudget yarn[518]: at WrappedDatabase.exec (file:///opt/actualbudget/src/db.js:30:20) Feb 19 10:14:44 actualbudget yarn[518]: at Migration.up (file:///opt/actualbudget/migrations/1718889148000-openid.js:4:24) Feb 19 10:14:44 actualbudget yarn[518]: at next (/opt/actualbudget/node_modules/migrate/lib/migrate.js:35:45) Feb 19 10:14:44 actualbudget yarn[518]: at migrate (/opt/actualbudget/node_modules/migrate/lib/migrate.js:76:3) Feb 19 10:14:44 actualbudget yarn[518]: at MigrationSet.migrate (/opt/actualbudget/node_modules/migrate/lib/set.js:123:3) Feb 19 10:14:44 actualbudget yarn[518]: at MigrationSet.up (/opt/actualbudget/node_modules/migrate/lib/set.js:107:8) Feb 19 10:14:44 actualbudget yarn[518]: at file:///opt/actualbudget/src/migrations.js:23:23 Feb 19 10:14:44 actualbudget yarn[518]: at /opt/actualbudget/node_modules/migrate/index.js:62:5 Feb 19 10:14:44 actualbudget yarn[518]: at /opt/actualbudget/node_modules/migrate/lib/load-migrations.js:97:7 { Feb 19 10:14:44 actualbudget yarn[518]: code: 'SQLITE_ERROR' Feb 19 10:14:44 actualbudget yarn[518]: } Feb 19 10:14:44 actualbudget yarn[518]: Node.js v20.18.1 Feb 19 10:14:44 actualbudget systemd[1]: actualbudget.service: Main process exited, code=exited, status=1/FAILURE Feb 19 10:14:44 actualbudget systemd[1]: actualbudget.service: Failed with result 'exit-code'. ```
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

alright. strange. They have changed to much in database and filebase..

ls -l /opt/actualbudget-data/server-files/
is there an sqlite file?

cd /opt/actualbudget
yarn migrate down
yarn migrate up

or is the sqlite file here:
ls -l /opt/actualbudget/server-files/

@MickLesk commented on GitHub (Feb 19, 2025): alright. strange. They have changed to much in database and filebase.. ls -l /opt/actualbudget-data/server-files/ is there an sqlite file? cd /opt/actualbudget yarn migrate down yarn migrate up or is the sqlite file here: ls -l /opt/actualbudget/server-files/
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

yeah at this point it appears to be a database compat issue

the db files exist after the update:

root@actualbudget:/opt# ls -al actualbudget-data/server-files/
total 76
drwxr-xr-x 2 root root  4096 Feb 19 10:43 .
drwxr-xr-x 8 root root  4096 Feb 19 10:43 ..
-rw-r--r-- 1 root root 61440 Dec 20 05:41 account.sqlite
-rw-r--r-- 1 root root  4616 Feb 19 10:47 account.sqlite-journal
root@actualbudget:/opt# ls -al actualbudget/server-files/
total 72
drwxr-xr-x  2 root root  4096 Feb 19 10:45 .
drwxrwxr-x 11 root root  4096 Feb 19 10:45 ..
-rw-r--r--  1 root root 61440 Feb 19 10:45 account.sqlite
root@actualbudget:/opt# 

yarn migrate down and yarn migrate up both made no difference for me

it appears that the file migrations/1718889148000-openid.js is trying to create a new table with data from the "passwords" column of the "auth" table:

import getAccountDb from '../src/account-db.js';

export const up = async function () {
  await getAccountDb().exec(
    `
    BEGIN TRANSACTION;
     CREATE TABLE auth_new
        (method TEXT PRIMARY KEY,
        display_name TEXT,
        extra_data TEXT, active INTEGER);

    INSERT INTO auth_new (method, display_name, extra_data, active)
      SELECT 'password', 'Password', password, 1 FROM auth;
        DROP TABLE auth;
        ALTER TABLE auth_new RENAME TO auth;

    CREATE TABLE pending_openid_requests
      (state TEXT PRIMARY KEY,
      code_verifier TEXT,
      return_url TEXT,
      expiry_time INTEGER);
    COMMIT;`,
  );
};

but the "auth" table contains no such column:

root@actualbudget:/opt# sqlite3 actualbudget-data/server-files/account.sqlite 
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite> .tables
auth                     secrets                  users                  
files                    sessions               
pending_openid_requests  user_access            
sqlite> .schema auth
CREATE TABLE IF NOT EXISTS "auth"
        (method TEXT PRIMARY KEY,
        display_name TEXT,
        extra_data TEXT, active INTEGER);
sqlite> 

😔

after deleting migrations/1718889148000-openid.js i get a similar issue from migrations/1719409568000-multiuser.js

after deleting BOTH of those files actualbudget starts up for me just fine and works with no errors

(i dont use openid or multiuser)

@albanqafa commented on GitHub (Feb 19, 2025): yeah at this point it appears to be a database compat issue the db files exist after the update: ``` root@actualbudget:/opt# ls -al actualbudget-data/server-files/ total 76 drwxr-xr-x 2 root root 4096 Feb 19 10:43 . drwxr-xr-x 8 root root 4096 Feb 19 10:43 .. -rw-r--r-- 1 root root 61440 Dec 20 05:41 account.sqlite -rw-r--r-- 1 root root 4616 Feb 19 10:47 account.sqlite-journal root@actualbudget:/opt# ls -al actualbudget/server-files/ total 72 drwxr-xr-x 2 root root 4096 Feb 19 10:45 . drwxrwxr-x 11 root root 4096 Feb 19 10:45 .. -rw-r--r-- 1 root root 61440 Feb 19 10:45 account.sqlite root@actualbudget:/opt# ``` yarn migrate down and yarn migrate up both made no difference for me it appears that the file migrations/1718889148000-openid.js is trying to create a new table with data from the "passwords" column of the "auth" table: ``` import getAccountDb from '../src/account-db.js'; export const up = async function () { await getAccountDb().exec( ` BEGIN TRANSACTION; CREATE TABLE auth_new (method TEXT PRIMARY KEY, display_name TEXT, extra_data TEXT, active INTEGER); INSERT INTO auth_new (method, display_name, extra_data, active) SELECT 'password', 'Password', password, 1 FROM auth; DROP TABLE auth; ALTER TABLE auth_new RENAME TO auth; CREATE TABLE pending_openid_requests (state TEXT PRIMARY KEY, code_verifier TEXT, return_url TEXT, expiry_time INTEGER); COMMIT;`, ); }; ``` but the "auth" table contains no such column: ``` root@actualbudget:/opt# sqlite3 actualbudget-data/server-files/account.sqlite SQLite version 3.40.1 2022-12-28 14:03:47 Enter ".help" for usage hints. sqlite> .tables auth secrets users files sessions pending_openid_requests user_access sqlite> .schema auth CREATE TABLE IF NOT EXISTS "auth" (method TEXT PRIMARY KEY, display_name TEXT, extra_data TEXT, active INTEGER); sqlite> ``` 😔 after deleting migrations/1718889148000-openid.js i get a similar issue from migrations/1719409568000-multiuser.js after deleting BOTH of those files actualbudget starts up for me just fine and works with no errors (i dont use openid or multiuser)
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

thanks for all your help with this

ive opened an issue with actualbudget regarding the broken DB migration here: https://github.com/actualbudget/actual/issues/4406

@albanqafa commented on GitHub (Feb 19, 2025): thanks for all your help with this ive opened an issue with actualbudget regarding the broken DB migration here: https://github.com/actualbudget/actual/issues/4406
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

also FYI the script from your dev branch fails now:

  ✔️  Actual Budget Stopped
⠋ Updating Actual Budget to 25.2.1
[ERROR] in line 1059: exit code 0: while executing command grep -v -E "⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏"

personally im not a huge fan of the fancy twirling CLI stuff, as long as it does not break things i suppose its OK...

@albanqafa commented on GitHub (Feb 19, 2025): also FYI the script from your dev branch fails now: ``` ✔️ Actual Budget Stopped ⠋ Updating Actual Budget to 25.2.1 [ERROR] in line 1059: exit code 0: while executing command grep -v -E "⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏" ``` personally im not a huge fan of the fancy twirling CLI stuff, as long as it does not break things i suppose its OK...
Author
Owner

@MickLesk commented on GitHub (Feb 19, 2025):

Its just my Dev Branch, i Test some verbose Output for update_script Part, thats the most annoying without Logs. Its not Script related

@MickLesk commented on GitHub (Feb 19, 2025): Its just my Dev Branch, i Test some verbose Output for update_script Part, thats the most annoying without Logs. Its not Script related
Author
Owner

@albanqafa commented on GitHub (Feb 19, 2025):

for anyone else that ends up here because of DB migration errors, here is the issue regarding that in their repo that one of their devs directed me to:
https://github.com/actualbudget/actual/issues/3957

also @MickLesk let me know when you push your changes to the master branch here and ill be happy to test and confirm that this issue can be closed

@albanqafa commented on GitHub (Feb 19, 2025): for anyone else that ends up here because of DB migration errors, here is the issue regarding that in their repo that one of their devs directed me to: https://github.com/actualbudget/actual/issues/3957 also @MickLesk let me know when you push your changes to the master branch here and ill be happy to test and confirm that this issue can be closed
Author
Owner

@michelroegl-brunner commented on GitHub (Feb 20, 2025):

Merged.

@michelroegl-brunner commented on GitHub (Feb 20, 2025): Merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#525