[MacOS Sonoma 14.1.1, Gramps 5.1.6, Gramps Web API 1.5.0, Gramps.js 23.12.0]
I am running Gramps Web using Docker Compose on a Linux Ubuntu server. Gramps Web appears to work fine.
After downloading and installing the default app package for Gramps on Mac OS and installing the Gramps Web Sync Add-On, I try to connect to the web server using owner credentials but get the error message “Error connecting to server” without further details.
The complete URL to base server, username, and password are correct.
Using the wrong password yields the same error message.
I find no entries in the Mac Console app.
The request does not appear to reach the Gramps Web server as there are
No entries in the Apache2 error or access log.
No entries in the docker logs (docker-compose logs).
I would be most grateful if anybody has a tip on how to debug the connectivity issue.
Specifically, I wonder how to get more information out from the local Gramps app running on my Mac. Is there a way to debug Add-Ons to see why the connection fails?
I guess one option would be to run Gramps from the command line, but I was hoping to use the default App package…
As this is a Gramps Web issue and its creator @DavidMStraub is currently the only person experienced enough to do support, let’s wait for him to weigh in. (Reasonably, the holidays might cause a bit of delay.)
It’s hard to say if all the settings are correct; unfortunately the exact error is currently not logged, but you could manually add a log statement where the error is handled in the code (except URLError).
@Nick-Hall , @prculley , @SNoiraud : This could be a good reference example for how to properly add Debugging gramps51.log functionality to a module that already has GUI error reporting but no actionable tracelog. (“Properly” as in recognizing the --debugcommand line to output in-depth info only when desired. And when running normally, not impact normal processing load with excessive logging.)
I have the same problem with Gramps 1.5.6 on MacOS 14.3 Sonoma and Webgramps. With Gramps 1.5.6 on Windows 10 (VM on the very same Mac) the synchronization works flawlessly. So I guess it is a problem with the sync plugin on MacOS.
Neophyte or not, I am actually a developer, just not very experienced in Python and specifically I don’t know Gramps. Tried to get the a developer environment running but in the end it turned out to be too much of hassle… else I would have submitted a patch.
Instead I will just do some very simple dry-coding.
The error message can be matched to line 429 where the root cause is swallowed and not communicated to the user. This should be fixed by updating the statement to something like:
self.handle_error(_("Error connecting to server: %s") % exc.reason)
In addition, the suggestion by @emyoulation of using this as an example on where to add proper logging, sounds like an excellent idea.
In my opinion, each step of the synchronisation process should be traced at debug level where some key steps are logged at info level. For generic, top level exceptions like the URLError on line 429 you might also consider logging the traceback, as it could shed additional light to what the error actually is, if not evident from the reason property.
My five cents, and as said, would have been happy to submit a patch, if only it had been easier to get a local environment up and running.
Happy to take another swing at this if anyone has a step by step way to do it. I do love Gramps web terminal but I wonder if using the full desktop version would allow me do some things I can’t do in the web app.