WebExtension chrome.bookmarks.getTree() can hang and never callback
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
People
(Reporter: jerry, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15
Steps to reproduce:
- Create an WebExtension which invokes chrome.bookmarks.getTree() to get the user's entire bookmarks tree, and install this extension into Firefox 130.0.1 (64-bit) running in macOS. Alternatively,
1a. Download and install my macOS app BookMacster from here: https://sheepsystems.com/bookmacster/BookMacster.zip
1b. Launch it.
1c. Close the "New User Setup" window which appears.
1d. Click in main menu > File > New Collection.
1e. In the list which appears, switch on the two checkboxes for your default Firefox profile.
1f. Click button "Done".
1g. IMPORTANT: Click button "Create empty document".
1h. Click button "Save".
1i. Click in main menu > BookMacster > Manage Browser Extensions.
1j. In the top section "Sync", in the row naming your default Firefox profile, click button "Install".
1k. In the Firefox browser window which opens, if it does not open a popover, copy the URL from the address bar, delete all text in the address bar, paste it back in and hit return.
1l. Affirm the installation of "BookMacster Sync" into Firefox.
-
In Firefox, edit the name of any bookmark so that it begins with the UTF-8 three-byte sequence E2 80 8C, repeated four times. (It appears that E2 80 8C, although valid UTF-8, is not assigned to any public character. As such, it will not be visible in Firefox' "Manage Bookmarks" Library window. The name will look the same before and after you prepend these characters.)
-
Run your extension to execute the API call chrome.bookmarks.getTree(). Or, if you are using BookMacster,
3a. Activate BookMacster.
3b. Close the "Manage Browser Extensions" window.
3c. Activate the .bmco document window.
3d. Click in main menu > File > Import from All (Firefox…)
Actual results:
The function chrome.bookmarks.getTree() never calls its callback. If you are using BookMacster, the progress bar at the bottom of the window will bounce for 90 seconds and then indicate Error 651507 "Timed out waiting for bookmarks import from Firefox".
Expected results:
The function chrome.bookmarks.getTree() should call its callback and pass to it the Firefox bookmarks tree. If you are using BookMacster, the Firefox bookmarks should appear in BookMacster's document window and the status bar at the bottom indicate that a successful import has occurred.
EPILOG
If you then delete those four characters E2 80 8C from the beginning of that bookmark name, and then re-execute chrome.bookmarks.getTree() or command File > Import in BookMacster again, this expected result will occur.
For your convenience, although I'm not sure if this will pass through Bugzilla, the following two doublequotes contain the troublesome invisible 4x3 byte sequence: "".
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Reporter | ||
Comment 2•1 year ago
|
||
The byte sequence I pasted into my description does pass through Bugzilla. If you copy those two doublequotes to your clipboard and paste it into the window of a text editor such as BBEdit with main menu > View > Text Display > Hide Invisibles switched off, you will see placeholders for the four troublesome characters.
Updated•1 year ago
|
| Reporter | ||
Comment 3•1 year ago
|
||
Hang on. I'm working on a simple demo app for this issue.
| Reporter | ||
Comment 4•1 year ago
|
||
Sorry, this bug report was due to my misplacing a breakpoint when debugging my extension. In fact, chrome.bookmarks.getTree() is calling its callback as expected. The problem was in an 18-year old open-source JSON codec in my Native Messaging Host.
| Reporter | ||
Updated•1 year ago
|
Description
•