mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-25 06:06:05 +03:00
[GH-ISSUE #1184] Syncing failed with JSON.parse: expected ':' #791
Labels
No labels
browser-specific
bug
correctness issues
enhancement
feature: Google Drive
feature: Linkwarden
feature: git
feature: nextcloud-bookmarks
feature: tabs
feature: webdav
help wanted
native-app
priority: high
priority: low
priority: medium
pull-request
question
question
stale
upstream
waiting for more information
wontfix
🙁 Not following issue template
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/floccus#791
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @houdini69 on GitHub (May 29, 2022).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1184
Which version of floccus are you using?
4.14.0
Sync method
{"label"=>"Nextcloud Bookmarks"}
Which browser are you using? In case you are using the Android App, specify the Android version please.
LibreWolf
Which version of Nextcloud Bookmarks are you using? (if relevant)
10.3.1
Which version of Nextcloud? (if relevant)
24.0.1
What kind of WebDAV server are you using? (if relevant)
No response
Describe the Bug
Floccus sends a parse error after syncing:
2022-05-29T13:25:46.800Z Starting sync process for account xxxxx@xxxxx.xxxx.xxx
2022-05-29T13:25:49.400Z Syncing failed with JSON.parse: expected ':' after property name in object at line 1 column 96502 of the JSON data
Expected Behavior
synchro without error
To Reproduce
Start web browser. Floccus icon shows error after syncing.
Debug log provided
@marcelklehr commented on GitHub (May 29, 2022):
Hello @houdini69
Please make sure you got the version information for Nextcloud Bookmarks correct. There is no version 100.0.2-1
@houdini69 commented on GitHub (May 29, 2022):
Sorry about that! Corrected.
@marcelklehr commented on GitHub (May 29, 2022):
Ok, this seems to be a problem with the response from the server. Can you check the nextcloud log for errors?
@houdini69 commented on GitHub (May 29, 2022):
Nothing wrong in nextcloud log.
In my web server nginx I got:
192.168.1.75 - - [29/May/2022:19:01:23 +0200] "GET /nextcloud/apps/logreader/poll?lastReqId=eCuujthFXprdOlY2fr5p HTTP/2.0" 200 22 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.75 - xxxxxxxxx [29/May/2022:19:01:24 +0200] "GET /nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 151 "-" "Mozilla/5.0 (Macintosh) mirall/3.5.0git (build 10063) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.1.75 - xxxxxxxxx [29/May/2022:19:01:24 +0200] "POST /nextcloud/index.php/apps/bookmarks/public/rest/v2/lock HTTP/2.0" 200 40 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.75 - xxxxxxxxx [29/May/2022:19:01:24 +0200] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.5.0git (build 10063) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
@marcelklehr commented on GitHub (May 30, 2022):
Is this the nextcloud log or the Apache/nginx log? Please check the nextcloud log: https://docs.nextcloud.com/server/19/admin_manual/issues/general_troubleshooting.html#logfiles
@houdini69 commented on GitHub (May 30, 2022):
It's the nginx log.
In the nextcloud log there's nothing wrong. I'm going to reinstall Bookmarks app in netcloud as I could'nt connect to nextlcoud with Nextcloud Bookmark Manager client app too:
"there was an error retrieving:
https://xxxxxxxxx.xxxx.xxx/nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1
TypeError: Cannot read property 'find' of null"
@houdini69 commented on GitHub (May 31, 2022):
Reinstalling Bookmarks app in Nextcloud doesn't solve this issue.
I noticed that synchro works on Android with the Bookmarks Android app after removing the bookmarks in this app.
@marcelklehr commented on GitHub (Jun 1, 2022):
Can you post the returned content of
https://xxxxxxxxx.xxxx.xxx/nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1with sensitive content redacted?You can do this for example using curl
@houdini69 commented on GitHub (Jun 1, 2022):
I could'nt access the returned content of https://xxxxxxxxx.xxxx.xxx/nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1. It's forbidden by rules by my nginx configuration.
@marcelklehr commented on GitHub (Jun 1, 2022):
Then floccus will have a hard time syncing with your server.
@houdini69 commented on GitHub (Jun 1, 2022):
Floccus was working nicely previously before Nextcloud update to version 24. Note that Bookmarks Android app still works.
@houdini69 commented on GitHub (Jun 1, 2022):
Ok. I've set my web server to allow access with your curl command and I got all bookmarks in a string:
{"data":[{"id":1955,"url":"....,"status":"success"}
@houdini69 commented on GitHub (Jun 1, 2022):
But unfortunately floccus is still not working.
@marcelklehr commented on GitHub (Jun 2, 2022):
What is the error message? Are there other routes that are blocked by your nginx config? If you are maintaining a white list, the URLs that are part of the Bookmarks API are listed here: https://nextcloud-bookmarks.readthedocs.io/en/latest/index.html
@houdini69 commented on GitHub (Jun 2, 2022):
The error message is always the parse error indicated in my first message.
Rules set in my nginx config are only by IP addresses. Otherwise the nginx configuration for nextcloud is the recommended one.
@marcelklehr commented on GitHub (Jun 3, 2022):
Mh, then we need to dig a bit deeper:
Firefox
about:debuggingInspectbutton next to floccus entrysync nowfor the account of your choice.Chrome
chrome://extensionsDeveloper modedist/html/background.htmlbutton in floccus' entry next to "Inspect views: "sync nowfor the account of your choice@houdini69 commented on GitHub (Jun 3, 2022):
Syncing failed with JSON.parse: expected ':' after property name in object at line 1 column 96502 of the JSON data background-script.js:2:210323
2022-06-03T16:03:50.300Z Syncing failed with JSON.parse: expected ':' after property name in object at line 1 column 96502 of the JSON data background-script.js:2:14224
2022-06-03T16:04:47.800Z Starting sync process for account xxxxxx@xxxxxxx.xxxx.xxx background-script.js:2:14224
SyntaxError: JSON.parse: expected ':' after property name in object at line 1 column 96502 of the JSON data
getEntry moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
getCache moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
v moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
i moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
i moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
s moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
promise callbackc moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
s moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
promise callbackc moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
s moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
promise callbackc moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
s moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
promise callbackc moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
i moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
i moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
sync moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
syncAccount moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
scheduleSync moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
add moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
_tryToStartAnother moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
add moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
add moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
scheduleSync moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
checkSync moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
controller moz-extension://38c9843e-c185-491f-9164-2427d0896a79/dist/js/background-script.js:2
@marcelklehr commented on GitHub (Jun 13, 2022):
Can you check whether what you get from the curl command is valid json (e.g. using https://duckduckgo.com/?q=validate+json)?
PS: sorry for the delay
@houdini69 commented on GitHub (Jun 13, 2022):
I got "JSON is valid!"
@marcelklehr commented on GitHub (Jun 14, 2022):
Can you go into the network tab in the inspector window and trigger a new sync to check the request the returns invalid json?
@houdini69 commented on GitHub (Jun 14, 2022):
There's nothing populate (?) in the network tab when I trigger a new sync in Floccus. Sorry for the lack of infos allowing to fix this issue.
@marcelklehr commented on GitHub (Jun 17, 2022):
Aaah! I just saw this. It seems like your cache is corrupt. Can you try uninstalling the extension and reinstalling?
@houdini69 commented on GitHub (Jun 17, 2022):
You're right! Reinstalling floccus fixed this issue.
@github-actions[bot] commented on GitHub (Jun 18, 2023):
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.