dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
706 stars 104 forks source link

Error "failed to retrieve UID NNN after N tries with error HTTP/1.1 404 Not Found #226

Open edumerco opened 3 years ago

edumerco commented 3 years ago

Dear Dengste and everyone.

Thanks a lot for sharing your work with this worderful org to calendar connector. :)

I tried my installation with a test calendar as suggested (thanks for the tip!), and when everything went ok, I deleted it's sole event.

Now, after finishing the sync, there is this error (I reproduce almost the whole sync, just in case):

Putting event 1 of 19
Putting event 2 of 19
[... cutted for brevity ...]
Putting event 18 of 19
Putting event 19 of 19
condition-case: Failed to retrieve UID 6c842a99-ef07-4090-b5e8-68318a05d846 after 5 tries with error HTTP/1.1 404 Not Found

My installation is:

How do I make org-caldav "forget" that event? Is it some cache or similar thing to delete, or a specific command for this?

Thanks a lot for your dedication, time and attention... :)

edumerco commented 3 years ago

I saw in the documentation that:

You must be careful to not simply remove previously synced files from org-caldav-files, as org-caldav would view all the entries from those files as deleted and hence by default also delete them from the calendar. However, org-caldav should be able to detect this situation and warn you with the message 'Previously synced file(s) are missing', asking you whether to continue nonetheless.

If I got that right, it leaves the User without options.

If I moved the files (they are in a different filesystem now) how can we go out of this situation?

Thanks a lot... :)

jsilve24 commented 3 years ago

I am havint hte same problem. Would love to know an answer -- or how to just restart everything from scratch.

lytex commented 3 years ago

To restart everything from scratch, ensure you can rebuild the remote caldav info from your org mode files and then:

This deletes all your items stored in the caldav server and recreates them using your org mode files.

Also check out org-caldav-save-directory (by default ~/.emacs.d/ or your user-emacs-directory) and delete the file org-caldav-xxxxxxx.el which caches all the calendar items (I don't know if this should be necessary though)

WouterSpekkink commented 3 years ago

Dear Dengste and everyone.

Thanks a lot for sharing your work with this worderful org to calendar connector. :)

I tried my installation with a test calendar as suggested (thanks for the tip!), and when everything went ok, I deleted it's sole event.

Now, after finishing the sync, there is this error (I reproduce almost the whole sync, just in case):

Putting event 1 of 19
Putting event 2 of 19
[... cutted for brevity ...]
Putting event 18 of 19
Putting event 19 of 19
condition-case: Failed to retrieve UID 6c842a99-ef07-4090-b5e8-68318a05d846 after 5 tries with error HTTP/1.1 404 Not Found

My installation is:

  • GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-09-03
  • Org mode version 9.4.4 (9.4.4-4-g99eafe-elpa @ /home/edumerco/.emacs.d/elpa/org-20210104/)
  • Debian 10.8

How do I make org-caldav "forget" that event? Is it some cache or similar thing to delete, or a specific command for this?

Thanks a lot for your dedication, time and attention... :)

I have been exploring org-caldav as a tool to download my Outlook calendar (via davmail/caldav) to org-mode yesterday and I came across this same problem while getting to grips with how the file settings work. For me it was important to keep the original calendar, since it is my work Outlook calendar.

I ended up deleting the file for the cal->org sync (I've set it up now in a way that it only syncs in that direction anyway) as well an org-caldav file in the .emacs.d folder. That sort of caused a reset for me, allowing me to resync with the appropriate settings (although I am still struggling with a few things). A big warning though: I don't really know the purpose of that second file that I deleted so it was a bit reckless to delete it. It is probably good to find it more about it before following my lead.

hrehfeld commented 2 years ago

grep for the id in <org-directory>/.org-caldav-sync/. comment out lines with the id. Restart syncing.

You might end up with that entry added to the calendar again, or something, IDK, but at least sync works again.