Export to Omeka s on Ubuntu

Hello!
I have Tropy 1.15.2 (x64) installed. When export to Omeka s v4.1.0-rc, the log say:
“level”:30,“time”:1710750799163,“type”:“renderer”,“name”:“project”,“plugin”:“tropy-plugin-omeka-v2.0.1”,“msg”:“Connecting to API…”}
{“level”:50,“time”:1710750799279,“type”:“renderer”,“name”:“project”,“plugin”:“tropy-plugin-omeka-v2.0.1”,“stack”:“TypeError: Failed to fetch\n
at http (/xxx/xxxx/.config/tropy/plugins/tropy-plugin-omeka-v2.0.1/index.js:144:21)\n
at OmekaApi$1.request (/xxx/xxxx/.config/tropy/plugins/tropy-plugin-omeka-v2.0.1/index.js:216:12)\n
at OmekaApi$1.get (/xxx/xxxx/.config/tropy/plugins/tropy-plugin-omeka-v2.0.1/index.js:220:17)\n
at OmekaApi$1.getProperties (/xxx/xxxx/.config/tropy/plugins/tropy-plugin-omeka-v2.0.1/index.js:239:31)\n
at Plugin.export (/xxx/xxxxx/.config/tropy/plugins/tropy-plugin-omeka-v2.0.1/index.js:503:17)”,“msg”:“Could not connect to API: http://213.188.153.202/api”}
{“level”:40,“time”:1710751287786,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: note.export#40”}

Can anyone help with the errors, Thanks!

I think there’s a problem with the certificate used by your Omeka instance that makes it impossible for the plugin to establish a connection. When trying to connect I get the error code ‘UNABLE_TO_VERIFY_LEAF_SIGNATURE’.

I do have a self signed certificate on the server. Does tropy can come around this somehow? Thanks for help!

Dann

The plugin is using the Fetch API so basically it will work to establish the connection if you can connect with the browser without adding any security exceptions. There’s no easy way for you to add an exception in Tropy.

The two best options are probably to use a different certificate (you can get certificates for free from Let’s Encrypt) or to allow HTTP on your server and connect the plugin this way. I’d definitely recommend the former, because if you connect via HTTP it means your data, including the Omeka API key, would be sent in the clear.

I reconfigured apache2 and use http now. The Tropy responds with the same message. Any new suggestions? Thanks!

Can you post the log again? The request that failed previously works fine using HTTP (from my location anyway) so it’s probably a slightly different error message.

Hej!
It actually exporting images, but it encounters this error.
{“level”:50,“time”:1710850829139,“type”:“renderer”,“name”:“project”,“plugin”:“tropy-plugin-omeka-v2.0.1”,“stack”:“SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "… is not valid JSON”,“msg”:“Failed to export item "822034198"”}
{“level”:40,“time”:1710850829139,“type”:“renderer”,“name”:“project”,“msg”:“SLOW: item.export#76”}

Can you check on the Omeka side where this happens? It looks like the plugin received an HTML page instead of an expected JSON response. I would guess that this is probably an error page because something went wrong during the import in Omeka.

Now it works when I changed the image. Not sure what error it was.
Thanks, finally it works after deleting ssl certificate on the server.
All the best for the future improvement on Tropy!