uniuuu / zotprime

Fully packaged on-premise Zotero platform
https://www.zotero.org
GNU General Public License v3.0
71 stars 7 forks source link

500 error with Windows client #3

Closed jgerster-wetec closed 1 year ago

jgerster-wetec commented 1 year ago

Thank you @uniuuu for your efforts - I have setup the server (Zotprime 2.0.8-beta) on WSL2 and built the Windows client according to the instructions in the README.

When running the Windows client and connecting with the default user (admin) and password (admin), I end up with below JavaScript Error in the Error Console: grafik

@uniuuu Have you tested the Windows client so far? Any ideas what might be wrong with my setup?

uniuuu commented 1 year ago

Hi @jgerster-wetec

Thank you for your message and testing done. I have seen this error when client was registered with another dataserver and I tried to run it on newly created dataserver. If this is the case then clicking on "Unlink Account..." and then sign in again usually resolves this issue. Screenshot_2023-04-30_18-57-49

The way to troubleshoot is to run docker logs. Currently all basic debuggers are still enabled in this version so we can see comprehensive output. docker compose logs -f app-zotprime-dataserver Try to close and re-launch client and see if there any php warning/error generated. Please let me know what are errors/warnings in that case.

I have tested Linux client only up to now. The testing of windows client is in queue.

jgerster-wetec commented 1 year ago

Perfect, with your hints I managed to solve the problem.

The dataserver logs showed this output:

zotprime-app-zotprime-dataserver-1  | 172.18.0.1 - - [30/Apr/2023:17:58:03 +0200] "POST /keys HTTP/1.1" 500 17 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Zotero/6.0.27.SOURCE.2f0d41c0c"
zotprime-app-zotprime-dataserver-1  | [Sun Apr 30 17:58:33.854264 2023] [php:notice] [pid 32] [client 172.18.0.1:33824] Unknown database 'zotero_master'\n\nShard: 0\n\nQuery:\nSELECT value FROM settings WHERE name='schemaVersion'\n\nParams:\nArray\n(\n)\n\n\n\n\nShard: 0\n\nQuery:\nSELECT value FROM settings WHERE name='schemaVersion'\n\nParams:\n\n\n in /var/www/zotero/include/DB.inc.php:1308 (Version: 6.0.27.SOURCE.2f0d41c0c POST /keys) (332b9a6d5f)

This led me to https://github.com/FiligranHQ/zotprime/issues/13 - so the problem was actually not related to the Windows client but I just forgot to run the init.sh script as mentioned in the repo.

Thanks @uniuuu for your quick assistance - I will continue to test the Windows client and let you know if there is any issues.

uniuuu commented 1 year ago

Hi @jgerster-wetec Thank you for your update. Please note in case server has been completely reinstalled while client was re-linked with it's account to the new server then there might occur error [JavaScript Error: "_libraryStorageVersion cannot decrease" {file: "chrome://zotero/content/xpcom/data/library.js" In such case the solution is to unlink client account with removal of the data stored on computer See screenshot below: image

In case your client has data already stored locally in your PC then it has to be exported/backup as after the above operation the client will be empty and all data lost.