OutlookGoogleCalendarSync
OutlookGoogleCalendarSync copied to clipboard
"Precondition Failed [412]" error on every sync
Just been directed here by OGCS? Please read:-
:memo: This issue has been long running but a resolution is close! ~~There are reports (here, and #1052) that it is caused by multiple version of OGCS running, but further troubleshooting is needed~~
:bulb: If you encounter this error, please apply hotfix v2.9.5.7 - make sure you are already running at least v2.9.5.0 first
:paperclip: After applying the hotfix and you hit this error, please provide your OGcalsync.log file (see instructions).
Expand Original Post
OGCS Version: v2.7.4.0
Installed or Portable: Installed
Problem Description
Each time a sync runs, it produces the following error message -- twice -- after
"Comparing ### existing Google calendar entries":
"Updated event failed to save. Precondition Failed [412=PreconditionFailed]"
Each time the failure message occurs it produces a "Sync item failed" popup that that requires a "Yes" or "No" answer to the question: "Updated Google event exception failed to save. Continue with synchronization?"
Whether I answer yes or no to the two popups, the process finishes and I get the message: "Sync finished with success!"
[deleted]
Steps to Reproduce the Issue
- Sync - manually or automatically
Any other information
Didn't seem to happen several versions/months ago, now happens each time
This issue is seven days old and those that were posted both before and after it seem to be in the process of being addressed. Has there been any diagnosis in this case?
I'm struggling to replicate the issue to be honest, but could you apply this hotfix v2.7.4.4.zip (see instructions for applying) and re-upload you logfile at FINE
level again.
Also, when you start up OGCS, could you confirm the log file lines you have for:
2018-05-31 19:51:05,203 INFO 9 OutlookGoogleCalendarSync.Settings [481] - ENVIRONMENT:-
2018-05-31 19:51:05,203 INFO 9 OutlookGoogleCalendarSync.Settings [482] - Current Locale: en-GB
2018-05-31 19:51:05,203 INFO 9 OutlookGoogleCalendarSync.Settings [483] - Short Date Format: dd/MM/yyyy
2018-05-31 19:51:05,203 INFO 9 OutlookGoogleCalendarSync.Settings [484] - Short Time Format: HH:mm
Thanks!
:link: Issue #519
I tried your suggestions, including the hotfix, but no luck. Here are those log entries you requested:
2018-06-01 09:53:23,775 INFO 1 OutlookGoogleCalendarSync.Settings [0] - ENVIRONMENT:-
2018-06-01 09:53:23,775 INFO 1 OutlookGoogleCalendarSync.Settings [0] - Current Locale: en-US
2018-06-01 09:53:23,775 INFO 1 OutlookGoogleCalendarSync.Settings [0] - Short Date Format: MM/dd/yy
2018-06-01 09:53:23,775 INFO 1 OutlookGoogleCalendarSync.Settings [0] - Short Time Format: h:mm tt
Also, I seem to have multiple log files -- is that what is supposed to happen after a sync?
[deleted]
The names of the log files I have after the latest run, for example, are:
OGcalsync.log OGcalsync.log.1 OGcalsync.log.2
I tried uploading all three, but Github didn't like the format of those file extensions. Would you like me to rename the latter two and upload them as well?
Multiple logs are expected, yes. The main one only grows to a certain size before spawning a new file with sequential numbers. However, I don't think I need the additional logs at this point.
:package: Please could you apply v2.7.4.6.zip and let me know how it goes.
I tried the 2.7.4.6 hotfix. The good news is that the old error is gone. The bad new is that there is a new error in its place (at exactly the same location in the Sync run). Here is the text:
Updated event exception failed to save. Invalid sequence value. The specified sequence number is below the current sequence number of hte resource. Re-fetch the resource and use its sequence number on the following request. [400=BadRequest]
[deleted]
:slightly_frowning_face: It was a bit of a long shot, but was hoping a simpler approach of just "force the update" might work.
I'll have to go back and look at re-retrieving the object, re-applying the changes and re-saving. Which is really frustrating as in the code, I've only just retrieved all the occurrences of the series (all 230 of them), so there really should have been no changes before OGCS tries to make the update. :confused:
Thank you. Not sure what changed in terms of the recent versions, but I didn't used to have this issue in the past.
Anyway, sorry about this and appreciate your efforts. It is a helpful program, especially for those who prefer to have their personal stuff segregated from work-related stuff.
I thought it only fair to say that the program suddenly seems to be working fine now. Not sure why, but hopefully whatever issue that previously existed has gone away forever.
Thanks for updating @panzner, though that's fairly frustrating! For me at least :wink:
I'll leave this ticket open in case it returns or someone else encounters the same issue.
:link: Documentation https://developers.google.com/calendar/v3/errors#412_precondition_failed
Suggested action: Re-fetch the entity and re-apply the changes.
:link: Possible fix: https://developers.google.com/calendar/v3/version-resources#conditional_modification
Issue #800 which is reporting the same error, appears to show this bug is fixed in v2.8.1
I'm on 2.8.3 and get this regularly, but not every time.
@viper1969 Thanks for updating on this - could you increase the logging level to FINE
and then provide your OGcalsync.log
file after you have encountered that error again?
I also keep getting this - scrnshot and log attached. A few clicks to retry sync and it starts to resolve itself but nevertheless both annoying and a new behaviour over last few couple of weeks or so:
fine log attached
@tk2themax Your logfile only shows the successful sync subsequent to your screenshot. Could you upload the previous day's log instead?
:package: Please apply hotfix v2.8.3.12.zip (see instructions for applying) and let me know how it goes.
Thank you this hotfix seems to have eliminated the errors. I did not provide more logs as you had requested before your subsequent hotfix suggestion but still can.
No that's fine thanks, but if you could provide the logs for the latest hotfix that'd be appreciated.
Thanks @tk2themax but it doesn't look like you've encountered the original error for this ticket yet, so I can't tell if the hotfix is actually working.
You'll know when the issue does happen because either you will get an error message (in which case it hasn't worked), or a popup message box that says
A PreCondition Failed [412] was avoided, but will still be thrown to help troubleshooting. Please upload your logfile to GitHub.
Please let me know when either happens.
I am also getting this error. I opened a new issue before I found this one. Is that hotfix still valid?
I tried the hotfix but got a different error
Well... there was a calendar entry that it was trying to process before the error occurred, I deleted that entry from Outlook and the problem went away.
@aprayiii A shame you didn't upload your OGcalsync.log file as I have nothing to work with without that.
Encountered same issue. First with latest common release. Then installed the Alpha and it looked first but same issue. Happy to share log by mail but not here as there is personal data in the log.
PS. Will hit the donate button. Think this is a great project and you deserve the credits. Hope you will continue working on this!
Hi Paul. Thanks for the useful tool. Having the same issue as everyone else.
Have attached the logfile if it helps
Many thanks
Andrew OGcalsync.log
I'm getting the same error in version 2.9.0 every single time it tries to sync.
Never mind. There were two instances of OCGS running for some reason. That caused it.
@pj-camp Sounds like your issue was the same as 1052 then. I'm not sure if all 412 errors are related to multiple instances though...!
:package: I've now pulled these troubleshooting changes into v2.9.3 - hotfix v2.9.3.2.zip (see instructions for applying).
Anyone that tries this hotfix, please let me know how it goes.