Crash while launching. error --> Migration #1904161246 failed: SQLITE_CONSTRAINT


#1

Hello,
this morning I am facing a regular crash while opening tropy, and all projects are impossible to open.
When I launch tropy a screen appears (pic 1); if I dismiss it and try to open a project (either the one I am working on, or an earlier version of it, of a whole different project) nothing happens. When I try to start a new project, it asks me for its name and then prevent me to actually create it (pic 2).


I tried to re-install tropy ex novo, but still the same.
Any suggestion is welcome. I am running on tropy 1.5.0 on Win 10 and I did not change any setup since the last time I worked.
here a copy of the log file:

{“level”:30,“time”:1560066989116,“type”:“browser”,“name”:“main”,“opts”:{"_":[],“auto-updates”:true,“ignore-gpu-blacklist”:false,“debug”:false,“trace”:false,“squirrel-firstrun”:true,“environment”:“production”,“env”:“production”,"$0":“tropy.exe”,“data”:“C:\Users\edoar\AppData\Roaming\Tropy”,“cache”:“C:\Users\edoar\AppData\Roaming\Tropy\cache”,“logs”:“C:\Users\edoar\AppData\Roaming\Tropy\logs”},“version”:“1.5.0”,“msg”:“main.init 1.5.0 Windows_NT 10.0.17134 (x64)”,“v”:1}
{“level”:30,“time”:1560066989310,“type”:“browser”,“name”:“main”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560066989314,“type”:“browser”,“name”:“main”,“msg”:“app state restored”,“v”:1}
{“level”:30,“time”:1560066989317,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\Huntington #2.tpy”,“msg”:“open new project window”,“v”:1}
{“level”:30,“time”:1560066989370,“type”:“browser”,“name”:“main”,“msg”:“ready after 323ms [req:88ms]”,“v”:1}
{“level”:30,“time”:1560066990147,“type”:“renderer”,“name”:“project”,“dpx”:1.5,“opts”:{“aqua”:false,“dark”:false,“environment”:“production”,“documents”:“C:\Users\edoar\Documents”,“maximizable”:true,“minimizable”:true,“pictures”:“C:\Users\edoar\Pictures”,“scrollbars”:true,“theme”:“light”,“file”:“C:\Users\edoar\Documents\Huntington #2.tpy”,“recent”:[“C:\Users\edoar\Documents\Huntington #2.tpy”,“C:\Users\edoar\Documents\test1.tpy”],“data”:“C:\Users\edoar\AppData\Roaming\Tropy”,“debug”:false,“dev”:false,“cache”:“C:\Users\edoar\AppData\Roaming\Tropy\cache”,“plugins”:“C:\Users\edoar\AppData\Roaming\Tropy\plugins”,“frameless”:false,“level”:“info”,“locale”:“en”,“log”:“C:\Users\edoar\AppData\Roaming\Tropy\logs\tropy.log”,“uuid”:“af2facf0-428d-11e9-acc5-9f2e762c60a1”,“update”:{},“version”:“1.5.0”,“webgl”:true,“zoom”:1},“msg”:“project.init”,“v”:1}
{“level”:30,“time”:1560066990210,“type”:“renderer”,“name”:“project”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560066990216,“type”:“renderer”,“name”:“project”,“msg”:“plugins loaded: 1”,“v”:1}
{“level”:30,“time”:1560066991702,“type”:“renderer”,“name”:“project”,“msg”:“open db C:\Users\edoar\AppData\Roaming\Tropy\ontology.db”,“v”:1}
{“level”:30,“time”:1560066991706,“type”:“renderer”,“name”:“project”,“msg”:“restoring recent@tropy”,“v”:1}
{“level”:30,“time”:1560066991721,“type”:“renderer”,“name”:“project”,“msg”:“restoring settings@tropy”,“v”:1}
{“level”:30,“time”:1560066991721,“type”:“renderer”,“name”:“project”,“msg”:“restoring ui@tropy”,“v”:1}
{“level”:30,“time”:1560066991785,“type”:“renderer”,“name”:“project”,“msg”:“open db C:\Users\edoar\Documents\Huntington #2.tpy”,“v”:1}
{“level”:30,“time”:1560066992069,“type”:“renderer”,“name”:“project”,“msg”:“esper using webgl renderer”,“v”:1}
{“level”:40,“time”:1560066992140,“type”:“renderer”,“name”:“project”,“query”:"\n SELECT count(*) AS count FROM sqlite_master",“ms”:387,“msg”:“SLOW: db query took 387ms”,“v”:1}
{“level”:30,“time”:1560066992155,“type”:“renderer”,“name”:“project”,“msg”:“migrating Huntington #2.tpy to #1904161246”,“v”:1}
{“level”:40,“time”:1560066992224,“type”:“renderer”,“name”:“project”,“stack”:“Error: Migration #1904161246 failed: SQLITE_CONSTRAINT: UNIQUE constraint failed: trash.id\n at C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\lib\common\migration.js:44:13\n at tryCatcher (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23)\n at Promise._settlePromiseFromHandler (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:517:31)\n at Promise._settlePromise (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:574:18)\n at Promise._settlePromise0 (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:619:10)\n at Promise._settlePromises (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:695:18)\n at _drainQueueStep (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:138:12)\n at _drainQueue (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:131:9)\n at Async._drainQueues (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:147:5)\n at Async.drainQueues (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:17:14)”,“msg”:“unexpected error in *open”,“v”:1}
{“level”:30,“time”:1560066992368,“type”:“renderer”,“name”:“project”,“msg”:“project ready 2262ms [dom:46ms win:64ms req:1508ms]”,“v”:1}
{“level”:30,“time”:1560067049317,“type”:“browser”,“name”:“main”,“msg”:“checking for updates…”,“v”:1}
{“level”:30,“time”:1560067050658,“type”:“browser”,“name”:“main”,“msg”:“no updates available”,“v”:1}
{“level”:30,“time”:1560067306181,“type”:“renderer”,“name”:“project”,“msg”:“esper using webgl renderer”,“v”:1}
{“level”:30,“time”:1560067313309,“type”:“renderer”,“name”:“wizard”,“dpx”:1.5,“opts”:{“aqua”:false,“dark”:false,“environment”:“production”,“documents”:“C:\Users\edoar\Documents”,“maximizable”:false,“minimizable”:false,“pictures”:“C:\Users\edoar\Pictures”,“scrollbars”:true,“theme”:“light”,“data”:“C:\Users\edoar\AppData\Roaming\Tropy”,“debug”:false,“dev”:false,“cache”:“C:\Users\edoar\AppData\Roaming\Tropy\cache”,“plugins”:“C:\Users\edoar\AppData\Roaming\Tropy\plugins”,“frameless”:false,“level”:“info”,“locale”:“en”,“log”:“C:\Users\edoar\AppData\Roaming\Tropy\logs\tropy.log”,“uuid”:“af2facf0-428d-11e9-acc5-9f2e762c60a1”,“update”:{},“version”:“1.5.0”,“webgl”:true,“zoom”:1},“msg”:“wizard.init”,“v”:1}
{“level”:30,“time”:1560067313351,“type”:“renderer”,“name”:“wizard”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560067313358,“type”:“renderer”,“name”:“wizard”,“msg”:“plugins loaded: 1”,“v”:1}
{“level”:30,“time”:1560067313454,“type”:“browser”,“name”:“main”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560067313480,“type”:“renderer”,“name”:“project”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560067313482,“type”:“renderer”,“name”:“project”,“msg”:“plugins loaded: 1”,“v”:1}
{“level”:30,“time”:1560067313782,“type”:“renderer”,“name”:“wizard”,“msg”:“wizard ready 523ms [dom:59ms win:40ms req:423ms]”,“v”:1}
{“level”:30,“time”:1560067313869,“type”:“renderer”,“name”:“wizard”,“msg”:“plugins scanned: 1”,“v”:1}
{“level”:30,“time”:1560067313870,“type”:“renderer”,“name”:“wizard”,“msg”:“plugins loaded: 1”,“v”:1}
{“level”:30,“time”:1560067317788,“type”:“renderer”,“name”:“wizard”,“msg”:“creating new project test2 in C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067317791,“type”:“renderer”,“name”:“wizard”,“msg”:“open db C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067317799,“type”:“renderer”,“name”:“wizard”,“msg”:“creating project “test2” 276166dc-6694-4dbe-84fe-0b9fea98d9db”,“v”:1}
{“level”:30,“time”:1560067317838,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\test2.tpy”,“msg”:“open project in current window”,“v”:1}
{“level”:30,“time”:1560067320315,“type”:“renderer”,“name”:“wizard”,“msg”:“creating new project test2 in C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067320317,“type”:“renderer”,“name”:“wizard”,“msg”:“open db C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067320322,“type”:“renderer”,“name”:“wizard”,“msg”:“creating project “test2” 8b3163c3-e656-48f6-87ed-ece19bc7413c”,“v”:1}
{“level”:30,“time”:1560067320384,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\test2.tpy”,“msg”:“open project in current window”,“v”:1}
{“level”:30,“time”:1560067320913,“type”:“renderer”,“name”:“wizard”,“msg”:“creating new project test2 in C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067320914,“type”:“renderer”,“name”:“wizard”,“msg”:“open db C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067320917,“type”:“renderer”,“name”:“wizard”,“msg”:“creating project “test2” ea9a7a8d-13ad-45d8-b93f-7b1fd68d2533”,“v”:1}
{“level”:30,“time”:1560067320961,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\test2.tpy”,“msg”:“open project in current window”,“v”:1}
{“level”:30,“time”:1560067321451,“type”:“renderer”,“name”:“wizard”,“msg”:“creating new project test2 in C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067321453,“type”:“renderer”,“name”:“wizard”,“msg”:“open db C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067321456,“type”:“renderer”,“name”:“wizard”,“msg”:“creating project “test2” becc7c2e-efd0-4ed2-8993-0588e0b5285b”,“v”:1}
{“level”:30,“time”:1560067321493,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\test2.tpy”,“msg”:“open project in current window”,“v”:1}
{“level”:30,“time”:1560067321941,“type”:“renderer”,“name”:“wizard”,“msg”:“creating new project test2 in C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067321949,“type”:“renderer”,“name”:“wizard”,“msg”:“open db C:\Users\edoar\Documents\test2.tpy”,“v”:1}
{“level”:30,“time”:1560067321952,“type”:“renderer”,“name”:“wizard”,“msg”:“creating project “test2” 20ae916e-7d2d-4946-a9f4-ed8496eda448”,“v”:1}
{“level”:30,“time”:1560067321990,“type”:“browser”,“name”:“main”,“file”:“C:\Users\edoar\Documents\test2.tpy”,“msg”:“open project in current window”,“v”:1}
{“level”:30,“time”:1560067365946,“type”:“renderer”,“name”:“project”,“msg”:“open db C:\Users\edoar\Documents\Huntington #2.tpy”,“v”:1}
{“level”:30,“time”:1560067365951,“type”:“renderer”,“name”:“project”,“msg”:“migrating Huntington #2.tpy to #1904161246”,“v”:1}
{“level”:30,“time”:1560067366009,“type”:“renderer”,“name”:“project”,“msg”:“db query took 55ms”,“query”:"-- Prune images\r\n-- ------------------------------------------------------------\r\nINSERT INTO trash (id, reason)\r\n SELECT id, ‘auto’ AS reason\r\n FROM images\r\n WHERE id NOT IN (\r\n SELECT id FROM photos UNION SELECT id FROM selections\r\n );",“ms”:55,“v”:1}
{“level”:40,“time”:1560067366011,“type”:“renderer”,“name”:“project”,“stack”:“Error: Migration #1904161246 failed: SQLITE_CONSTRAINT: UNIQUE constraint failed: trash.id\n at C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\lib\common\migration.js:44:13\n at tryCatcher (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23)\n at Promise._settlePromiseFromHandler (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:517:31)\n at Promise._settlePromise (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:574:18)\n at Promise._settlePromise0 (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:619:10)\n at Promise._settlePromises (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\promise.js:695:18)\n at _drainQueueStep (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:138:12)\n at _drainQueue (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:131:9)\n at Async._drainQueues (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:147:5)\n at Async.drainQueues (C:\Users\edoar\AppData\Local\tropy\app-1.5.0\resources\app.asar\node_modules\bluebird\js\release\async.js:17:14)”,“msg”:“unexpected error in *open”,“v”:1}


#2

Same thing with my projects…
If you do need to work on your projects now, consider:

  • uninstalling Tropy 1.5
  • re-installing 1.4.5 (to be found here)

Once this done, turn Internet off (in order to avoid auto-update), open your project, consolidate it, and start working…


#3

Same problem for me with Tropy for Mac. Yesterday, I opened an issue on GitHub here.

I re-installed Tropy 1.4.5 too waiting a fix.


#4

Same for me too… I’ll try uninstalling and reinstalling, but I’d like to know what’s going on.


#5

There might be an error message when uninstalling 1.5, but it works anyway


#6

Hi,
we are looking into this. In the meanwhile, please follow these steps:

  • Uninstall/remove Tropy 1.5.0
  • Download and install Tropy 1.4.5 https://github.com/tropy/tropy/releases/tag/1.4.5
  • Launch Tropy 1.4.5
  • Within the first minute (!) select Help > Show User-Data Folder from the app menu and close Tropy
  • Open state.json from the user-data folder in a plain text editor
  • Change “updater:true” to “updater:false”
  • Safe the file
  • Launch Tropy 1.4.5

With this setting you should be able to keep on working with Tropy 1.4.5 until we have addressed the Tropy 1.5.0 issue.


#7

Hi
Changing “updater”:true to “updater”:false did not work with a plain-text editor: Tropy started as a process but no window opened.
Shifting from true to false using a JSON editor (online) perfectly worked
Thanks for the help
Best
Nicolas


#8

Hi all and thank you very much for these steps: it works fine again with the 1.4.5 (phew!). Very happy to use this workaround while waiting for the solution.
BTW, it worked for me using the notepad to switch the auto-updater.

Best,

Edoardo


#9

Hi,
I received the same exact error when opening one of my projects:

I will try to use the work-around solution that you have suggested to others as well in the meantime. Hope to hear about a fix soon.
Kind regards,
Djibril


#10

Hi,
Unfortunately, the work-around solution that you suggested did not work with my project. Really, I don’t know what to do. After following all the steps, tropy does not open.
Please, help!!!
Kind regards,
Djibril


#11

Thank you for this work around! I went into a brief panic this morning when I had this same problem and am grateful I can get back to work!


#12

Thanks for your patience everyone! The migration error happens when Tropy tries to update your project file for use with 1.5 – in this case some remnants of previously deleted images cause the error. We’ve just pushed a 1.5.1 beta to address this; if you would help us test this it would be great to let us know if the beta migrates your project correctly.

Specifically:

  1. Please make a backup copy of your project file to be safe.
  2. Install 1.5.1 beta from the release page on GitHub or from https://tropy.org/download/beta/mac (macOS) or https://tropy.org/download/beta/win32 (Windows)
  3. Install and start Tropy Beta
  4. At the new project window opens use Cmd+O or Ctrl+O to and select your project file (or a copy of it)

If the project does not open, please let us know. If it does open, all should be fine. After the project file has been migrated it should also open up correctly in Tropy 1.5.0. (and 1.5.1 obviously, which will be released very shortly).


#13

Hi,
just a short feedback on this:
I installed the beta version (on macOS) and my project works fine, with the beta version as well as with 1.5.0.
Thanks for the help.
Best,
Tobias


#14

Hi to all
It worked perfectly with the beta version (all preferences “lost”, but I guess it is normal), and the test file opened then perfectly with 1.5.0
Great
Thanks for the quick update
Best
Nicolas