remindersdevs / Reminders

An open source reminder app
GNU General Public License v3.0
127 stars 19 forks source link

[Bug]: Can't connect to CalDAV server #61

Open meybonomme opened 11 months ago

meybonomme commented 11 months ago

Package

Flathub Beta

Distribution

Fedora 39

Describe the bug

I made account to https://nch.pl/ Nextcloud server and Gnome Online accounts connects successfully to this server. With the same server and login info I can't connect Reminders to CalDAV server. Sign in button does nothing, there is no any errors in GUI.

With terminal I have following output when pressing to Sign in button:

Traceback (most recent call last):
  File "/app/lib/python3.10/site-packages/remembrance/browser/caldav_sign_in.py", line 71, in sign_in
    self.caldav_sign_in(name, url, username, password)
  File "/app/lib/python3.10/site-packages/remembrance/browser/caldav_sign_in.py", line 46, in caldav_sign_in
    raise error
  File "/app/lib/python3.10/site-packages/remembrance/browser/caldav_sign_in.py", line 40, in caldav_sign_in
    self.app.run_service_method('CalDAVLogin', GLib.Variant('(ssss)', (name, url, username, password)), show_error_dialog=False)
  File "/app/lib/python3.10/site-packages/remembrance/browser/application.py", line 377, in run_service_method
    raise error
  File "/app/lib/python3.10/site-packages/remembrance/browser/application.py", line 343, in run_service_method
    retval = self.service.call_sync(
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.Failed: PropfindError at '405 Method Not Allowed

b''', reason no reason - Method <bound method Reminders.login_caldav of <remembrance.service.backend.Reminders object at 0x7f9e4ec37ac0>> failed to execute
Traceback (most recent call last):
  File "/app/lib/python3.10/site-packages/remembrance/service/backend.py", line 786, in _on_method_call
    retval = method(*args, **kwargs)
  File "/app/lib/python3.10/site-packages/remembrance/service/backend.py", line 1756, in login_caldav
    user_id = self.caldav.login(name, url, username, password)
  File "/app/lib/python3.10/site-packages/remembrance/service/caldav.py", line 92, in login
    self.principals[user_id] = DAVClient(url, None, username, password).principal()
  File "/app/lib/python3.10/site-packages/caldav/davclient.py", line 411, in principal
    self._principal = Principal(client=self, *largs, **kwargs)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 480, in __init__
    cup = self.get_property(dav.CurrentUserPrincipal())
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 210, in get_property
    foo = self.get_properties([prop], **passthrough)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 235, in get_properties
    response = self._query_properties(props, depth)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 171, in _query_properties
    return self._query(root, depth)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 202, in _query
    raise error.exception_by_method[query_method](errmsg(ret))
caldav.lib.error.PropfindError: PropfindError at '405 Method Not Allowed

b''', reason no reason
 (0)

What is wrong in this case?

To Reproduce

  1. Open Reminders
  2. Open Preferences
  3. Open CalDAV -> Add account
  4. Fill fields with Nextcloud creditenials
  5. Click to the "Sign in" button
  6. Nothing changes in GUI side, no errors
  7. Account is not included and there is no CalDAV connection to sync

Logs

No response

Additional context

No response

meybonomme commented 11 months ago

Figured out that right and working WebDAV address is under the Nextcloud calendar settings in my case this is https://nch.pl/remote.php/dav not primary Nextcloud server address https://nch.pl/

With wrong creditenials there must be some visible error.

meybonomme commented 11 months ago

When I try to mark Nextcloud demo tasks to complete within Reminders "Something went wrong" window pops up:

Traceback (most recent call last):
  File "/app/lib/python3.10/site-packages/remembrance/service/backend.py", line 575, in _do_remote_update_completed
    self._remote_set_completed(reminder_id, reminder_dict)
  File "/app/lib/python3.10/site-packages/remembrance/service/backend.py", line 686, in _remote_set_completed
    self._caldav_set_completed(reminder_id, reminder_dict)
  File "/app/lib/python3.10/site-packages/remembrance/service/backend.py", line 740, in _caldav_set_completed
    new_uid, task = self.caldav.complete_task(user_id, list_uid, task_id, completed_timestamp)
  File "/app/lib/python3.10/site-packages/remembrance/service/caldav.py", line 223, in complete_task
    raise error
  File "/app/lib/python3.10/site-packages/remembrance/service/caldav.py", line 211, in complete_task
    todo.complete(handle_rrule=False)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 2635, in complete
    self.save()
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 2184, in save
    self._create(id=self.id, path=path)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 2056, in _create
    self._put()
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 2047, in _put
    return self._put(False)
  File "/app/lib/python3.10/site-packages/caldav/objects.py", line 2049, in _put
    raise error.PutError(errmsg(r))
caldav.lib.error.PutError: PutError at '404 Not Found

b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n  <s:exception>Sabre\\DAV\\Exception\\NotFound</s:exception>\n  <s:message>Node with name \'stack-1771.ics\' could not be found</s:message>\n</d:error>\n'', reason no reason