[GH-ISSUE #88] pathSegment is undefined -- Path tag corrupted when editing in bookmarks app #86

Closed
opened 2026-02-25 22:36:06 +03:00 by kerem · 9 comments
Owner

Originally created by @andreas-bulling on GitHub (Apr 17, 2018).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/88

Hi,

I've installed the latest Nextcloud and Floccus versions and use this setup in combination with Firefox 58.0.2 on MacOSX.

Syncing worked fine as long as I only sync from the server to my browser. I just added the first bookmark in my browser and, while syncing back to the server worked, I now see an error message:
"pathSegment is undefined"

Any ideas?

Originally created by @andreas-bulling on GitHub (Apr 17, 2018). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/88 Hi, I've installed the latest Nextcloud and Floccus versions and use this setup in combination with Firefox 58.0.2 on MacOSX. Syncing worked fine as long as I only sync from the server to my browser. I just added the first bookmark in my browser and, while syncing back to the server worked, I now see an error message: "pathSegment is undefined" Any ideas?
kerem 2026-02-25 22:36:06 +03:00
Author
Owner

@marcelklehr commented on GitHub (Apr 17, 2018):

Hey @andreas-bulling
It looks like there's a problem with creating a folder on the client. Could you provide logs as follows?

Firefox

  • Go to about:debugging
  • enable debugging
  • click on debug button next to floccus entry
  • allow access
  • clear the console
  • go to floccus options
  • trigger a sync by clicking on sync now for the account of your choice.
  • go back to the inspector window and copy the logs after waiting for the sync to finish (or fail)
<!-- gh-comment-id:382044631 --> @marcelklehr commented on GitHub (Apr 17, 2018): Hey @andreas-bulling It looks like there's a problem with creating a folder on the client. Could you provide logs as follows? #### Firefox * Go to `about:debugging` * enable debugging * click on `debug` button next to floccus entry * allow access * clear the console * go to floccus options * trigger a sync by clicking on `sync now` for the account of your choice. * go back to the inspector window and copy the logs after waiting for the sync to finish (or fail)
Author
Owner

@andreas-bulling commented on GitHub (Apr 18, 2018):

Hi @marcelklehr

thanks for your quick reply. Here is the debugging output:

Starting sync process for account REMOVED  Account.js:105:6
Fetching bookmarks Object { type: "nextcloud", url: "REMOVED", username: "REMOVED", password: "REMOVED", syncing: true, localRoot: "REMOVED", error: "pathSegment is undefined", lastSync: 1523975824153 }  Nextcloud.js:123:4
Received bookmarks from server Array [ Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, 53 more… ]  Nextcloud.js:172:4
LOCALUPDATE Object { id: "62", localId: "c1IPsiZcPsW4", url: "https://link.springer.com/article/1…", title: "Control blindness: Why people can m…", path: "&gt;", hashValue: 1705076786 }  Tree.js:95:4
Error: 1 errors
Stack trace:
MultiError@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:304:9
next/<@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:423:36
run@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4295:22
notify/<@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4308:30
flush@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:1398:9
  Account.js:137:57
Syncing failed with pathSegment is undefined  Account.js:138:8
	_callee8$ Account.js:138:8
	tryCatch moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:6900:37
	invoke moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:7138:22
	defineIteratorMethods/</prototype[method] moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:6952:16
	step moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:4907:183
	step/< moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:4907:402
	run moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4295:22
	notify/< moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4308:30
	flush moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:1398:9

I found the problem. The tag for the object in question (62) is not "floccus:>" as for others that I had added using the nextcloud web interface but "floccus:&gt;". That object I had added using Floccus (I do that typically by moving the tab or i symbol to the floccus-created folder in the Bookmarks Toolbar). When I manually fix the tag the sync completes without error.

The error is reproducible.

UPDATE: When editing individual bookmarks the "floccus:>" tag is never shown properly, i.e. always urlencoded. Also not very nice.

<!-- gh-comment-id:382284047 --> @andreas-bulling commented on GitHub (Apr 18, 2018): Hi @marcelklehr thanks for your quick reply. Here is the debugging output: ``` Starting sync process for account REMOVED Account.js:105:6 Fetching bookmarks Object { type: "nextcloud", url: "REMOVED", username: "REMOVED", password: "REMOVED", syncing: true, localRoot: "REMOVED", error: "pathSegment is undefined", lastSync: 1523975824153 } Nextcloud.js:123:4 Received bookmarks from server Array [ Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, 53 more… ] Nextcloud.js:172:4 LOCALUPDATE Object { id: "62", localId: "c1IPsiZcPsW4", url: "https://link.springer.com/article/1…", title: "Control blindness: Why people can m…", path: "&gt;", hashValue: 1705076786 } Tree.js:95:4 Error: 1 errors Stack trace: MultiError@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:304:9 next/<@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:423:36 run@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4295:22 notify/<@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4308:30 flush@moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:1398:9 Account.js:137:57 Syncing failed with pathSegment is undefined Account.js:138:8 _callee8$ Account.js:138:8 tryCatch moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:6900:37 invoke moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:7138:22 defineIteratorMethods/</prototype[method] moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:6952:16 step moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:4907:183 step/< moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/background-script.js:4907:402 run moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4295:22 notify/< moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:4308:30 flush moz-extension://66961562-f723-404e-8333-1416a9f25bbf/dist/js/polyfill.js:1398:9 ``` I found the problem. The tag for the object in question (62) is not "floccus:>" as for others that I had added using the nextcloud web interface but "floccus:&amp;gt;". That object I had added using Floccus (I do that typically by moving the tab or i symbol to the floccus-created folder in the Bookmarks Toolbar). When I manually fix the tag the sync completes without error. The error is reproducible. **UPDATE:** When editing individual bookmarks the "floccus:>" tag is never shown properly, i.e. always urlencoded. Also not very nice.
Author
Owner

@marcelklehr commented on GitHub (Apr 18, 2018):

So, the problem is the upstream bug of nextcloud bookmarks urlencoding tags everytime you edit a bookmark. Correct? This should be fixed in the upcoming version of the app, so we just need to wait for the new release.

<!-- gh-comment-id:382354201 --> @marcelklehr commented on GitHub (Apr 18, 2018): So, the problem is the upstream bug of nextcloud bookmarks urlencoding tags everytime you edit a bookmark. Correct? This should be fixed in the upcoming version of the app, so we just need to wait for the new release.
Author
Owner

@andreas-bulling commented on GitHub (Apr 18, 2018):

Not sure. I thought the problematic bookmark I had added with Floccus but I am not sure anymore now given that the error doesn't occur anymore for some reason.

There is definitely a bug in NC that, when editing the tags for a bookmark (which shows correctly in the overall bookmark list in the NC web interface) the ":>" is urlencoded and not saved properly.

<!-- gh-comment-id:382491797 --> @andreas-bulling commented on GitHub (Apr 18, 2018): Not sure. I thought the problematic bookmark I had added with Floccus but I am not sure anymore now given that the error doesn't occur anymore for some reason. There is definitely a bug in NC that, when editing the tags for a bookmark (which shows correctly in the overall bookmark list in the NC web interface) the ":>" is urlencoded and not saved properly.
Author
Owner

@marcelklehr commented on GitHub (Apr 18, 2018):

Short explanation: the floccus tag is a combination of PREFIX FOLDER_PATH. PREFIX is floccus: at the moment. The FOLDER_PATH used to be a normal path with slashes, e.g. /foo/bar/baz, but nextcloud cannot handle that, so / are replaced with >. So, when you add a bookmark in the root folder floccus adds floccus:> in order to know in which folder the bookmark is when it syncs the next time.

You say adding a bookmark with floccus doesn't work, yet the log you provided doesn't show a bookmark being added, but one that was already on the server before the sync process that was logged here.

<!-- gh-comment-id:382500690 --> @marcelklehr commented on GitHub (Apr 18, 2018): Short explanation: the floccus tag is a combination of `PREFIX` `FOLDER_PATH`. `PREFIX` is `floccus:` at the moment. The `FOLDER_PATH` used to be a normal path with slashes, e.g. `/foo/bar/baz`, but nextcloud cannot handle that, so `/` are replaced with `>`. So, when you add a bookmark in the root folder floccus adds `floccus:>` in order to know in which folder the bookmark is when it syncs the next time. You say adding a bookmark with floccus doesn't work, yet the log you provided doesn't show a bookmark being added, but one that was already on the server before the sync process that was logged here.
Author
Owner

@marcelklehr commented on GitHub (Apr 22, 2018):

@andreas-bulling for some reason your latest comments don't appear on the website... 🤔

Hm, I did some more testing, also including folders, and now it seems to work again?! I don't know, this is weird, I have to take back that the error is reproducible. It definitely did occur but I can't reproduce in which conditions... sorry.

Could it be that you edited a bookmark on the server and it subsequently failed to be sycned / caused the error. When I edit bookmarks with floccus tags, the > characters in the floccus tag turn into &gt;s, which would account for the error you're seeing.

<!-- gh-comment-id:383404497 --> @marcelklehr commented on GitHub (Apr 22, 2018): @andreas-bulling for some reason your latest comments don't appear on the website... :thinking: > Hm, I did some more testing, also including folders, and now it seems to work again?! I don't know, this is weird, I have to take back that the error is reproducible. It definitely did occur but I can't reproduce in which conditions... sorry. Could it be that you edited a bookmark on the server and it subsequently failed to be sycned / caused the error. When I edit bookmarks with floccus tags, the `>` characters in the floccus tag turn into `&gt;`s, which would account for the error you're seeing.
Author
Owner

@andreas-bulling commented on GitHub (Apr 23, 2018):

Could it be that you edited a bookmark on the server and it subsequently failed to be sycned / caused the error. When I edit bookmarks with floccus tags, the > characters in the floccus tag turn into &gt;s, which would account for the error you're seeing.

Yes, I am pretty sure this is what happened/is the problem. Thanks a lot for pushing this upstream - let's hope it will be fixed soon.

<!-- gh-comment-id:383613190 --> @andreas-bulling commented on GitHub (Apr 23, 2018): > Could it be that you edited a bookmark on the server and it subsequently failed to be sycned / caused the error. When I edit bookmarks with floccus tags, the `>` characters in the floccus tag turn into `&gt;s`, which would account for the error you're seeing. Yes, I am pretty sure this is what happened/is the problem. Thanks a lot for pushing this upstream - let's hope it will be fixed soon.
Author
Owner

@marcelklehr commented on GitHub (Aug 25, 2018):

Bookmarks v0.12.0 has been released ;)

<!-- gh-comment-id:416003248 --> @marcelklehr commented on GitHub (Aug 25, 2018): Bookmarks v0.12.0 has been released ;)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 21, 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.

<!-- gh-comment-id:1477739329 --> @github-actions[bot] commented on GitHub (Mar 21, 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#86
No description provided.