actual
actual copied to clipboard
[Bug]: Unable to open budget file: This budget cannot be loaded with this version of the app
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
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.
Unfortunately, I have tried Chrome, Firefox, and Edge. All unable to open it.
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?
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)
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.
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.
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.
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:
- Extract the budget file on the server (
{actualbudget_appdata_path}/user-files/file-{random_uuid}.blob
), this should output adb.sqlite
andmetadata.json
file
unzip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob
- Use sqlite3 to edit the
db.sqlite
file
sqlite3 db.sqlite
- Select the
__migrations__
, if you have a record with id1682265217543
then you have this issue
select * from __migrations__;
- Delete
1682265217543
from__migrations__
delete from __migrations__ where id = 1682265217543;
- I had to also add back the
type
column toaccounts
table as it looks like the bad migration already removed and prevents the good migration from running
alter table accounts add column type text;
- Save database changes
.exit
- Update the blob with the new
db.sqlite
zip file-25cc91b2-382f-4d49-a854-a403d5a6e430.blob db.sqlite
- 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.
Nice work. Might be useful to stick that in a doc help page?
Closing this off as solved.