504 server errors reported as "Invalid password", and 5xx error codes repeatedly spam infobars
The problem
This is a situation I encountered with Evolution 3.48.4 and 3.50.0 when the GNOME infrastructure (where various nextcloud accounts are hosted), was completely down some days ago.
When the nextcloud server is down with a 504 HTTP error code, it seems GOA returns the correct error code but Evolution misinterprets it. Evolution's GUI repeatedly gave me these error messages using infobar widgets:
Failed to connect address book
the_username@some_nextcloud_server.org
: work_stuffFailed to lookup credentials: Failed to get password from GOA: Invalid password with username “the_username” (goa-error-quark, 0): Code: 504 — Unexpected response from server
Evolution seems to think that 504 server error codes are "Invalid password with username" like 4xx errors, but that clearly was not a 401/403 error (or others)...
Occasionnally I also got this "technically correct" error message (i.e. it wasn't claiming the credentials were wrong), but still not super helpful to show it repeatedly during a downtime:
Failed to connect
the_username@some_nextcloud_server.org
Failed to get properties: HTTP error code 503 (Service Unavailable): The server responded with an HTML page, which can mean there’s an error on the server or with the client request. The used URI was:
https://some_nextcloud_server.org/remote.php/dav/
In all cases, 5xx errors typically show an error infobar for each affected component and account, so if I have 15 calendars, 5 addressbooks, etc., it seems like I have to dismiss 20 infobars every hour/30 mins/etc. repeatedly (or it certainly felt that way during the downtime) to get those distractions out of my view, which is redundant manual work that users should not have to do.
Ideas for potential solutions
Various ideas that could probably all be used in conjunction:
- Handle 504 (and other 5xx) as such to avoid confusion about credentials;
- Group 5xx errors across accounts to avoid situations where the user needs to dismiss dozens of them
- Evolution should probably consider the server as temporarily offline in those cases, make the account behave in offline mode and not bother the user more than once a day about it (especially not for each and every account/calendar/addressbook, especially if the user has already dismissed/acknowledged the error).
- Auto-clear errors: When the server is detected as back online, maybe Evolution could auto-clear the 5xx infobars (if any) and show a transient desktop notification (like the notifications for mails being received, but only transient and without needing to be manually dismissed by the user)