Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Bug report) 61.2-beta, Windows 10/11, Desktop app does not open #4132

Open
Engr-AllanG opened this issue Jul 29, 2023 · 20 comments
Open

(Bug report) 61.2-beta, Windows 10/11, Desktop app does not open #4132

Engr-AllanG opened this issue Jul 29, 2023 · 20 comments

Comments

@Engr-AllanG
Copy link

Engr-AllanG commented Jul 29, 2023

Trilium Version

61.2-beta

What operating system are you using?

Windows

What is your setup?

Local + server sync

Operating System Version

Server Ubuntu 20.04, Desktop Windows 10 and 11

Description

As always - love the app!

Server version 61.2-beta installed on ubuntu 20.04 and works with no apparent issues. Desktop apps on both Windows 10 and 11 do not open

Found the logs - database migration issue...not sure if this is supposed to happen automatically?

Error logs

15:41:58.518 App db version is 223, while db version is 194. Migration needed.
15:41:58.521 DB size: 18632 KB
15:42:00.031 {
"appVersion": "0.61.2-beta",
"dbVersion": 223,
"syncVersion": 30,
"buildDate": "2023-07-28T00:06:23+02:00",
"buildRevision": "ce3834eb9ecd710bde0e6843bd52bb306faf55ce",
"dataDirectory": "C:\Users\\AppData\Roaming\trilium-data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2023-07-29T22:41:58.517Z"
}
15:42:00.031 CPU model: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, logical cores: 4 freq: 2594 Mhz
15:42:00.032 Trusted reverse proxy: false
15:42:00.032 App HTTP server starting up at port 37840
15:42:00.048 Listening on port 37840
15:42:00.426 Created backup at C:\Users*
\AppData\Roaming\trilium-data\backup/backup-before-migration-v194.db

@zadam
Copy link
Owner

zadam commented Jul 30, 2023

Hello, I don't see any migration error. Can you include the whole log or send it to zadam.apps@gmail.com? Thanks!

@Engr-AllanG
Copy link
Author

Hi, I sent the log to your email.

I assumed a migration "issue" because it said the db is v194, needs to be 223, and that migration is needed. I figured it was supposed to be automatic. Anyway, let me know if you need anything else from me

@zadam
Copy link
Owner

zadam commented Jul 31, 2023

Thanks. I tested on Windows 11 and it went fine. Not sure what's going wrong, it kind of looks like it freezes because there are no further (error) logs ...

@nema69
Copy link

nema69 commented Aug 1, 2023

I'm having the same issue. Works fine on ubuntu and doesn't launch on Windows 11. Logs also look the same.

18:44:08.144 CPU model: 12th Gen Intel(R) Core(TM) i5-12500, logical cores: 12 freq: 2995 Mhz
18:44:08.144 Trusted reverse proxy: false
18:44:08.145 App HTTP server starting up at port 37840
18:44:08.150 Listening on port 37840
18:44:09.143 Created backup at C:\Users\luisr\AppData\Roaming\trilium-data\backup/backup-before-migration-v212.db
18:44:43.116 App db version is 225, while db version is 212. Migration needed.
18:44:43.116 DB size: 86425 KB
18:44:43.610 {
"appVersion": "0.61.3-beta",
"dbVersion": 225,
"syncVersion": 31,
"buildDate": "2023-07-31T23:03:45+02:00",
"buildRevision": "530e56dcb595a764ec0f6221c09b1b3a7ac22f0d",
"dataDirectory": "C:\Users\luisr\AppData\Roaming\trilium-data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2023-08-01T16:44:43.115Z"
}
18:44:43.610 CPU model: 12th Gen Intel(R) Core(TM) i5-12500, logical cores: 12 freq: 2995 Mhz
18:44:43.610 Trusted reverse proxy: false
18:44:43.611 App HTTP server starting up at port 37840
18:44:43.616 Listening on port 37840
18:44:44.527 Created backup at C:\Users\luisr\AppData\Roaming\trilium-data\backup/backup-before-migration-v212.db

@Engr-AllanG
Copy link
Author

Engr-AllanG commented Aug 1, 2023 via email

@gerroon
Copy link

gerroon commented Aug 1, 2023

I have the same problem on Windows 11 trilium-windows-x64-0.61.3-beta.zip, no visible Trilium windows. It looks like it is running according to the process hacker. I see 3 trilium.exe running. I kill all and start again with the same issue. 3 trilium.exes but no visible trilum window open.

It looks like Trilium does alot of IO and Cpu use after the start but all those 3 trilium.exe processes die off after sometime.

@Engr-AllanG
Copy link
Author

I copied the database from my server to my desktop, and that allowed/caused Trilium to open successfully. I established a connection and synced successfully with the server.

@gerroon
Copy link

gerroon commented Aug 8, 2023

@Engr-AllanG I do not get why that would work? I hope zadam gives us some clue.

@zadam
Copy link
Owner

zadam commented Aug 9, 2023

Unfortunately I have no clue since I can't reproduce it and there doesn't seem to be any error logged.

@GiantCrocodile
Copy link

Just a random guess: Could this come from some antivirus/firewall software preventing or freezing the execution somehow?

@gerroon
Copy link

gerroon commented Aug 17, 2023

No it would not because I do not have a virus thing running on my system.

@Engr-AllanG
Copy link
Author

Engr-AllanG commented Aug 17, 2023 via email

@nema69
Copy link

nema69 commented Aug 18, 2023

I checked if the problem persists on version 61.5 - it does. I ran the exe from the command line and got the following output:

App db version is 225, while db version is 212. Migration needed.
DB size: 86429 KB
{
"appVersion": "0.61.5-beta",
"dbVersion": 225,
"syncVersion": 31,
"buildDate": "2023-08-16T23:02:15+02:00",
"buildRevision": "3f7a5504c77263a7118cede5c0d9b450ba37f424",
"dataDirectory": "C:\Users\luisr\AppData\Roaming\trilium-data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2023-08-18T12:12:24.016Z"
}
CPU model: 12th Gen Intel(R) Core(TM) i5-12500, logical cores: 12 freq: 2995 Mhz
Trusted reverse proxy: false
App HTTP server starting up at port 37840
Listening on port 37840
Created backup at C:\Users\luisr\AppData\Roaming\trilium-data\backup/backup-before-migration-v212.db
Attempting migration to version 213
Migration with JS module
ERROR: error during migration to version 213: SqliteError: no such column: blobId
at Database.prepare (C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\better-sqlite3\lib\methods\wrappers.js:5:21)
at stmt (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql.js:84:44)
at wrap (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql.js:212:23)
at Object.getRawRows (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql.js:141:12)
at Object.load (C:\Program Files\trilium-0.61.5\resources\app.asar\src\becca\becca_loader.js:33:27)
at C:\Program Files\trilium-0.61.5\resources\app.asar\db\migrations\0213__migrate_scripts.js:8:21
at C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\cls-hooked\context.js:118:13
at Namespace.run (C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\cls-hooked\context.js:97:5)
at Namespace.runAndReturn (C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\cls-hooked\context.js:117:8)
at Object.init (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\cls.js:5:22)
ERROR: migration failed, crashing hard
The database connection is not open
TypeError: The database connection is not open
at Function.sqliteTransaction (C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\better-sqlite3\lib\methods\transaction.js:66:9)
at Object.transactional (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql.js:242:52)
at migrate (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\migration.js:54:9)
at async Object.migrateIfNecessary (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\migration.js:123:9)
at async initDbConnection (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql_init.js:41:5)
TypeError: The database connection is not open
at Function.sqliteTransaction (C:\Program Files\trilium-0.61.5\resources\app.asar\node_modules\better-sqlite3\lib\methods\transaction.js:66:9)
at Object.transactional (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql.js:242:52)
at migrate (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\migration.js:54:9)
at async Object.migrateIfNecessary (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\migration.js:123:9)
at async initDbConnection (C:\Program Files\trilium-0.61.5\resources\app.asar\src\services\sql_init.js:41:5)

I'm not well versed in databases or javascript so I can't tell exactly whats wrong, but it seems the database migration is not working. This tracks with what @Engr-AllanG reported. I hope this helps in fixing the issue :)

@zadam
Copy link
Owner

zadam commented Aug 18, 2023

@nema69 thanks, this actually contains a useful error.

You're upgrading from 0.59 (not 0.60) and that seems to be the source of the problem. To be clear, it's not a mistake on your part, but a migration scenario I did not test. I will see if I can fix this. In the meantime, try upgrading first to 0.60.4 and only then to 0.61.X. I believe that should resolve the problem for you.

@Engr-AllanG
Copy link
Author

Engr-AllanG commented Aug 18, 2023 via email

@nema69
Copy link

nema69 commented Aug 19, 2023

@nema69 thanks, this actually contains a useful error.

You're upgrading from 0.59 (not 0.60) and that seems to be the source of the problem. To be clear, it's not a mistake on your part, but a migration scenario I did not test. I will see if I can fix this. In the meantime, try upgrading first to 0.60.4 and only then to 0.61.X. I believe that should resolve the problem for you.

This did indeed work! Thank you :)

@gerroon
Copy link

gerroon commented Aug 27, 2023

Is this fixed in the latest release? trilium-windows-x64-0.61.5-beta.zip still does not open?

@zadam
Copy link
Owner

zadam commented Aug 30, 2023

As far as I'm concerned it's fixed in a way that it forces the user to upgrade to 0.60 first.

@gerroon
Copy link

gerroon commented Aug 30, 2023

There is no indication for what the user should do, maybe at least give the user an indication of the steps to upgrade?

@zadam
Copy link
Owner

zadam commented Sep 5, 2023

If you attempt to migrate from an earlier version, it will exit and complain in the process output. But I will include this information into the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants