Floccus: error sync with unicode emoji in bookmark's title

Created on 28 Aug 2020  路  6Comments  路  Source: floccusaddon/floccus

Describe the bug
I've try to do the first synchronisation with an empty nextcloud bookmarks and a lot for bookmarks on Firefox.

To Reproduce
Steps to reproduce the behavior:

  1. I install the floccus module to firefox, add url and credentials. Don't put any entry in Foldermapping and save.
  2. Manually run the first sync now
  3. floccus said the sync is done, but nothing in the nextcloud bookmarks (I've done ctrl+F5)
    The log is attached
    floccus-4.3.0-2020-08-28.log.txt
    I've seen that the server path is empty by default (/ in grey).

After that, I've try to modify server path to "/perso". And work well create a "perso" directory to the root of nextcloud bookmarks.
After that another think :

  1. I remove account, remove module, readd it and create a new app password to connect to nextcloud.
  2. set "/" to the server path
  3. Manually run the first sync now
  4. The sync work but a blank folder appears on the root folder of nextcloud bookmarks. I expected the content at the root folder, not create a "no name" folder
    image

Expected behavior
Sync the bookmarks on firefox to the root directory of nextcloud bookmarks.

Desktop (please complete the following information):

  • OS: Windows 10 (1909)
  • Browser Firefox ESR 68.12.0
  • Floccus version: 4.3.0
  • Floccus sync method: [e.g. webdav, nextcloud legacy or nextcloud folders]

Server (please complete the following information):

  • OS: N/A last nexcloud docker 19
  • Nextcloud version: 19.1.0
  • Bookmarks app version: 3.3.4

Debug log
log of the first try : floccus-4.3.0-2020-08-28.log.txt

I can do other test if needed, ask me.

I'll doing a review on my blog for your great module after all my test ;)

bug waiting for more information

All 6 comments

I think the problem is that floccus by default creates an empty folder on the client side that it syncs. And that is initially empty, of course. So, you'll have to explicitly set the local folder when setting up sync.

I'll doing a review on my blog for your great module after all my test ;)

Awesome! :)

Can't possible to sync on the root folder of nextcloud bookmarks ? Because inside this blank folder, only two folders : bookmarks bar and bookmarks menu.
Now A big part of my bookmarks is sync (it takes time the first time, I've too many bookmarks -_-), but stopped after 3936 bookmarks.
Here the error and I've send you by your secure link the logfile(floccus-4.3.0-2020-08-28.log-2.txt). I've seen nothing wrong. Maybe special characters in name ?
image

Maybe special characters in name ?

That could be. Can you check the nextcloud log for errors? Also, it might help to check what exactly is returned on that request that cannot be parsed. See below for a how-to.


How to debug network

Firefox

  • Go to about:debugging
  • click on debug 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

Chrome

  • 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

Hello,

Sorry for the delay, no time, big production release this weekend.

I've time today and I've seen the error. It's the string of the title from the website https://wificard.bdw.to/

I've attached the full nextcloud log in your shared space, you can see the 500 error during the POST at line 168.
I've done a debug on the plugin (use it for work but I don't knowed this for a plugin)
curl "https://xxx/index.php/apps/bookmarks/public/rest/v2/bookmark" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" -H "Accept: */*" -H "Accept-Language: fr,fr-FR;q=0.8,be-FR;q=0.6,en-US;q=0.4,en;q=0.2" --compressed -H "Content-type: application/json" -H "Authorization: Basic ZzpDWHpyei14R01QTS16UHlabS13NEE5ai1HbVdSaw==" -H "Origin: moz-extension://4d2e7b87-982d-4eaa-b46c-75b711324eb3" -H "DNT: 1" -H "Connection: keep-alive" -H "TE: Trailers" --data-raw "{""url"":""https://wificard.bdw.to/"",""title"":""馃摗 WiFi Card qrcode"",""folders"":[460]}"

request just before is maybe relevent too :
curl "https://xxx/index.php/apps/bookmarks/public/rest/v2/bookmark" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" -H "Accept: */*" -H "Accept-Language: fr,fr-FR;q=0.8,be-FR;q=0.6,en-US;q=0.4,en;q=0.2" --compressed -H "Content-type: application/json" -H "Authorization: Basic ZzpDWHpyei14R01QTS16UHlabS13NEE5ai1HbVdSaw==" -H "Origin: moz-extension://4d2e7b87-982d-4eaa-b46c-75b711324eb3" -H "DNT: 1" -H "Connection: keep-alive" -H "TE: Trailers" --data-raw "{""url"":""https://wificard.bdw.to/"",""title"":""馃摗 WiFi Card qrcode"",""folders"":[460]}"

I've modified the name of the bookmarks and it works until the next error with https://sploitus.com/

curl "https://xxx/index.php/apps/bookmarks/public/rest/v2/bookmark" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" -H "Accept: */*" -H "Accept-Language: fr,fr-FR;q=0.8,be-FR;q=0.6,en-US;q=0.4,en;q=0.2" --compressed -H "Content-type: application/json" -H "Authorization: Basic ZzpDWHpyei14R01QTS16UHlabS13NEE5ai1HbVdSaw==" -H "Origin: moz-extension://4d2e7b87-982d-4eaa-b46c-75b711324eb3" -H "DNT: 1" -H "Connection: keep-alive" -H "TE: Trailers" --data-raw "{""url"":""https://sploitus.com/"",""title"":""馃拃 Sploitus | Exploit & Hacktool Search Engine"",""folders"":[554]}"

I think it's the new unicode emoji done problem with floccus.

Bug identified, 90% of the work is done :p

I've rename the title for the true bug, the first error was a feature chose ;)

Was this page helpful?
0 / 5 - 0 ratings