Foxmarks: Error: Precondition Failed

From Foxcloud Wiki

This error occurs in the rare situation that Foxmarks was about to update your synchronization file but noticed that another client had changed it during Foxmarks' synchronization process. To prevent over-writing changes made by the other client, Foxmarks generates this error.

If you attempt to synchronize again, the problem should disappear.

If you consistently receive this message using the Foxcloud Synchronization Server, please let us know.

Using Apache 2.0 with mod_dav

If you are using your own webdav server running apache the problem may be caused by this bug: :PUT/If-match (etag) handling seems to be :broken
The workaround is to use the FileETag Directive.
Use the setting:
 FileETag None
This effectively disables the over-writing protection, but at least Foxmarks will work.

Another user reports:

To work around Foxmarks:_Error:_Precondition_Failed, I added FileETag None to my server as recommended. After this, only the last machine that forced an upload could automatically sync to the server. I had to force an upload or download each time for the other machines. It turns out that foxmarks-remote.js is still sending the If-None-Match header even though etags have been turned off. This is causing the other machines to always receive a 304 response when they tried to sync. Commenting out the setRequestHeader call makes foxmarks download the bookmarks file everytime but all of the machines can sync now. Update: An even better fix for the apache problem is to leave the If-None-Match header, remove the If-Match header and re-enable etags on the server. This causes the file to not be downloaded if it hasn't changed but it will unconditionally overwrite the foxmarks.xml file on the server. 14:30, 21 March 2006 (EST)

Work-around available in the 0.69 release:

I submitted a patch to work-around this problem in a standard fashion. The patch allows you to set a hidden preference (no UI) to disable the use of the If-Match header. This patch has been accepted and will be included in the 0.69 release of Foxmarks. To enable the workaround, you need to exit Firefox and edit the prefs.js file in your Firefox profile directory and add the following line:
user_pref("foxmarks.disableIfMatchOnPut", true); 12:44, 2 May 2006 (EDT)

An alternative to the prefs.js approach described above is to enter about:config in the Firefox address bar, and then right-click in the main window. Select New -> Boolean and enter foxmarks.disableIfMatchOnPut and select a value of true.
Also, note that by enabling this setting, you open the (admittedly small) possibility for synchronization to result in loss of data, as you are disabling one of Foxmarks' built-in integrity checks. To wit, if you start a sync on machine A, then machine B writes changes to the server, then machine A completes its sync, changes made by machine B will be lost. Still, to the extent that this assists users who are running their own server and understand the risks, we're happy to include this user-contributed patch in 0.69. --Todd 13:45, 2 May 2006 (EDT)