Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url connection failure on org-caldav-check-dav but url works #209

Closed
dschwilk opened this issue Apr 28, 2020 · 9 comments
Closed

url connection failure on org-caldav-check-dav but url works #209

dschwilk opened this issue Apr 28, 2020 · 9 comments

Comments

@dschwilk
Copy link

dschwilk commented Apr 28, 2020

I have a puzzling problem after nextcloud and emacs upgrades

I have successfully been using org-caldav to sync with my nextcloud calendars for about 1 year. I recently upgraded my machine (os, emacs and nextcloud changed) and I now have trouble, but only with org-caldav. Syncing my android devices works and sending OPTION request with
curl returns the correct DAV header information.

I assume this is probably due to some change in nextcloud but perhaps someone here can help me diagnose this?

System is Kubuntu 20.04, nextcloud 18.04, emacs 26.3, org-mode 9.6.3

The failure

  • Message buffer:
Contacting host: example.org:443 [2 times]
progn: Error while checking for OPTIONS at URL https://example.org/nextcloud/remote.php```/dav/calendars/username/personal/: 404 Not Found
  • org-caldav-debug buffer:
Syncing first calendar entry:
(:calendar-id "personal" :files ("~/org/personal.org") :inbox "~/org/personal-cal-inbox.org" :skip-conditions (nottimestamp))
Check connection for https://example.org/nextcloud/remote.php/dav/calendars/username/personal/.
Got error while checking connection (will try again):
(error "Error while checking for OPTIONS at URL https://example.org/nextcloud/remote.php/dav/calendars/username/personal/: 404 Not Found")

The page returned is this:

HTTP/1.1 404 Not Found
Date: Tue, 28 Apr 2020 18:24:52 GMT
Server: Apache/2.4.41 (Ubuntu)
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Security-Policy: default-src 'none';
Content-Length: 238
Keep-Alive: timeout=5, max=95
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>File with name /calendars could not be located</s:message>
</d:error>

But the calendar url works:

> curl -D - -X OPTIONS --basic -u username:password https://example.org/nextcloud/remote.php/dav/calendars/username/personal
HTTP/1.1 200 OK
Date: Tue, 28 Apr 2020 14:47:11 GMT
Server: Apache/2.4.41 (Ubuntu)
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
Set-Cookie: oc7560nmwcl0=n0hl0n2827e8ctcblap2pdgXXX; path=/nextcloud; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=WFQL1x74d73gkdw5CFKv%2BViqMEGkK0Kt%2FXJp7PKng4eF1VSDGtsHhLGuRH8UKQQ9Rkbu613ufNBQDR4mv06f9YJvkYBEH2Upg7qrq9dS9bjAIgT8X1E6Cs4sQZihwtSV; path=/nextcloud; secure; HttpOnly
Content-Security-Policy: default-src 'none';
Set-Cookie: nc_sameSiteCookielax=true; path=/nextcloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/nextcloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: oc7z3znmwcl0=7e3uq2lqshf6l75m45nd95e3is; path=/nextcloud; secure; HttpOnly
Set-Cookie: cookie_test=test; expires=Tue, 28-Apr-2020 15:47:11 GMT; Max-Age=3600
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendar-availability, nc-calendar-webcal-cache, calendarserver-subscribed, oc-resource-sharing, oc-calendar-publishing, calendarserver-sharing, nc-calendar-search, nc-enable-birthday-calendar
MS-Author-Via: DAV
Accept-Ranges: bytes
Content-Length: 0
Content-Type: text/html; charset=UTF-8

A clue?

.authinfo.gpg works for email, mu4e, etc and has always worked for org-caldav. But setting auth-source-debug t does not add information to the message buffer when I call org-caldav-sync. I do get messages from auth-source when using my email through mu4e. I've tried regular auth-source with .authinfo.gpg and auth-source-pass putting the secretes in a file named by host. same result.

Error backtrace from debug-on-error:

Debugger entered--Lisp error: (error "Error while checking for OPTIONS at URL https://example.org/nextcloud/remote.php/dav/calendars/username/personal/: 404 Not Found")
  signal(error ("Error while checking for OPTIONS at URL https://example.org/nextcloud/remote.php/dav/calendars/username/personal/: 404 Not Found"))
  error("Error while checking for OPTIONS at URL %s: %s" "https://example.org/nextcloud/remote.php/dav/calendars/username/personal/" "404 Not Found")
  (progn (switch-to-buffer buffer) (error "Error while checking for OPTIONS at URL %s: %s" url response))
  (if (not (string-match "2[0-9][0-9].*" response)) (progn (switch-to-buffer buffer) (error "Error while checking for OPTIONS at URL %s: %s" url response)))
  (let ((response (match-string 1))) (if (not (string-match "2[0-9][0-9].*" response)) (progn (switch-to-buffer buffer) (error "Error while checking for OPTIONS at URL %s: %s" url response))))
  (save-current-buffer (set-buffer buffer) (if (= 0 (buffer-size)) (progn (error "Not data received for URL %s (maybe TLS problem)." url))) (goto-char (point-min)) (if (not (re-search-forward "^HTTP[^ ]* \\([0-9]+ .*\\)$" (point-at-eol) t)) (progn (switch-to-buffer buffer) (error "No valid HTTP response from URL %s." url))) (let ((response (match-string 1))) (if (not (string-match "2[0-9][0-9].*" response)) (progn (switch-to-buffer buffer) (error "Error while checking for OPTIONS at URL %s: %s" url response)))) (mail-narrow-to-head) (let ((davheader (mail-fetch-field "dav"))) (if (not davheader) (progn (switch-to-buffer buffer) (error "The URL %s does not accept DAV requests" url)))))
  (let* ((buffer (org-caldav-url-retrieve-synchronously url "OPTIONS")) (header nil) (options nil)) (if (not buffer) (progn (error "Retrieving URL %s failed." url))) (save-current-buffer (set-buffer buffer) (if (= 0 (buffer-size)) (progn (error "Not data received for URL %s (maybe TLS problem)." url))) (goto-char (point-min)) (if (not (re-search-forward "^HTTP[^ ]* \\([0-9]+ .*\\)$" (point-at-eol) t)) (progn (switch-to-buffer buffer) (error "No valid HTTP response from URL %s." url))) (let ((response (match-string 1))) (if (not (string-match "2[0-9][0-9].*" response)) (progn (switch-to-buffer buffer) (error "Error while checking for OPTIONS at URL %s: %s" url response)))) (mail-narrow-to-head) (let ((davheader (mail-fetch-field "dav"))) (if (not davheader) (progn (switch-to-buffer buffer) (error "The URL %s does not accept DAV requests" url))))))
  org-caldav-check-dav("https://example.org/nextcloud/remote.php/dav/calendars/username/personal/")
  org-caldav-check-connection()
  (if (= numretry (1- org-caldav-retry-attempts)) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry (1+ numretry)))
  (condition-case err (progn (org-caldav-check-connection) (setq success t)) (error (if (= numretry (1- org-caldav-retry-attempts)) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry (1+ numretry)))))
  (while (null success) (condition-case err (progn (org-caldav-check-connection) (setq success t)) (error (if (= numretry (1- org-caldav-retry-attempts)) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry (1+ numretry))))))
  (let ((numretry 0) success) (while (null success) (condition-case err (progn (org-caldav-check-connection) (setq success t)) (error (if (= numretry (1- org-caldav-retry-attempts)) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry (1+ numretry)))))))
  (lambda nil (if (org-caldav-sync-do-org->cal) (progn (let ((--dolist-tail-- (org-caldav-get-org-files-for-sync)) filename) (while --dolist-tail-- (setq filename (car --dolist-tail--)) (if (not (file-exists-p filename)) (progn (if ... ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (if (org-caldav-use-oauth2) (progn (org-caldav-check-oauth2 org-caldav-url) (org-caldav-retrieve-oauth2-token org-caldav-url org-caldav-calendar-id))) (let ((numretry 0) success) (while (null success) (condition-case err (progn (org-caldav-check-connection) (setq success t)) (error (if (= numretry (1- org-caldav-retry-attempts)) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry (1+ numretry))))))) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files (progn (let ((missing (cl-set-difference org-caldav-previous-files org-caldav-files :test ...))) (if (and missing (not ...)) (progn (user-error "Sync aborted")))))) (let ((--dolist-tail-- org-caldav-event-list) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (if (eq (org-caldav-event-status cur) (quote ignored)) nil (org-caldav-event-set-status cur nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if (org-caldav-sync-do-org->cal) (progn (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-eventdb-from-cal)))) (if (org-caldav-sync-do-org->cal) (progn (org-caldav-update-events-in-cal org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-events-in-org))) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn (save-current-buffer (set-buffer org-caldav-ics-buffer) (set-buffer-modified-p nil) (kill-buffer)) (delete-file (buffer-file-name org-caldav-ics-buffer)))))()
  funcall((lambda nil (if (org-caldav-sync-do-org->cal) (progn (let ((--dolist-tail-- (org-caldav-get-org-files-for-sync)) filename) (while --dolist-tail-- (setq filename (car --dolist-tail--)) (if (not ...) (progn ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (if (org-caldav-use-oauth2) (progn (org-caldav-check-oauth2 org-caldav-url) (org-caldav-retrieve-oauth2-token org-caldav-url org-caldav-calendar-id))) (let ((numretry 0) success) (while (null success) (condition-case err (progn (org-caldav-check-connection) (setq success t)) (error (if (= numretry ...) (org-caldav-check-connection) (org-caldav-debug-print 1 "Got error while checking connection (will try again):" err) (setq numretry ...)))))) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files (progn (let ((missing ...)) (if (and missing ...) (progn ...))))) (let ((--dolist-tail-- org-caldav-event-list) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (if (eq (org-caldav-event-status cur) (quote ignored)) nil (org-caldav-event-set-status cur nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if (org-caldav-sync-do-org->cal) (progn (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-eventdb-from-cal)))) (if (org-caldav-sync-do-org->cal) (progn (org-caldav-update-events-in-cal org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-events-in-org))) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn (save-current-buffer (set-buffer org-caldav-ics-buffer) (set-buffer-modified-p nil) (kill-buffer)) (delete-file (buffer-file-name org-caldav-ics-buffer))))))
  (let ((org-caldav-skip-conditions (quote (nottimestamp))) (org-caldav-inbox (quote "~/org/personal-cal-inbox.org")) (org-caldav-files (quote ("~/org/personal.org"))) (org-caldav-calendar-id (quote "personal"))) (funcall (quote (lambda nil (if (org-caldav-sync-do-org->cal) (progn (let (... filename) (while --dolist-tail-- ... ... ...)))) (if (org-caldav-use-oauth2) (progn (org-caldav-check-oauth2 org-caldav-url) (org-caldav-retrieve-oauth2-token org-caldav-url org-caldav-calendar-id))) (let ((numretry 0) success) (while (null success) (condition-case err (progn ... ...) (error ...)))) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files (progn (let ... ...))) (let ((--dolist-tail-- org-caldav-event-list) cur) (while --dolist-tail-- (setq cur ...) (if ... nil ...) (setq --dolist-tail-- ...))) (if (org-caldav-sync-do-org->cal) (progn (setq org-caldav-ics-buffer ...) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-eventdb-from-cal)))) (if (org-caldav-sync-do-org->cal) (progn (org-caldav-update-events-in-cal org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-events-in-org))) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn (save-current-buffer (set-buffer org-caldav-ics-buffer) (set-buffer-modified-p nil) (kill-buffer)) (delete-file (buffer-file-name org-caldav-ics-buffer))))))))
  eval((let ((org-caldav-skip-conditions (quote (nottimestamp))) (org-caldav-inbox (quote "~/org/personal-cal-inbox.org")) (org-caldav-files (quote ("~/org/personal.org"))) (org-caldav-calendar-id (quote "personal"))) (funcall (quote (lambda nil (if (org-caldav-sync-do-org->cal) (progn (let ... ...))) (if (org-caldav-use-oauth2) (progn (org-caldav-check-oauth2 org-caldav-url) (org-caldav-retrieve-oauth2-token org-caldav-url org-caldav-calendar-id))) (let ((numretry 0) success) (while (null success) (condition-case err ... ...))) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files (progn ...)) (let (... cur) (while --dolist-tail-- ... ... ...)) (if (org-caldav-sync-do-org->cal) (progn ... ...)) (if (org-caldav-sync-do-cal->org) (progn ...))) (if (org-caldav-sync-do-org->cal) (progn (org-caldav-update-events-in-cal org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-events-in-org))) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn (save-current-buffer ... ... ...) (delete-file ...))))))))
  (let* ((syms (mapcar (quote org-caldav-var-for-key) calkeys)) (vals calvalues) (body (function (lambda nil (if (org-caldav-sync-do-org->cal) (progn (let ... ...))) (if (org-caldav-use-oauth2) (progn (org-caldav-check-oauth2 org-caldav-url) (org-caldav-retrieve-oauth2-token org-caldav-url org-caldav-calendar-id))) (let ((numretry 0) success) (while (null success) (condition-case err ... ...))) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files (progn ...)) (let (... cur) (while --dolist-tail-- ... ... ...)) (if (org-caldav-sync-do-org->cal) (progn ... ...)) (if (org-caldav-sync-do-cal->org) (progn ...))) (if (org-caldav-sync-do-org->cal) (progn (org-caldav-update-events-in-cal org-caldav-ics-buffer))) (if (org-caldav-sync-do-cal->org) (progn (org-caldav-update-events-in-org))) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn (save-current-buffer ... ... ...) (delete-file ...)))))) (binds nil)) (while syms (setq binds (cons (list (car-safe (prog1 syms (setq syms ...))) (list (quote quote) (car-safe (prog1 vals ...)))) binds))) (eval (list (quote let) binds (list (quote funcall) (list (quote quote) body)))))
  (progn (let* ((syms (mapcar (quote org-caldav-var-for-key) calkeys)) (vals calvalues) (body (function (lambda nil (if (org-caldav-sync-do-org->cal) (progn ...)) (if (org-caldav-use-oauth2) (progn ... ...)) (let (... success) (while ... ...)) (if resume nil (setq org-caldav-event-list nil org-caldav-previous-files nil) (org-caldav-load-sync-state) (if org-caldav-previous-files ...) (let ... ...) (if ... ...) (if ... ...)) (if (org-caldav-sync-do-org->cal) (progn ...)) (if (org-caldav-sync-do-cal->org) (progn ...)) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if (org-caldav-sync-do-org->cal) (progn ... ...))))) (binds nil)) (while syms (setq binds (cons (list (car-safe (prog1 syms ...)) (list (quote quote) (car-safe ...))) binds))) (eval (list (quote let) binds (list (quote funcall) (list (quote quote) body))))))
  (let (calkeys calvalues oauth-enable) (let ((--dolist-tail-- (number-sequence 0 (1- (length calendar)) 2)) i) (while --dolist-tail-- (setq i (car --dolist-tail--)) (setq calkeys (append calkeys (list (nth i calendar))) calvalues (append calvalues (list (nth (1+ i) calendar)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (progn (let* ((syms (mapcar (quote org-caldav-var-for-key) calkeys)) (vals calvalues) (body (function (lambda nil (if ... ...) (if ... ...) (let ... ...) (if resume nil ... ... ... ... ... ...) (if ... ...) (if ... ...) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (if ... ...)))) (binds nil)) (while syms (setq binds (cons (list (car-safe ...) (list ... ...)) binds))) (eval (list (quote let) binds (list (quote funcall) (list (quote quote) body)))))))
  org-caldav-sync-calendar((:calendar-id "personal" :files ("~/org/personal.org") :inbox "~/org/personal-cal-inbox.org" :skip-conditions (nottimestamp)))
  (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- org-caldav-calendars) calendar) (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (if (null org-caldav-calendars) (org-caldav-sync-calendar) (let ((--dolist-tail-- org-caldav-calendars) calendar) (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (if (and org-caldav-event-list (not (eq org-caldav-resume-aborted (quote never))) (or (eq org-caldav-resume-aborted (quote always)) (and (eq org-caldav-resume-aborted (quote ask)) (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")))) (org-caldav-sync-calendar org-caldav-previous-calendar t) (setq org-caldav-sync-result nil) (if (null org-caldav-calendars) (org-caldav-sync-calendar) (let ((--dolist-tail-- org-caldav-calendars) calendar) (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--))))))
  org-caldav-sync()
  funcall-interactively(org-caldav-sync)
  call-interactively(org-caldav-sync record nil)
  command-execute(org-caldav-sync record)
  counsel-M-x-action("org-caldav-sync")
  ivy-call()
  ivy-read("M-x " [shr-image-fetched connection-failed diary-included-files epg-context-signers locals 0 rng-what-schema vc-git-stash-snapshot noheader tls-format-message tramp-adb-parse-device-names tramp-find-user bbdb-current-record duplicate magit-wip-buffer-backed-up gnus-info-set-score tramp-gvfs-handle-copy-file desktop-lazy-create-buffer gnus-agent-group-covered-p vc-src-log-switches prequery ess-inside-comment-p web-mode-warning-face local-only cl-print--preprocess matched-string font-name-1 counsel-evil-register-face org-agenda-regexp-filter-preset vc-git-conflicted-files 0 post-deadline ---- shr-parse-image-data \" quality message-kill-actions time-format & \' nnoo-import-1 gnus-summary-catchup-from-here tramp-cache-data rx-trans-forms Original\ sort magit-diff-wash-hunk not-at-beginning-of-line log-edit-set-header mu4e-view-image-max-height doc-view-pdf/ps->png ...] :predicate #f(compiled-function (sym) #<bytecode 0x1bf3121>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)
@dschwilk
Copy link
Author

dschwilk commented Apr 28, 2020

This does seem to be be a bug in emacs auth-source or url stuff. See this reddit thread I found: https://www.reddit.com/r/emacs/comments/dct8vl/help_debug_orgcaldav_problems/

update: well, so far neither patching url-auth.el nor switching to emacs 28 made any difference.

@alraban
Copy link

alraban commented Apr 29, 2020

I had the same issue, but the issue is actually a bug in nextcloud 18.0.4, not in emacs. It affects Evolution and ios icalendar integration too, see: nextcloud/server#20624

The issue is now fixed in nextcloud master, but hasn't been pushed out. This pull request fixes the issue: nextcloud/server#20632 You can manually add the fix until nextcloud 18.0.5 rolls out.

@dschwilk
Copy link
Author

Thank You! I did not investigate nextcloud changes much because the curl command seemed to work. I really appreciate you responding. My sincere thanks.

@ddoherty03
Copy link

@alraban, thanks for pointing to the issue. I am running a snap version of nextcloud on ubuntu 18.04.

$ snap list
Name       Version      Rev    Tracking       Publisher   Notes
core       16-2.44.3    9066   latest/stable  canonical✓  core
nextcloud  18.0.4snap1  20498  latest/stable  nextcloud✓  -

Anyone have ideas on how to pull the fix in?

@alraban
Copy link

alraban commented May 8, 2020

I don't know anything about snaps, but if you look at the pull request it's actually just a change to two lines of php in apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php. There are some more expansive changes to the test suite, but those aren't necessary to get things working again.

So I just found the affected file at that location underneath my nextcloud root directory and edited those two lines. For a normal install the nextcloud root is typically whereever the webroot is (e.g. /var/www/ on debian), but I have no idea how snaps work or are structured.

@ddoherty03
Copy link

ddoherty03 commented May 9, 2020

Thanks @alraban. It turns out that the snap file system is read-only, so I will ask over at the page of the snap maintainer. Looks like it has to wait for the snap to upgrade to 18.05, right? Is there an ETA for 18.05?

@dengste
Copy link
Owner

dengste commented May 10, 2020

It seems the only problem is the OPTIONS call. This is only done for initially checking a working DAV but is not actually needed for syncing. So in org-caldav-check-connection, if you comment out the line

  (org-caldav-check-dav (org-caldav-events-url))

you might be able to sync again.

@ddoherty03
Copy link

@dengste, many thanks. Yes that did it. Hopefully the snap will be updated to 18.05 before I upgrade org-caldav again.

@madnificent
Copy link

Upgrade to NextCloud 18.0.6 worked for me. I think this can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants