WebDAV-syncing doesn't work in Mountain Lion

Hi,

I'm using Zotero standalone on three different Systems:

1. Mac OS X 10.6
2. Ubuntu Linux 12.10
3. Mac OS X 10.8

The first two are working just fine, but whatever I do I cannot get the file sync with my own WebDAV-Server (running on Ubuntu 12.04, apache with mod_dav) to work under Mac OS X 10.8. I use the exact same settings as on the other two systems, but I always get the error "The server ***.dyndns.org could not be reached.". The entries sync with the Zotero Server, but I get the red exclamation mark because of WebDAV failure. I can access the WebDAV server through the browser just fine. The firewall ist turned off, and even turning it on and explicitly allowing all connections for Zotero doesn't help.

Here's the Debug output:

[JavaScript Error: "[Exception... "'WebDAV verification failed. Verify your file sync settings in the Sync pane of the Zotero preferences.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]"]

[JavaScript Error: "[Exception... "'WebDAV verification failed. Verify your file sync settings in the Sync pane of the Zotero preferences.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]"]

[JavaScript Error: "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature." {file: "zotero://debug/" line: 0}]

version => 3.0.11.1, platform => MacIntel, oscpu => Intel Mac OS X 10.8, locale => en-US, appName => Zotero, appVersion => 3.0.11.1

=========================================================

(3)(+0000000): Verifying storage

(3)(+0000001): Getting WebDAV password

(3)(+0000001): HTTP OPTIONS for http://tom:********@***.dyndns.org/webdav/zotero/
  • The Debug ID is D1326865003
  • It's unlikely this is a problem in Zotero itself.

    Did you mean to connect via HTTPS?
  • HTTPS is not configured on my server, I'm using http. I'm doing the same thing on three different machines on the same network, and for one of them, file sync isn't working. This is very confusing.

    Here's the debug ID from the Mac with 10.6
    D2028671790
  • I'm afraid there's not much I can tell you. For some reason Zotero can't access your server.

    If you can access your server from the browser, you can try with Zotero for Firefox instead. If you installed Zotero Standalone first, that will offer to share the same data directory by default. You just need to make sure Zotero Standalone is closed.
  • I installed Firefox and the Zotero Add on. I can access the webdav server through the browser and it lists the context of /webdav/zotero as it should, but zotero still can't reach the server.

    It's getting even more weird: I installed Ubuntu 12.10 inside VirtualBox on that machine and even there Zotero can't reach the server while I can reach it through the browser. Trying to connect using Nautilus I get "HTTP Error: Message Corrupt". I can't even find this error message through google.

    So I guess it's not a problem with Zotero, but what is it?
  • Don't know. I've never seen that message before.

    If you're comfortable on the command line then you can try an OPTIONS request (which is the first request Zotero makes) with cURL, but that's pretty much all I can tell you.
  • This is what I get from curl:

    $ curl --user *** ***/webdav/zotero/
    Enter host password for user 'tom':
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Index of /webdav/zotero</title>
    </head>
    <body>
    <h1>Index of /webdav/zotero</h1>
    <table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
    <tr><td valign="top"><img src="/icons/back.gif" alt="[DIR]"></td><td><a href="/webdav/">Parent Directory</a></td><td> </td><td align="right"> - </td><td> </td></tr>

    [...]

    <tr><th colspan="5"><hr></th></tr>
    </table>
    <address>Apache/2.2.22 (Ubuntu) Server at *** Port 80</address>
    </body></html>


    I'm able to connect to the WebDAV Server using Transmit (a WebDAV Client for Mac OS X). This leaves me completely puzzled. Any ideas?
  • That's a GET request, not an OPTIONS request.
  • Couldn't find it in the man pages. Not sure if this is right.

    So here it goes:

    ***$ curl -X OPTIONS --user *** ***/webdav/
    Enter host password for user '***':
    curl: (52) Empty reply from server
    ***$

    If I do this on my other computer (on which WebDAV sync works) I get nothing:

    ***$ curl -X OPTIONS --user *** ***/webdav/
    Enter host password for user '***':
    ***$
  • edited December 23, 2012
    Now that's interesting:

    curl -X OPTIONS google.com

    gives curl: (52) Empty reply from server

    On the other machine I get HTML-Code telling me "error 405 (Method not allowed)"

    Might curl be fucked up in OSX 10.8? And is Zotero using the curl command/lib that comes with Mac OS X?
  • On my Mountain Lion, curl works just fine, but this is the MacPorts version (/opt/local/bin/curl)

    $ curl -X OPTIONS google.com

    Returns a 405 error page


    You might want to try the MacPorts version of curl.
  • I tried both versions, and no luck. MacPorts version of curl is 7.28.1.

    By the way

    $ curl -X SOMETHING google.com

    returns 405 error page, while OPTIONS doesn't.
  • You generally need to pass -v to see a (working) OPTIONS response.
  • edited December 23, 2012
    And google.com doesn't support OPTIONS requests, so testing against them doesn't show much (though you should get a 405 response).
  • On my Mac, which is a fresh Mountain Lion install from about a week ago, curl version 7.28.1 gives 405 from google.com. So there is possibly something wrong with your configuration.
  • The OPTIONS requests from the broken machine don't even show up in the server logs of apache. Even if I use telnet to issue the request it doesn't work while any other request goes through and shows up in the logs. So it's not a problem with curl.

    What would you have to do on a client to prevent OPTIONS requests to go out?


    I just cloned the git repository and modified the file

    modules/zotero/chrome/content/zotero/xpcom/storage/webdav.js

    so that Zotero doesn't care about the result of the OPTIONS request and with this build WebDAV-Sync is working, but this is not a real solution. At least I can sync for now.
  • If it's just the OPTIONS request, it's probably enough to go to about:config (via the Advanced pane of the prefs in Standalone) and set extensions.zotero.sync.storage.verified to true manually.

    As for why this is happening, a proxy or security software would be the most likely culprits. If neither of those apply in your case, I don't know.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.