[Bug]: Unable to open budget file: This budget cannot be loaded with this version of the app #442

Closed
opened 2026-02-28 19:04:23 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @KuroSetsuna29 on GitHub (Jun 21, 2023).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Last time I opened my budget was probably a couple of weeks ago. Now when I try to open my budget I am getting following error:

This budget cannot be loaded with this version of the app. Make sure the app is up-to-date. Do you want to load a backup?

It seems like there are no backups available either.

Note: I am using edge-alpine docker tag, but I have tried using all alpine tags in the past month, each have the same issue.

What error did you receive?

This budget cannot be loaded with this version of the app. Make sure the app is up-to-date. Do you want to load a backup?

I also see the following in the browser console:

Reading meta...
Got meta for documents-Actual-My-Finances-1-7257e87-db.sqlite: {size: 20201472}
Opened!
Error updating Error: out-of-sync-migrations
at migrations.ts:114:13
at p (migrations.ts:123:3)
at async update.ts:9:1
at async g (update.ts:32:23)
at async ut (main.ts:2182:3)
at async ot.load-budget (main.ts:1925:3)

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome

Operating System

Windows 10

Originally created by @KuroSetsuna29 on GitHub (Jun 21, 2023). ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### What happened? Last time I opened my budget was probably a couple of weeks ago. Now when I try to open my budget I am getting following error: > This budget cannot be loaded with this version of the app. Make sure the app is up-to-date. Do you want to load a backup? It seems like there are no backups available either. Note: I am using `edge-alpine` docker tag, but I have tried using all alpine tags in the past month, each have the same issue. ### What error did you receive? > This budget cannot be loaded with this version of the app. Make sure the app is up-to-date. Do you want to load a backup? I also see the following in the browser console: > Reading meta... > Got meta for documents-Actual-My-Finances-1-7257e87-db.sqlite: {size: 20201472} > Opened! > Error updating Error: out-of-sync-migrations > at migrations.ts:114:13 > at p (migrations.ts:123:3) > at async update.ts:9:1 > at async g (update.ts:32:23) > at async ut (main.ts:2182:3) > at async ot.load-budget (main.ts:1925:3) ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Chrome ### Operating System Windows 10
GiteaMirror added the bug label 2026-02-28 19:04:23 -06:00
Author
Owner

@shall0pass commented on GitHub (Jun 21, 2023):

I had that same issue when I tried to use Firefox with my budget for the first time. I ended up exporting my budget and re-importing it, which caused the error to go away. Clearing the cache and data of the offending browser didn't help in my case. Sorry to not be much help, but if you can find a browser that will open it, I'd export a backup and re-import.

@shall0pass commented on GitHub (Jun 21, 2023): I had that same issue when I tried to use Firefox with my budget for the first time. I ended up exporting my budget and re-importing it, which caused the error to go away. Clearing the cache and data of the offending browser didn't help in my case. Sorry to not be much help, but if you can find a browser that will open it, I'd export a backup and re-import.
Author
Owner

@KuroSetsuna29 commented on GitHub (Jun 21, 2023):

Unfortunately, I have tried Chrome, Firefox, and Edge. All unable to open it.

@KuroSetsuna29 commented on GitHub (Jun 21, 2023): Unfortunately, I have tried Chrome, Firefox, and Edge. All unable to open it.
Author
Owner

@j-f1 commented on GitHub (Jun 21, 2023):

If you open the developer tools (ctrl+shift+i) and switch to the Console tab, then attempt to open the file again, are there any log messages printed? Can you send them over if so?

@j-f1 commented on GitHub (Jun 21, 2023): If you open the developer tools (ctrl+shift+i) and switch to the Console tab, then attempt to open the file again, are there any log messages printed? Can you send them over if so?
Author
Owner

@KuroSetsuna29 commented on GitHub (Jun 21, 2023):

If you open the developer tools (ctrl+shift+i) and switch to the Console tab, then attempt to open the file again, are there any log messages printed? Can you send them over if so?

I am getting the following in the browser console log:

Reading meta...
Got meta for documents-Actual-My-Finances-1-7257e87-db.sqlite: {size: 20201472}
Opened!
Error updating Error: out-of-sync-migrations
at migrations.ts:114:13
at p (migrations.ts:123:3)
at async update.ts:9:1
at async g (update.ts:32:23)
at async ut (main.ts:2182:3)
at async ot.load-budget (main.ts:1925:3)

@KuroSetsuna29 commented on GitHub (Jun 21, 2023): > If you open the developer tools (ctrl+shift+i) and switch to the Console tab, then attempt to open the file again, are there any log messages printed? Can you send them over if so? I am getting the following in the browser console log: > Reading meta... > Got meta for documents-Actual-My-Finances-1-7257e87-db.sqlite: {size: 20201472} > Opened! > Error updating Error: out-of-sync-migrations > at migrations.ts:114:13 > at p (migrations.ts:123:3) > at async update.ts:9:1 > at async g (update.ts:32:23) > at async ut (main.ts:2182:3) > at async ot.load-budget (main.ts:1925:3)
Author
Owner

@Kidglove57 commented on GitHub (Jun 21, 2023):

I don't know if this provides any clues. But, when I tried to run the Edge version towards the end of May, I got the same error. Updating to the June release resolved it for me.

@Kidglove57 commented on GitHub (Jun 21, 2023): I don't know if this provides any clues. But, when I tried to run the Edge version towards the end of May, I got the same error. Updating to the June release resolved it for me.
Author
Owner

@j-f1 commented on GitHub (Jun 21, 2023):

Opened #1161 which will hopefully be included in an edge release in the near future. That will output additional debugging information we can use to figure out what went wrong here.

@j-f1 commented on GitHub (Jun 21, 2023): Opened #1161 which will hopefully be included in an edge release in the near future. That will output additional debugging information we can use to figure out what went wrong here.
Author
Owner

@j-f1 commented on GitHub (Jun 21, 2023):

Oh, I think I see what happened. You must have used a version of the edge image that included the bad change introduced in a25327d370 and fixed in 6e6d765699. The easiest solution would be to restore from a recent backup (this is why we recommend keeping backups if you use the edge image). If you don’t have a backup, you might be able to manually update the migration table to remove the bad migration and insert the new one.

@j-f1 commented on GitHub (Jun 21, 2023): Oh, I think I see what happened. You must have used a version of the edge image that included the bad change introduced in a25327d37000cbc1c7f4bcaf11526cc4d1f9fb61 and fixed in 6e6d765699430520c3adfb8f206eef1fc258aafd. The easiest solution would be to restore from a recent backup (this is why we recommend keeping backups if you use the edge image). If you don’t have a backup, you might be able to manually update the migration table to remove the bad migration and insert the new one.
Author
Owner

@KuroSetsuna29 commented on GitHub (Jun 21, 2023):

Thank you, that fixed it!

For anyone else that has this problem (and does not have a backup, if you do just use the backup is easier), I did the following:

  1. Extract the budget file on the server ({actualbudget_appdata_path}/user-files/file-{random_uuid}.blob), this should output a db.sqlite and metadata.json file
unzip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob
  1. Use sqlite3 to edit the db.sqlite file
sqlite3 db.sqlite
  1. Select the __migrations__, if you have a record with id 1682265217543 then you have this issue
select * from __migrations__;
  1. Delete 1682265217543 from __migrations__
delete from __migrations__ where id = 1682265217543;
  1. I had to also add back the type column to accounts table as it looks like the bad migration already removed and prevents the good migration from running
alter table accounts add column type text;
  1. Save database changes
.exit
  1. Update the blob with the new db.sqlite
zip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob db.sqlite
  1. Delete the local copy of the database in the browser (three dots > delete > local only)

Funny enough, I was updating my server filesystem from btrfs to zfs, and lost my appdata backups which I probably could have restored from. I'll look into creating backups in actual app.

@KuroSetsuna29 commented on GitHub (Jun 21, 2023): Thank you, that fixed it! For anyone else that has this problem (and does not have a backup, if you do just use the backup is easier), I did the following: 1. Extract the budget file on the server (`{actualbudget_appdata_path}/user-files/file-{random_uuid}.blob`), this should output a `db.sqlite` and `metadata.json` file ``` unzip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob ``` 2. Use sqlite3 to edit the `db.sqlite` file ``` sqlite3 db.sqlite ``` 3. Select the `__migrations__`, if you have a record with id `1682265217543` then you have this issue ``` select * from __migrations__; ``` 4. Delete `1682265217543` from `__migrations__` ``` delete from __migrations__ where id = 1682265217543; ``` 5. I had to also add back the `type` column to `accounts` table as it looks like the bad migration already removed and prevents the good migration from running ``` alter table accounts add column type text; ``` 6. Save database changes ``` .exit ``` 7. Update the blob with the new `db.sqlite` ``` zip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob db.sqlite ``` 8. Delete the local copy of the database in the browser (three dots > delete > local only) Funny enough, I was updating my server filesystem from btrfs to zfs, and lost my appdata backups which I probably could have restored from. I'll look into creating backups in actual app.
Author
Owner

@Shazib commented on GitHub (Jun 22, 2023):

Nice work. Might be useful to stick that in a doc help page?

@Shazib commented on GitHub (Jun 22, 2023): Nice work. Might be useful to stick that in a doc help page?
Author
Owner

@MatissJanis commented on GitHub (Aug 6, 2023):

Closing this off as solved.

@MatissJanis commented on GitHub (Aug 6, 2023): Closing this off as solved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#442