WebDAV not authenticating

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

WebDAV not authenticating Wed Dec 03, 2014 9:15 am • by madnil
For some months my rules for automatic upload to my WebDAV server were working fine, now they stopped working. The log says "The operation couldn’t be completed. unauthorized, NSLocalizedFailureReason=unauthorized". If I try to reconnect to my server in the upload action the error windows says "NSURLErrorDomain error -1017".

I'm using OS X 10.9.5 and Hazel 3.3.2. All other programs using WebDAV still work fine.
madnil
 
Posts: 8
Joined: Sat May 08, 2010 11:46 am

Re: WebDAV not authenticating Wed Dec 03, 2014 4:38 pm • by Mr_Noodle
Can you turn on debug logging as indicated in the sticky article near the top of this forum? Also, enter the following in Terminal:

defaults write com.noodlesoft.Hazel LogTags -array CONNECTION

After that, try it again and send over the logs.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: WebDAV not authenticating Wed Dec 03, 2014 5:08 pm • by madnil
Ok: Debug switched on, defaults added. These are the log entries:

2014-12-03 21:56:28.437 hazelworker[785] DEBUG: Processing directories: (
"/webdav"
)
2014-12-03 21:56:28.440 hazelworker[785] DEBUG: Received file event: {
abort = 1;
}
2014-12-03 21:56:28.440 hazelworker[785] DEBUG: About to process directory /webdav
2014-12-03 21:56:28.441 hazelworker[785] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2014-12-03 21:56:28.441 hazelworker[785] DEBUG: .git: File is hidden/invisible. Skipping.
2014-12-03 21:56:28.447 hazelworker[785] file.md: Rule Hochladen zu WebDAV matched.
2014-12-03 21:56:28.448 hazelworker[785] DEBUG: Manual run. Forcing actions to be executed.
2014-12-03 21:56:28.455 hazelworker[785][CONNECTION] DEBUG: PROPFIND /webdav

2014-12-03 21:56:30.519 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:30.522 hazelworker[785][CONNECTION] DEBUG: PROPFIND /webdav

2014-12-03 21:56:30.668 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:30.669 hazelworker[785][CONNECTION] DEBUG: PUT /webdav/file.md

2014-12-03 21:56:30.771 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:30.788 hazelworker[785][CONNECTION] DEBUG: PUT /webdav/file.md

2014-12-03 21:56:31.002 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:31.002 hazelworker[785] Error uploading item from file:///webdav/file.md to https://domain/webdav/file.md: Error Domain=org.w3.http Code=401 "The file “file.md” could not be uploaded. The operation couldn’t be completed. unauthorized" UserInfo=0x7f9d08e25ba0 {response=<NSHTTPURLResponse: 0x7f9d08d4b3b0> { URL: https://domain/webdav/file.md } { status code: 401, headers {
Connection = "Keep-Alive";
"Content-Encoding" = gzip;
"Content-Length" = 329;
"Content-Type" = "text/html; charset=iso-8859-1";
Date = "Wed, 03 Dec 2014 20:56:30 GMT";
"Keep-Alive" = "timeout=15, max=100";
Server = Apache;
Vary = "Accept-Encoding";
"Www-Authenticate" = "Basic realm=\"Login\"";
} }, NSLocalizedDescription=The file “file.md” could not be uploaded. The operation couldn’t be completed. unauthorized, NSLocalizedFailureReason=unauthorized}
2014-12-03 21:56:31.003 hazelworker[785][CONNECTION] DEBUG: DELETE /webdav/file.md

2014-12-03 21:56:31.115 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:31.131 hazelworker[785][CONNECTION] DEBUG: DELETE /webdav/file.md

2014-12-03 21:56:31.337 hazelworker[785][CONNECTION] DEBUG: 401 unauthorized

2014-12-03 21:56:31.337 hazelworker[785] Error removing item at https://domain/webdav/file.md: Error Domain=org.w3.http Code=401 "The file “file.md” could not be deleted. The operation couldn’t be completed. unauthorized" UserInfo=0x7f9d08e046d0 {response=<NSHTTPURLResponse: 0x7f9d08d4a6d0> { URL: https://domain/webdav/file.md } { status code: 401, headers {
Connection = "Keep-Alive";
"Content-Encoding" = gzip;
"Content-Length" = 329;
"Content-Type" = "text/html; charset=iso-8859-1";
Date = "Wed, 03 Dec 2014 20:56:30 GMT";
"Keep-Alive" = "timeout=15, max=100";
Server = Apache;
Vary = "Accept-Encoding";
"Www-Authenticate" = "Basic realm=\"Login\"";
} }, NSLocalizedDescription=The file “file.md” could not be deleted. The operation couldn’t be completed. unauthorized, NSLocalizedFailureReason=unauthorized}
2014-12-03 21:56:31.338 hazelworker[785] Could not rollback failed upload for https://domain/webdav/file.md.
2014-12-03 21:56:31.338 hazelworker[785] [Error] Upload failed: Could not upload file file.md from folder /webdav to server domain
madnil
 
Posts: 8
Joined: Sat May 08, 2010 11:46 am

Re: WebDAV not authenticating Thu Dec 04, 2014 4:03 pm • by Mr_Noodle
Seems like it can't authenticate. Can you check if there's an entry for the server in the keychain? Also, see if there are multiple or just one.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: WebDAV not authenticating Thu Dec 04, 2014 4:38 pm • by madnil
There is/was only one entry in the keychain. I deleted it and tried to recreate the connection from scratch. This did not work and the mentioned -1017 error window appeared.
madnil
 
Posts: 8
Joined: Sat May 08, 2010 11:46 am

Re: WebDAV not authenticating Fri Dec 05, 2014 1:04 pm • by Mr_Noodle
Did you re-create it by hand or have Hazel create it? If the former, delete it and try it again by editing the rule and selecting the destination server/folder again.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: WebDAV not authenticating Fri Dec 05, 2014 3:26 pm • by madnil
I create a new rule, choose "Upload", then "Other" in the drop down list and try to define a new WebDAV connection. The button "Connect" throws out the error -1017. I tried it with a different server (public provider) and it didn't work either with the same error.

I checked the files on my server. The last successful upload was just before Hazel version 3.3 came out. So it looks like something changed at that point.
madnil
 
Posts: 8
Joined: Sat May 08, 2010 11:46 am

Re: WebDAV not authenticating Mon Dec 08, 2014 2:46 pm • by Mr_Noodle
I suggest emailing me. Try re-creating the rule and sending me the log output that results from that. Also, send in a screenshot of the connection settings you are using.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support