question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XBEL sync not working with owncloud (Origin header=null)

See original GitHub issue

Software versions

  • Browser: Chrome 69.0.3497.42 beta (64-bit)
  • Owncloud: 10.0.9 @ my.domain.tld/my_prefix
  • Floccus: 3.0.2

Sync settings

WebDAV URL: https://my.domain.tld/my_prefix/remote.php/webdav/ Bookmarks file path: bookmarks.xbel

Steps to reproduce

  1. installed
  2. setup
  3. tried syncing

Expected outcome

bookmarks.xbel should have been saved

Actual outcome

bookmarks.xbel was not saved

Initially I created an empty bookmarks.xbel on my server and the sync would halt due to Account.js:171 Syncing failed with Cannot read property 'childNodes' of undefined. This indicates read access is working with my settings, only the file was invalid.

Then I removed it, and I now see log messages for bookmark parsing (COMPARE, CREATE etc)

However, the process fails at PUT/DELETE requests for bookmarks.xbel and bookmarks.xbel.lock with HTTP500.

Example log from my owncloud instance:

{
    "reqId":"W4EWHcKHVXsAAD7no0AAAAAG",
    "level":3,
    "time":"2018-08-25T08:41:01+00:00",
    "remoteAddr":"<censored>",
    "user":"--",
    "app":"remote",
    "method":"PUT",
    "url":"\/my_prefix\/remote.php\/webdav\/bookmarks.xbel.lock",
    "message":"Exception: {\"Exception\":\"InvalidArgumentException\",
        \"Message\":\"Invalid url "null"\",\"Code\":0,
        \"Trace\":\"#0 /lib/public/Util.php(809):
        OCP\Util::getFullDomain('null')
        #1 /apps/dav/lib/Connector/Sabre/CorsPlugin.php(98): OCP\Util::isSameDomain('null', 'https://my.domain....')
        #2 /lib/composer/sabre/dav/lib/DAV/Server.php(407): OCA\DAV\Connector\Sabre\CorsPlugin->initialize(Object(OCA\DAV\Connector\Sabre\Server))
        #3 /apps/dav/lib/Connector/Sabre/ServerFactory.php(105): Sabre\DAV\Server->addPlugin(Object(OCA\DAV\Connector\Sabre\CorsPlugin))
        #4 /apps/dav/appinfo/v1/webdav.php(57): OCA\DAV\Connector\Sabre\ServerFactory->createServer('/my_prefix/remote...', '/my_prefix/remote...', Object(OCA\DAV\Connector\Sabre\Auth), Object(Closure))
        #5 /remote.php(165): require_once('...')
        #6 {main}\",\"File\":\"/lib/public/Util.php\",\"Line\":775}"
}

Looking at this @ the source: https://github.com/owncloud/core/blob/d5836485ac9802db343b6c9eed986a24b50eb072/apps/dav/lib/Connector/Sabre/CorsPlugin.php#L98

It seems owncloud expects the Origin header to be missing or parsable, but null isn’t.

AFAIK, it is impossible to set with fetch since it’s CORS-related 😦

Can this be solved on your end or do I need to file this on their repo?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
minjcommented, Aug 25, 2018

nevermind, it’s already fixed @ owncloud/core#32120 😄

0reactions
minjcommented, Aug 25, 2018

I was not able to remove Origin header in chrome.

Firefox is sending moz-extension://fe404075-445f-4b57-8f4b-0a96fe99639c as origin

This fails as well with “Only http based URLs supported”.

I will file a bug report @ owncloud

Read more comments on GitHub >

github_iconTop Results From Across the Web

Floccus hangs browser if accessing Owncloud with 200+ ...
Hello, I am having problems with floccus 1.1.2 running on Firefox 50.0.2 on Debian 8 while ... XBEL sync not working with owncloud...
Read more >
Frequently asked questions (FAQs) around ownCloud
There are no backdoors, you can check, it's open source. Users can install ownCloud themselves ... Why does the calendar/contacts app not work...
Read more >
General Troubleshooting - ownCloud Documentation
General Troubleshooting · Disable Third-Party Apps · ownCloud Logfiles · PHP Version and Information · Debugging Sync Issues · Common problems / error...
Read more >
ownCloud - share files and folders, easy and secure
ownCloud, your file platform. The most essential business tool for enterprise-grade file sync and share.
Read more >
Using the occ Command - ownCloud Documentation
Running occ. Check if occ Is Set to Executable. Note that this step is not necessary when using a docker installation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found