dav
dav copied to clipboard
403 on OSX Contact server
Hi,
First of all, this may or may not be an actual issue. I don't have any knowledge of the carddav protocol, so maybe all I need is a little guidance :)
Context:
- I have a running carddav server, based on the OSX server that's available from the App Store. That should be a rather standard carddav server, I guess.
- I'm using
dav.js
1.6.2 from the browser, after runningmake dav.js
.
Here's the code (happily taken from your example):
var xhr = new dav.transport.Basic(
new dav.Credentials({
username: 'tester',
password: 'tester'
})
);
var client = new dav.Client(xhr);
// No transport arg
client.createAccount({
// that's my localhost
server: 'https://Antoines-MacBook-Pro.local:8443',
accountType: 'carddav'
})
.then(function(account) {
account.addressBooks.forEach(function(addressBook) {
console.log('Found address book name ' + addressBook.displayName);
// etc.
});
});
The account exists, and works with the Apple Contacts app. Could not validate yet with another app.
When I run this code (from the browser), I get the following 403 error:
PROPFIND https://tester:[email protected]:8443/principals/__uids__/997ADEEA-6E14-4325-A619-7C5449D227BE/ 403 (Forbidden)
Is there any way I could get debug logging / any idea related to this?
Hi @aspyct! Can you use the browser network monitor to figure out exactly what request(s) dav is sending to your server and what response(s) are being received? There's also library level logging which could be useful; to enable, you can call dav.debug.enable('dav:*');
.
I am on Linux, but if there's some way that I can interact with your server (perhaps https://ngrok.com/), I would be happy to help debug.
Hi!
I'll try to set you up an access to the contact server, but it's running on my laptop, so access will probably be bound to certain hours... I'll see what I can do.
I'll also send you the request log from the navigator ASAP (expect it somewhere next week).
Is this still an issue @aspyct ?