Skip to content
  • Watch
  • Fork

/dav

HTTPS clone URL

SSH clone URL

Subversion checkout URL

You can clone with HTTPS, SSH, or Subversion.

Download ZIP

Loading…

403 on OSX Contact server #68

Open
aspyct opened this Issue · 2 comments

2 participants

@aspyct

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 running make 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:tester@antoines-macbook-pro.local:8443/principals/__uids__/997ADEEA-6E14-4325-A619-7C5449D227BE/ 403 (Forbidden) 

Is there any way I could get debug logging / any idea related to this?

@gaye
Owner

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.

@aspyct

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).

@mcepl

Attach images by dragging & dropping or selecting them. Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This file is empty. Try again with a file that's not empty. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Nothing to preview

Something went wrong with that request. Please try again.