Tropy Links Not Behaving as Expected

I’m running Tropy 1.16.2 on Windows 11.

I think a bug might have been introduced with version 1.16.2. When Tropy is closed and I click a tropy:// link (for example, in Microsoft Word), Tropy opens but the photo or item that was linked to doesn’t come up. I have to click it a second time to make it work.

Bumping this post from December 2024 because it hasn’t been responded to yet.

1.16.2 indeed has a protocol related regression, I reported a similar bug days ago.

Is this what you are experiencing as well?

It would make sense for this to be a related bug. It’s not the same, but it’s similar. And I’m experiencing the bug you described too.

Hm, I think this should be the same bug, but I’ll double check. Thanks for bumping this!

@inukshuk Is there a target date for releasing this fix as a minor 1.16.X version?

I hope we’ll be able to do a first 17.x release towards the end of September that will include this fix.

1 Like

Just an update to say that this bug still exists in 1.17.1.

Odd, it works fine for me on Linux and macOS. I’ll check Windows at the next opportunity.

Meanwhile, can you try this again: copy the link to a photo, then make sure a different item is selected and close Tropy, open the link from the OS, and observe the behavior (did the project open? is the previously selected item selected or the one from the link? is the photo selected? are we in project or item view?); now open the link from the OS a second time and, observe the behavior and save and post the log file at this point. Thanks!

It also works for me in Windows 10, e.g., paste URL into Window Explorer location bar and hit enter. Maybe it’s Windows 11 specific?

Maybe it is specific to Windows 11… Here is what I did.

  1. Copied the link to a photo, selected a different item, and closed Tropy.
  2. Opened the link from the OS by pasting the URL into the Windows Explorer location bar and hitting enter.
  3. Observed the behavior. (Tropy opened. The project opened. The previously selected item was selected, not the one from the link. We are in item view.)
  4. Opened the link from the OS a second time
  5. Observed the behavior. (Now, the item from the link comes up. The correct photo is selected. We are in item view.)
  6. Copied the contents of the log file. Here they are:

{“level”:30,“time”:1762530710104,“type”:“browser”,“name”:“main”,“args”:[“tropy://project/current/items/23749/4117”],“opts”:{“env”:“production”,“autoUpdates”:true,“contextIsolation”:true,“disableHardwareAcceleration”:false,“verbose”:false,“trace”:false,“data”:“C:\Users\Daniel\AppData\Roaming\Tropy”,“cache”:“C:\Users\Daniel\AppData\Roaming\Tropy\cache”,“logs”:“C:\Users\Daniel\AppData\Roaming\Tropy\log”},“version”:“1.17.1”,“msg”:“main.init 1.17.1 Windows_NT 10.0.26200 (x64)”}
{“level”:30,“time”:1762530710149,“type”:“browser”,“name”:“main”,“msg”:“plugins scanned: 1”}
{“level”:30,“time”:1762530710152,“type”:“browser”,“name”:“main”,“msg”:“app state restored”}
{“level”:30,“time”:1762530710153,“type”:“browser”,“name”:“main”,“msg”:“opening url tropy://project/current/items/23749/4117”}
{“level”:30,“time”:1762530710154,“type”:“browser”,“name”:“main”,“file”:“D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Early Modern Archives.tpy”,“msg”:“open new project window”}
{“level”:30,“time”:1762530710475,“type”:“renderer”,“name”:“project”,“dpx”:1.125,“args”:{“frameless”:true,“locale”:“en”,“rendererPreference”:null,“zoom”:0.75},“msg”:“project.init”}
{“level”:30,“time”:1762530710512,“type”:“browser”,“name”:“main”,“status”:{“2d_canvas”:“enabled”,“direct_rendering_display_compositor”:“disabled_off_ok”,“gpu_compositing”:“enabled”,“multiple_raster_threads”:“enabled_on”,“opengl”:“enabled_on”,“rasterization”:“enabled”,“raw_draw”:“disabled_off_ok”,“skia_graphite”:“disabled_off”,“trees_in_viz”:“disabled_off”,“video_decode”:“enabled”,“video_encode”:“enabled”,“vulkan”:“disabled_off”,“webgl”:“enabled”,“webgl2”:“enabled”,“webgpu”:“enabled”,“webnn”:“disabled_off”},“msg”:“gpu-info-update”}
{“level”:30,“time”:1762530710515,“type”:“browser”,“name”:“main”,“status”:{“2d_canvas”:“enabled”,“direct_rendering_display_compositor”:“disabled_off_ok”,“gpu_compositing”:“enabled”,“multiple_raster_threads”:“enabled_on”,“opengl”:“enabled_on”,“rasterization”:“enabled”,“raw_draw”:“disabled_off_ok”,“skia_graphite”:“disabled_off”,“trees_in_viz”:“disabled_off”,“video_decode”:“enabled”,“video_encode”:“enabled”,“vulkan”:“disabled_off”,“webgl”:“enabled”,“webgl2”:“enabled”,“webgpu”:“enabled”,“webnn”:“disabled_off”},“msg”:“gpu-info-update”}
{“level”:30,“time”:1762530710582,“type”:“renderer”,“name”:“project”,“msg”:“plugins scanned: 1”}
{“level”:30,“time”:1762530710592,“type”:“renderer”,“name”:“project”,“msg”:“plugins loaded: 1”}
{“level”:30,“time”:1762530710809,“type”:“renderer”,“name”:“project”,“mode”:“w+”,“msg”:“open db C:\Users\Daniel\AppData\Roaming\Tropy\ontology.db”}
{“level”:30,“time”:1762530710813,“type”:“renderer”,“name”:“project”,“msg”:“restoring projectFiles@tropy”}
{“level”:30,“time”:1762530710831,“type”:“renderer”,“name”:“project”,“msg”:“restoring recent@tropy”}
{“level”:30,“time”:1762530710831,“type”:“renderer”,“name”:“project”,“msg”:“restoring settings@tropy”}
{“level”:30,“time”:1762530710832,“type”:“renderer”,“name”:“project”,“msg”:“restoring ui@tropy”}
{“level”:30,“time”:1762530710973,“type”:“renderer”,“name”:“project”,“renderer”:“webgl”,“resolution”:1,“msg”:“Esper.instance initialized with webgl renderer”}
{“level”:30,“time”:1762530710977,“type”:“renderer”,“name”:“project”,“msg”:“project ready 771ms [dom:334ms init:52ms load:276ms]”}
{“level”:30,“time”:1762530711160,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Early Modern Archives.tpy”}
{“level”:30,“time”:1762530712092,“type”:“browser”,“name”:“main”,“msg”:“ready after 411.006103515625ms”}
{“level”:40,“time”:1762530712400,“type”:“renderer”,“name”:“project”,“query”:“VACUUM”,“ms”:1191,“msg”:“SLOW: db query took 1191ms”}
{“level”:40,“time”:1762530712969,“type”:“renderer”,“name”:“project”,“query”:“PRAGMA integrity_check(10)”,“ms”:568,“msg”:“SLOW: db query took 568ms”}
{“level”:30,“time”:1762530713106,“type”:“renderer”,“name”:“project”,“msg”:“restoring project.watch@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713106,“type”:“renderer”,“name”:“project”,“msg”:“db query took 135ms”,“query”:“PRAGMA foreign_key_check”,“ms”:135}
{“level”:30,“time”:1762530713108,“type”:“renderer”,“name”:“project”,“msg”:“restoring project.watch@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713109,“type”:“renderer”,“name”:“project”,“msg”:“restoring nav@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713109,“type”:“renderer”,“name”:“project”,“msg”:“restoring notepad@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713109,“type”:“renderer”,“name”:“project”,“msg”:“restoring esper@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713120,“type”:“renderer”,“name”:“project”,“msg”:“restoring imports@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713121,“type”:“renderer”,“name”:“project”,“msg”:“restoring sidebar@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713121,“type”:“renderer”,“name”:“project”,“msg”:“restoring panel@18b045d3-2e99-40af-b231-b7f32b5edd87”}
{“level”:30,“time”:1762530713149,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Early Modern Archives.tpy”}
{“level”:30,“time”:1762530713150,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Early Modern Archives.tpy”}
{“level”:30,“time”:1762530713603,“type”:“renderer”,“name”:“project”,“msg”:“db query took 169ms”,“query”:“\n SELECT id AS photo, item_id AS id\n FROM photos\n LEFT OUTER JOIN trash USING (id)\n WHERE \n deleted IS NULL\n ORDER BY item_id, position”,“ms”:169}
{“level”:40,“time”:1762530714829,“type”:“renderer”,“name”:“project”,“query”:“SELECT id, item_id AS item, template, strftime("%Y-%m-%dT%H:%M:%f", created, "localtime") AS created, strftime("%Y-%m-%dT%H:%M:%f", modified, "localtime") AS modified, angle, color, density, mirror, negative, brightness, contrast, hue, saturation, sharpen, width, height, path, filename, page, size, protocol, mimetype, checksum, orientation FROM subjects JOIN images USING (id) JOIN photos USING (id)”,“ms”:797,“msg”:“SLOW: db query took 797ms”}
{“level”:40,“time”:1762530714847,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: item.load#20”}
{“level”:40,“time”:1762530714854,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: photo.load#21”}
{“level”:40,“time”:1762530715283,“type”:“renderer”,“name”:“project”,“query”:“\n SELECT id, property, text, datatype AS type\n FROM subjects\n JOIN metadata USING (id)\n JOIN metadata_values USING (value_id) ORDER BY id, metadata.created ASC”,“ms”:394,“msg”:“SLOW: db query took 394ms”}
{“level”:40,“time”:1762530715283,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: metadata.load#22”}
{“level”:40,“time”:1762530715601,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: note.load#24”}
{“level”:40,“time”:1762530715603,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: selection.load#23”}
{“level”:40,“time”:1762530715678,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: transcriptions/load#25”}
{“level”:40,“time”:1762530715716,“type”:“renderer”,“name”:“project”,“ms”:2563,“list”:null,“query”:“”,“tags”:false,“trash”:null,“msg”:“SLOW: *search query "" took 2563ms”}
{“level”:40,“time”:1762530716881,“type”:“renderer”,“name”:“project”,“stack”:“Error: ENOENT: no such file or directory, stat ‘D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Mkhitarist Archives in Venice\Boghos Arabian 1r.png’”,“msg”:“failed to open photo D:\Users\Daniel\Documents\Academic\Library\Early Modern Archives\Mkhitarist Archives in Venice\Boghos Arabian 1r.png”}
{“level”:30,“time”:1762530757007,“type”:“browser”,“name”:“main”,“argv”:[“C:\Users\Daniel\AppData\Local\tropy\app-1.17.1\tropy.exe”,“–allow-file-access-from-files”,“–source-app-id”,“tropy://project/current/items/23749/4117”],“cwd”:“C:\WINDOWS\system32”,“msg”:“second-instance”}
{“level”:30,“time”:1762530757007,“type”:“browser”,“name”:“main”,“msg”:“opening url tropy://project/current/items/23749/4117”}
{“level”:30,“time”:1762530770166,“type”:“browser”,“name”:“main”,“msg”:“checking for updates…”}
{“level”:30,“time”:1762530770647,“type”:“browser”,“name”:“main”,“msg”:“no updates available”}
{“level”:30,“time”:1762530830546,“type”:“browser”,“name”:“main”,“status”:{“2d_canvas”:“enabled”,“direct_rendering_display_compositor”:“disabled_off_ok”,“gpu_compositing”:“enabled”,“multiple_raster_threads”:“enabled_on”,“opengl”:“enabled_on”,“rasterization”:“enabled”,“raw_draw”:“disabled_off_ok”,“skia_graphite”:“disabled_off”,“trees_in_viz”:“disabled_off”,“video_decode”:“enabled”,“video_encode”:“enabled”,“vulkan”:“disabled_off”,“webgl”:“enabled”,“webgl2”:“enabled”,“webgpu”:“enabled”,“webnn”:“disabled_off”},“msg”:“gpu-info-update”}

Thanks!

I wonder if it’s maybe a timing issue. Could you try if it works in a really small project, for example with only two items in it?

With a new project with only two items in it, it works as expected. Then I tried again with my first project, leaving it open for an hour to see if it would load the correct photo eventually, and it didn’t – not in that length of time, at least.

What does this indicate to you? Is there any chance of it being fixed eventually?

Thanks! So you were right all long that it’s a different issue: when the project window isn’t open yet, we wait for it to be open before continuing, but there is a fallback to just proceed after 1.5 seconds – which is just too optimistic. So in your case the item/photo gets selected, but the project hasn’t finished loading and so the selection never happens.

Will be fixed in the upcoming patch release.

1 Like