php - Using sabre/dav server with floccus

[EDIT 2]: TL;DR - floccus can't use Digest Authorization, which was how my sabre/dav server was set up. See this GitHub issue.
I've set up a sabre/dav server on a Raspberry Pi 4 by following the instructions here. When I navigate to my server URL in my browser, I get to the sabre web interface. I can upload files here, and they appear in mypublic
folder.
Now, I'm trying to set up floccus to sync my bookmarks with the server, but I'm hitting a wall. I put in my server URL and credentials just as if I were connecting through my browser, and I specify the path where the bookmarks file should be stored. I save those settings, then click 'Sync Now', but I end up with an error:E018: Couldn't authenticate with the server.
There's a button beside the error to download a debug log, but it's an empty file.
I've tried various ways of setting the path - a file at the root of mypublic
folder (bookmarks.xbel
), a file in a directory further down (bookmarks/bookmarks.xbel
), both with and without the file created first, and all of these result in the same error.
Has anyone had any luck with this before that might be able to shine a light on what I'm doing wrong here?
[EDIT]: Using @Marcel Klehr's answer, I managed to track down the response being sent by the server when I try to sync:
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:sabredav-version>3.2.2</s:sabredav-version>
<s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
<s:message>No 'Authorization: Digest' header found. Either the client didn't send one, or the server is misconfigured</s:message>
</d:error>
And these are the headers:
Looks like floccus is using Basic Authorization instead of Digest. I can see in this GitHub issue that Digest is not supported by floccus. I'll try reconfiguring the server to use Basic, and see if that fixes it.
[EDIT 2]: Switching to Basic Authorization fixed the issue. I've marked @Marcel's answer as the Accepted answer, since their guidance helped me track down what was wrong.
Answer
Solution:
You can debug network requests of the extension as follows:
Firefox- Go to
about:debugging
->This firefox
- click on
inspect
button next to floccus entry - go to the network tab in the inspector tab
- trigger a sync by clicking on
sync now
for the account of your choice. - check the failing network requests
- Go to
chrome://extensions
- enable
Developer mode
- click on
dist/html/background.html
button in floccus' entry next to "Inspect views: " - go to the network tab in the inspector window
- trigger a sync by clicking on
sync now
for the account of your choice - check the failing network requests
Answer
Solution:
It looks to me that your actual issue isn't with the path itself but with the server (just look at the error).
Have you tried removing the right-most slash?
In other words, replacehttp://my-public-ip/sabre/server.php/
withhttp://my-public-ip/sabre/server.php
.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: object of class stdclass could not be converted to string
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.