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

Unable to Sync Anew Error Could Not Find UID #315

Open
agregson opened this issue Nov 18, 2024 · 8 comments
Open

Unable to Sync Anew Error Could Not Find UID #315

agregson opened this issue Nov 18, 2024 · 8 comments

Comments

@agregson
Copy link

Hello,

I had to blow away an old org-caldav sync option and calendar as too many habits were placed in it and I was not able to remove without redoing it all. I have deleted the caldavInbox.org file, made a new calendar to sync with and org-caldav fails to sync with the following error:

org-caldav-generate-md5-for-org-entry: Could not find UID DS1-4db800f9-e487-4738-9e9a-f16c5d78683f.

There is no such UID in any of my org files.

Is there a way to reset org-caldav to not look for missing UID? Furthermore, this does not look like any UID format in my org files.

thanks for any help. Had to export to ics files for now.

@jackkamm
Copy link
Collaborator

The org-caldav sync state for each calendar is saved in ~/.emacs.d/org-caldav-<CALENDAR_ID>.el. You could try deleting the corresponding file and see if it fixes the problem.

org-caldav-delete-everything deletes the sync file as well as everything on the remote calendar.

We should also add functionality/documentation on how to just delete and start afresh on Org side, without deleting on CalDav side.

@agregson
Copy link
Author

agregson commented Dec 1, 2024 via email

@jackkamm
Copy link
Collaborator

jackkamm commented Dec 1, 2024

Does the ID 4db800f9-e487-4738-9e9a-f16c5d78683f exist in your Org files? Also, does it contain a diary-style timestamp within?

Note that ox-icalender.el (which org-caldav uses) exports a separate event for each timestamp within an entry, and adds a prefix to the ID for the type of timestamp (DS for diary, DL for deadline, etc). Org-caldav strips out the prefix as this would be incompatible with 2-way sync. It sounds like it's failing to strip out the DS1- prefix in this case for some reason.

I'd recommend also trying to directly run the ox-icalendar exporter directly on the file to see how the ICS looks.

@agregson
Copy link
Author

agregson commented Dec 6, 2024 via email

@jackkamm
Copy link
Collaborator

jackkamm commented Dec 15, 2024

I just pushed this commit so that org-caldav can recognize IDs from diary style timestamps:
875bebe
So at least it should stop crashing.

That said, you probably don't want to export this to caldav, unless maybe if you're doing 1-way sync. Otherwise the diary-style timestamp could accidentally be overwritten in Cal->Org (org-caldav doesn't know how to import diary timestamps). You may want to consider using org-export-exclude-tags or org-caldav-skip-conditions to exclude that entry.

The issue was probably caused by a recent patch I submitted to ox-icalendar.el to export of diary timestamps:
https://list.orgmode.org/[email protected]/
I will work on a patch to ox-icalendar.el to skip the diary timestamps from export.

@jackkamm
Copy link
Collaborator

Also, can you provide more details about this:

Exporting to ics just that file works, but the file gives an error
"Invalid column last_modified"

At what point does that error occur?

@agregson
Copy link
Author

agregson commented Dec 22, 2024 via email

@agregson
Copy link
Author

agregson commented Dec 27, 2024 via email

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

2 participants