[Bug]: Database is out of sync with migrations #1176

Closed
opened 2026-02-28 19:34:55 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @totalitarian on GitHub (Jun 27, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

Fresh install of 24.6 and I get this error

Actual api client initialized successfully
Database is out of sync with migrations: {
  appliedIds: [
    1548957970627, 1550601598648, 1555786194328,
    1561751833510, 1567699552727, 1582384163573,
    1597756566448, 1608652596043, 1608652596044,
    1612625548236, 1614782639336, 1615745967948,
    1616167010796, 1618975177358, 1632571489012,
    1679728867040, 1681115033845, 1682974838138,
    1685007876842, 1686139660866, 1688749527273,
    1688841238000, 1691233396000, 1694438752000,
    1697046240000, 1704572023730, 1704572023731,
    1707267033000, 1712784523000, 1716359441000
  ],
  available: [
    '1548957970627_remove-db-version.sql',
    '1550601598648_payees.sql',
    '1555786194328_remove_category_group_unique.sql',
    '1561751833510_indexes.sql',
    '1567699552727_budget.sql',
    '1582384163573_cleared.sql',
    '1597756566448_rules.sql',
    '1608652596043_parent_field.sql',
    '1608652596044_trans_views.sql',
    '1612625548236_optimize.sql',
    '1614782639336_trans_views2.sql',
    '1615745967948_meta.sql',
    '1616167010796_accounts_order.sql',
    '1618975177358_schedules.sql',
    '1632571489012_remove_cache.js',
    '1679728867040_rules_conditions.sql',
    '1681115033845_add_schedule_name.sql',
    '1682974838138_remove_payee_rules.sql',
    '1685007876842_add_category_hidden.sql',
    '1686139660866_remove_account_type.sql',
    '1688749527273_transaction_filters.sql',
    '1688841238000_add_account_type.sql',
    '1691233396000_add_schedule_next_date_tombstone.sql',
    '1694438752000_add_goal_targets.sql',
    '1697046240000_add_reconciled.sql',
    '1704572023730_add_account_sync_source.sql',
    '1704572023731_add_missing_goCardless_sync_source.sql',
    '1707267033000_reports.sql',
    '1712784523000_unhide_input_group.sql'
  ]
}
Error updating Error: out-of-sync-migrations
    at checkDatabaseValidity (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:39329:31)
    at Module.migrate (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:39337:17)
    at async runMigrations (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43144:17)
    at async updateVersion (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43163:17)
    at async loadBudget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38945:21)
    at async handlers.load-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38775:29)
    at async handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29468:21)
TypeError: Cannot read properties of undefined (reading 'timestamp')
    at _fullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42483:98)
    at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42395:38
    at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43341:38
    at initialFullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42381:38)
    at handlers.sync-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38760:94)
    at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29471:65)
[Exception] TypeError: Cannot read properties of undefined (reading 'timestamp')
    at _fullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42483:98)
    at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42395:38
    at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43341:38
    at initialFullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42381:38)
    at handlers.sync-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38760:94)
    at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29471:65)
Unknown error while interacting with Actual Api. See server logs for more information Error: We had an unknown problem opening “My-Finances-347c8aa”.
    at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29473:31)
unhandledRejection Error: We had an unknown problem opening “My-Finances-347c8aa”.
    at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29473:31)
Actual HTTP Server Listening on PORT:  5007

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Microsoft Edge

Operating System

Linux

Originally created by @totalitarian on GitHub (Jun 27, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue - [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file) ### What happened? Fresh install of 24.6 and I get this error ``` Actual api client initialized successfully Database is out of sync with migrations: { appliedIds: [ 1548957970627, 1550601598648, 1555786194328, 1561751833510, 1567699552727, 1582384163573, 1597756566448, 1608652596043, 1608652596044, 1612625548236, 1614782639336, 1615745967948, 1616167010796, 1618975177358, 1632571489012, 1679728867040, 1681115033845, 1682974838138, 1685007876842, 1686139660866, 1688749527273, 1688841238000, 1691233396000, 1694438752000, 1697046240000, 1704572023730, 1704572023731, 1707267033000, 1712784523000, 1716359441000 ], available: [ '1548957970627_remove-db-version.sql', '1550601598648_payees.sql', '1555786194328_remove_category_group_unique.sql', '1561751833510_indexes.sql', '1567699552727_budget.sql', '1582384163573_cleared.sql', '1597756566448_rules.sql', '1608652596043_parent_field.sql', '1608652596044_trans_views.sql', '1612625548236_optimize.sql', '1614782639336_trans_views2.sql', '1615745967948_meta.sql', '1616167010796_accounts_order.sql', '1618975177358_schedules.sql', '1632571489012_remove_cache.js', '1679728867040_rules_conditions.sql', '1681115033845_add_schedule_name.sql', '1682974838138_remove_payee_rules.sql', '1685007876842_add_category_hidden.sql', '1686139660866_remove_account_type.sql', '1688749527273_transaction_filters.sql', '1688841238000_add_account_type.sql', '1691233396000_add_schedule_next_date_tombstone.sql', '1694438752000_add_goal_targets.sql', '1697046240000_add_reconciled.sql', '1704572023730_add_account_sync_source.sql', '1704572023731_add_missing_goCardless_sync_source.sql', '1707267033000_reports.sql', '1712784523000_unhide_input_group.sql' ] } Error updating Error: out-of-sync-migrations at checkDatabaseValidity (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:39329:31) at Module.migrate (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:39337:17) at async runMigrations (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43144:17) at async updateVersion (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43163:17) at async loadBudget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38945:21) at async handlers.load-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38775:29) at async handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29468:21) TypeError: Cannot read properties of undefined (reading 'timestamp') at _fullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42483:98) at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42395:38 at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43341:38 at initialFullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42381:38) at handlers.sync-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38760:94) at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29471:65) [Exception] TypeError: Cannot read properties of undefined (reading 'timestamp') at _fullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42483:98) at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42395:38 at /usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43341:38 at initialFullSync (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:42381:38) at handlers.sync-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:38760:94) at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29471:65) Unknown error while interacting with Actual Api. See server logs for more information Error: We had an unknown problem opening “My-Finances-347c8aa”. at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29473:31) unhandledRejection Error: We had an unknown problem opening “My-Finances-347c8aa”. at handlers.api/download-budget (/usr/src/app/node_modules/@actual-app/api/dist/app/bundle.api.js:29473:31) Actual HTTP Server Listening on PORT: 5007 ``` ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Microsoft Edge ### Operating System Linux
GiteaMirror added the bug label 2026-02-28 19:34:55 -06:00
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

did you use the edge build at some point? or use a different desktop client than the one on the release page?

@youngcw commented on GitHub (Jun 27, 2024): did you use the edge build at some point? or use a different desktop client than the one on the release page?
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

The easy fix probably is to update your server to edge until the next release comes through

@youngcw commented on GitHub (Jun 27, 2024): The easy fix probably is to update your server to edge until the next release comes through
Author
Owner

@totalitarian commented on GitHub (Jun 27, 2024):

I did use edge at one point. So what i'm trying to do now is start completely from fresh but I keep getting references to My-Finances-347c8aa somehow

@totalitarian commented on GitHub (Jun 27, 2024): I did use edge at one point. So what i'm trying to do now is start completely from fresh but I keep getting references to My-Finances-347c8aa somehow
Author
Owner

@totalitarian commented on GitHub (Jun 27, 2024):

I tried going back to edge but still get the same issue

@totalitarian commented on GitHub (Jun 27, 2024): I tried going back to edge but still get the same issue
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

if you are trying to start from scratch make sure you clear your browser cache and delete all the server files

@youngcw commented on GitHub (Jun 27, 2024): if you are trying to start from scratch make sure you clear your browser cache and delete all the server files
Author
Owner

@totalitarian commented on GitHub (Jun 27, 2024):

Just tried that. This is my landing page on actual

image

But still get this error even after cache reset
We had an unknown problem opening “My-Finances-347c8aa”

I'm at a loss how it can still think My-Finances-347c8aa exists...

@totalitarian commented on GitHub (Jun 27, 2024): Just tried that. This is my landing page on actual <img width="394" alt="image" src="https://github.com/actualbudget/actual/assets/2385696/0cfb5785-0c2e-4e0c-a4fd-76fd5ba8f8c9"> But still get this error even after cache reset We had an unknown problem opening “My-Finances-347c8aa” I'm at a loss how it can still think My-Finances-347c8aa exists...
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

Maybe try changing the ip:port or url to kinda force everything to go away. Also that old budget file could have resynced to the server before the error, so check that

@youngcw commented on GitHub (Jun 27, 2024): Maybe try changing the ip:port or url to kinda force everything to go away. Also that old budget file could have resynced to the server before the error, so check that
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

one thing that helps is to use an incognito window so that way nothing is stored in your browser. That can help narrow down which side is remembering things

@youngcw commented on GitHub (Jun 27, 2024): one thing that helps is to use an incognito window so that way nothing is stored in your browser. That can help narrow down which side is remembering things
Author
Owner

@totalitarian commented on GitHub (Jun 27, 2024):

Sorry to be a pain but i've cleared caches, installed actual on another server, ip:port and only used incognito. I'm totally baffled now...

@totalitarian commented on GitHub (Jun 27, 2024): Sorry to be a pain but i've cleared caches, installed actual on another server, ip:port and only used incognito. I'm totally baffled now...
Author
Owner

@youngcw commented on GitHub (Jun 27, 2024):

🤷 Something must be holding onto data

@youngcw commented on GitHub (Jun 27, 2024): :shrug: Something must be holding onto data
Author
Owner

@totalitarian commented on GitHub (Jun 27, 2024):

did you use the edge build at some point? or use a different desktop client than the one on the release page?

Managed to fix it. I had to clear cache on my iphone, ipad and PC. Got there in the end and thank you for your patience

@totalitarian commented on GitHub (Jun 27, 2024): > did you use the edge build at some point? or use a different desktop client than the one on the release page? Managed to fix it. I had to clear cache on my iphone, ipad and PC. Got there in the end and thank you for your patience
Author
Owner

@TFenby commented on GitHub (Jul 27, 2024):

This issue has cropped up on my install, and I've only ever used the Docker image of docker.io/actualbudget/actual-server:latest

Is it possible an edge build got tagged as latest or something?

Specifically, this is happening when I try using your (youngcw) fork of actualplaid. Or does that utility keep its own database that would be the source of that error? I can open a ticket over there if that's the case.

Edit: I'm guessing the actual node module included w/ that actualplaid utility is just behind on available migrations, since the one that is says is missing (1716359441000) is indeed part of the latest release. I'll open an issue in your other repo.

@TFenby commented on GitHub (Jul 27, 2024): This issue has cropped up on my install, and I've only ever used the Docker image of `docker.io/actualbudget/actual-server:latest` Is it possible an edge build got tagged as latest or something? Specifically, this is happening when I try using your (youngcw) fork of actualplaid. Or does that utility keep its own database that would be the source of that error? I can open a ticket over there if that's the case. Edit: I'm guessing the actual node module included w/ that actualplaid utility is just behind on available migrations, since the one that is says is missing (1716359441000) is indeed part of the latest release. I'll open an issue in your other repo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1176