Describe the bug
When syncing using Nextcloud-Folders (non-legacy) it throws the following error:
JSON.parse: unexpected character at line 1 column 1 of the JSON data
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should, you know, work and such.
Desktop (please complete the following information):
Server (please complete the following information):
Note: Please write down the actual version numbers instead of writing 'latest'.
Debug log
2020-02-02T20:00:38.464Z (nextcloud-folders)CREATE - #undefined[Shakira - Whenever, Wherever - YouTube](https://www.youtube.com/watch?v=weRHyjj34ZE) parentId: 55
2020-02-02T20:00:39.287Z COMPARE { localItem: - #PTfKYaTuNT9-[Over the Misty Mountains Cold | The Mary Sue](http://www.themarysue.com/song-from-the-hobbit-trailer/) parentId: kK5AaWRa_wGI,
cacheItem: undefined,
serverItem: undefined }
2020-02-02T20:00:39.288Z (nextcloud-folders)CREATE - #undefined[Over the Misty Mountains Cold | The Mary Sue](http://www.themarysue.com/song-from-the-hobbit-trailer/) parentId: 55
2020-02-02T20:00:40.344Z Syncing failed with E020: Could not parse server response. Is the bookmarks app installed on your server?
JSON.parse: unexpected character at line 1 column 1 of the JSON data
E020: Could not parse server response. Is the bookmarks app installed on your server?
JSON.parse: unexpected character at line 1 column 1 of the JSON data
E020: Could not parse server response. Is the bookmarks app installed on your server?
JSON.parse: unexpected character at line 1 column 1 of the JSON data
Additional context
Also happens on V4 (when not running it on root, see #444 ).
Legacy sync works fine (as far as one could call that "fine".
Nextcloud version 7.0.3
Floccus doesn't support this version of nextcloud. In any case, it would be helpful to know the actual version of your bookmarks app install, as the latest available version varies across nextcloud versions.
Floccus doesn't support this version of nextcloud
is there any documentation what is and isn't supported?
The addon pages cite nextcloud bookmarks v0.11 or greater. However, when using the nextcloud-folders sync methods, v1.x or greater is supported (this is not documented indeed). Any nextcloud versions that these app versions support is implicitly supported. Nextcloud 7.x is very old.
Update: The add-account screen in the addon itself actually declares the dependencies:
The option 'Nextcloud Bookmarks' is compatible with at least version v0.14 of the Bookmarks app.
Shoot, Thats a typo from my side: Its: 17.0.3
I see. It would be interesting to know, which endpoint is responsible for that non-json output, and what the actual response is. Do you think you can find out? (about:debugging and then inspect thte network tab of the addon)
The same error occured at my instance.
I used this howto:
https://decatec.de/home-server/nextcloud-lesezeichen-synchronisieren-mit-chrome-firefox/
The error occured because I used the wrong server-path mentioned in the howto.
false: https://mydomain.de/nextcloud
correct: https://mydomain.de
After correcting the path everything worked alright.
@funkmastergst That wasn't the case with my issue sadly enough.
@Ornias1993 Did you get it sorted out?
I'm having the same problem. I debugged the sync via about:debugging and noticed that I kept getting redirected to the login page, even though I was already logged in:
https://mydomain.de/index.php/apps/bookmarks/public/rest/v2/folder/-1/hash:
HTTP/1.1 302 Found
Server: nginx/1.14.2
Date: Sun, 12 Apr 2020 17:46:22 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
...
Location: https://mydomain.de/index.php/login?noredir=1
I don't know about the others, but in my case it seems to be a problem with the openid-connect plugin I'm using (https://github.com/pulsejet/nextcloud-oidc-login). Once I deactivated it, it worked.
@Ornias1993 Did you get it sorted out?
As I didn't get any support from you on this issue, I stopped using this extention completely.
I see. I did offer a way to find out more about the problem. Unless you want to investigate further, I'll close this.
@Ornias1993 Did you get it sorted out?
As I didn't get any support from you on this issue, I stopped using this extention completely.
Hi marcelklehr, I had the same issue. In order to fix it, try not using your Nextcloud password. Instead, create a new app password:
Hopefully, it will help. Cheers.
I see. It would be interesting to know, which endpoint is responsible for that non-json output, and what the actual response is. Do you think you can find out? (
about:debuggingand then inspect thte network tab of the addon)
Hey @marcelklehr. I had the same issue and started to debug the problem. In netwerk view I found some errors which were related with the creation of new Bookmarks (PUT). Though not all bookmarks had problems I investigated the ones who had. My solution was the title length of the bookmarks. By shrinking it down (the bookmark itself) the sync worked.
Hope that can help you either by fixing the length or thowing a better error message.
Although this has been closed for almost a year, I'd like to comment that I keep getting the error message from the Issue's title every couple of seconds. I.e., Floccus tries to sync, fails, tries, fails, etc. For the sheer number of bookmarks (I've kept moving them along as old devices went and new devices came since around 1999) what @JoergOswald did isn't an option to me.
@sixtyfive You could still investigate what causes the error. Failed JSON parse may happen because of bookmarks not being installed on nextcloud, or a server-side error. Checking the nextcloud log for errors would yield more information. I encourage you to open a new issue for this, though.