Firefox 140.3.0 crashes on startup with Notefox
Categories
(WebExtensions :: Storage, defect, P2)
Tracking
(relnote-firefox 143+, firefox-esr115 unaffected, firefox-esr140144+ verified, firefox143 verified, firefox144 verified, firefox145 verified)
People
(Reporter: thunderbird64bit, Assigned: bdk)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [fxsync-])
Attachments
(10 files, 3 obsolete files)
|
38.01 KB,
image/png
|
Details | |
|
57 bytes,
text/x-github-pull-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
57 bytes,
text/x-github-pull-request
|
Details | Review | |
|
57 bytes,
text/x-github-pull-request
|
Details | Review | |
|
990 bytes,
application/zip
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr140+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Steps to reproduce:
- Install Firefox ESR 140.3.0
- Install Notefox 4.5.0.5
- Restart Firefox
- Instant crash
| Reporter | ||
Comment 1•5 months ago
|
||
Comment 2•5 months ago
|
||
According to bp-baa95ec0-e647-4481-b202-44d560250918
the crash is initiated in a call in
- https://searchfox.org/firefox-main/rev/c7b4ff2aadfce11e419c226b7839b0348258a504/third_party/rust/webext-storage/src/lib.rs#38
uniffi_webext_storage_fn_method_webextstoragestore_sethttps://searchfox.org/firefox-main/rev/c7b4ff2aadfce11e419c226b7839b0348258a504/toolkit/components/uniffi-js/GeneratedScaffolding.cpp#7426
that code was recently change in bug 1953191 , with the diff at https://searchfox.org/firefox-main/diff/3eb9ddea6a117649a38702da8cbbe6b034dc53af/third_party/rust/webext-storage/src/lib.rs#38
The original change was made in https://github.com/mozilla/application-services/commit/d15375f68f2686be9be8548485c22f881b0e477e
:bdk, as the author of that change, can you take a look at this bug to see what could have happened and what we should do here?
--
The extension in this STR is https://addons.mozilla.org/en-US/firefox/addon/websites-notes/ and it seems to only pass JSON-serializable values to browser.storage.sync.set (in its source code, search for sync.set( and sync_local.set( for usage - crxviewer link.
| Assignee | ||
Comment 3•5 months ago
|
||
I see recursion limit exceeded in the error message. Looks like the JSON data was too deeply nested for serde or something like that? I think we should a) make sure we don't crash in this scenario and b) consider increasing the limit. I'll try to find some webextstorage devs to look at this one.
Comment 4•5 months ago
|
||
Hello,
I could not reproduce the issue on the latest ESR 140.3.0 under Windows 11.
I tried the STR with both version 4.4.3 of Notefox from AMO (as version 4.5.0.5 is not available on AMO) and versions 4.5.3 and 4.5.0.3 from https://github.com/Sav22999/websites-notes/releases (version 4.5.0.5 is not available there either). No crashes occurred once the browser restarted.
Comment 5•5 months ago
|
||
Hi guys,
I'm the developer of Notefox.
Some information: users reported the crash only on Windows and not everyone can reproduce the crash (someone gets the issue after some days).
I am available to get you help to fix this issue/crash, because it's causing some users reviewed negatively the add-on and some users stopped to use it. Please, fix this as priority
Comment 6•5 months ago
|
||
Hello, Iβ―have the issue with Zenbrowser. After activating the extension, the browser crashes in few seconds. The same if I deactivate the other extensions. Win 10 64 bits.
| Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Comment 7•5 months ago
|
||
(In reply to Saverio Morelli from comment #5)
Hi guys,
I'm the developer of Notefox.
Some information: users reported the crash only on Windows and not everyone can reproduce the crash (someone gets the issue after some days).
I am available to get you help to fix this issue/crash, because it's causing some users reviewed negatively the add-on and some users stopped to use it. Please, fix this as priority
Are you able to provide reproduction steps?
In comment 3, another Firefox engineer pointed towards potential recursion limits. Does your extension have deeply nested objects, or even circular values?
| Assignee | ||
Comment 8•5 months ago
•
|
||
Going through the crashes, I see many recursion limit errors, all with the exact same message: "recursion limit exceeded", line: 1, column: 1524. It seems like a very specific JSON string is causing this, but I'm not sure which. I also see a single lone leading surrogate in hex escape, which seems to point to invalid unicode data.
I'm going to split this into 2 parts. For this bug, I'm going to fix the crash. This seems to be the worst issue. However, if we're failing to parse the JSON, then there will almost certainly be other issues. I made https://bugzilla.mozilla.org/show_bug.cgi?id=1990313 to work through those.
I'll echo Rob, if we can get steps to reproduce then it would really help.
Comment 9•5 months ago
|
||
Comment 10•5 months ago
|
||
(In reply to Rob Wu [:robwu] from comment #7)
(In reply to Saverio Morelli from comment #5)
Hi guys,
I'm the developer of Notefox.
Some information: users reported the crash only on Windows and not everyone can reproduce the crash (someone gets the issue after some days).
I am available to get you help to fix this issue/crash, because it's causing some users reviewed negatively the add-on and some users stopped to use it. Please, fix this as priority
Are you able to provide reproduction steps?
In comment 3, another Firefox engineer pointed towards potential recursion limits. Does your extension have deeply nested objects, or even circular values?
This is an example of JSON used:
{"notefox":{"version":"4.5.0.5","author":"Saverio Morelli (Sav22999)","manifest_version":2,"os":"mac","browser":"firefox"},"settings":{"open-default":"page","consider-parameters":false,"consider-sections":false,"open-popup-default":"Ctrl+Alt+O","open-popup-domain":"Ctrl+Alt+D","open-popup-page":"Ctrl+Alt+P","advanced-managing":true,"html-text-formatting":true,"save-page-content":false,"search-page-content":false,"disable-word-wrap":false,"spellcheck-detection":false,"theme":"light","sticky-theme":"yellow","check-green-icon-global":true,"check-green-icon-domain":true,"check-green-icon-page":true,"check-green-icon-subdomain":true,"change-icon-color-based-on-tag-colour":false,"open-links-only-with-ctrl":true,"check-with-all-supported-protocols":false,"font-family":"Shantell Sans","show-title-textbox":false,"immersive-sticky-notes":true,"notes-background-follow-tag-colour":false,"datetime-format":"yyyymmdd1","sending-error-logs-automatically":true,"send-telemetry":false,"undo-redo":true,"bold-italic-underline-strikethrough":true,"link":true,"spellcheck":true,"superscript-subscript":false,"headers":false,"small-big":false,"highlighter":false,"code-block":false,"default-tag-colour-domain":"none","default-tag-colour-page":"none"},"websites":{"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/index.html":{"notes":"this is a \"page\" note","last-update":"2025-09-23 22:43:05","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6","title":"Notefox - All notes"},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6":{"notes":"this is a \"domain\" note","last-update":"2025-09-23 22:43:17","tag-colour":"none","sticky":false,"minimized":false,"type":1,"domain":""},"**global":{"notes":"this is a \"global\" note","last-update":"2025-09-23 22:43:23","tag-colour":"none","sticky":false,"minimized":false,"type":0,"domain":""},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/*":{"notes":"this is a \"subdomain\" note","last-update":"2025-09-23 22:43:30","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6"},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/index.html/*":{"notes":"this is a \"subdomain\" note","last-update":"2025-09-23 22:43:38","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6"}},"sticky-notes":{"sizes":{"w":"300px","h":"300px"},"opacity":{"value":"0.70"}},"storage":"local","last-update":"2025-09-23 22:43:38"}
Comment 11•5 months ago
|
||
(In reply to Saverio Morelli from comment #10)
(In reply to Rob Wu [:robwu] from comment #7)
(In reply to Saverio Morelli from comment #5)
Hi guys,
I'm the developer of Notefox.
Some information: users reported the crash only on Windows and not everyone can reproduce the crash (someone gets the issue after some days).
I am available to get you help to fix this issue/crash, because it's causing some users reviewed negatively the add-on and some users stopped to use it. Please, fix this as priority
Are you able to provide reproduction steps?
In comment 3, another Firefox engineer pointed towards potential recursion limits. Does your extension have deeply nested objects, or even circular values?
This is an example of JSON used:
{"notefox":{"version":"4.5.0.5","author":"Saverio Morelli (Sav22999)","manifest_version":2,"os":"mac","browser":"firefox"},"settings":{"open-default":"page","consider-parameters":false,"consider-sections":false,"open-popup-default":"Ctrl+Alt+O","open-popup-domain":"Ctrl+Alt+D","open-popup-page":"Ctrl+Alt+P","advanced-managing":true,"html-text-formatting":true,"save-page-content":false,"search-page-content":false,"disable-word-wrap":false,"spellcheck-detection":false,"theme":"light","sticky-theme":"yellow","check-green-icon-global":true,"check-green-icon-domain":true,"check-green-icon-page":true,"check-green-icon-subdomain":true,"change-icon-color-based-on-tag-colour":false,"open-links-only-with-ctrl":true,"check-with-all-supported-protocols":false,"font-family":"Shantell Sans","show-title-textbox":false,"immersive-sticky-notes":true,"notes-background-follow-tag-colour":false,"datetime-format":"yyyymmdd1","sending-error-logs-automatically":true,"send-telemetry":false,"undo-redo":true,"bold-italic-underline-strikethrough":true,"link":true,"spellcheck":true,"superscript-subscript":false,"headers":false,"small-big":false,"highlighter":false,"code-block":false,"default-tag-colour-domain":"none","default-tag-colour-page":"none"},"websites":{"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/index.html":{"notes":"this is a \"page\" note","last-update":"2025-09-23 22:43:05","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6","title":"Notefox - All notes"},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6":{"notes":"this is a \"domain\" note","last-update":"2025-09-23 22:43:17","tag-colour":"none","sticky":false,"minimized":false,"type":1,"domain":""},"**global":{"notes":"this is a \"global\" note","last-update":"2025-09-23 22:43:23","tag-colour":"none","sticky":false,"minimized":false,"type":0,"domain":""},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/*":{"notes":"this is a \"subdomain\" note","last-update":"2025-09-23 22:43:30","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6"},"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6/all-notes/index.html/*":{"notes":"this is a \"subdomain\" note","last-update":"2025-09-23 22:43:38","tag-colour":"none","sticky":false,"minimized":false,"type":2,"domain":"moz-extension://1f8c4867-ed60-4442-893d-0b07160f89d6"}},"sticky-notes":{"sizes":{"w":"300px","h":"300px"},"opacity":{"value":"0.70"}},"storage":"local","last-update":"2025-09-23 22:43:38"}
Instead, I don't know specific steps to reproduce the bug, because it happens "randomly" to users (someone told me after they deleted firefox profile and created a new one, the add-on didn't crash anymore for a while).
I've asked to users to write here their experience with the crash, so maybe they can help you to find steps to reproduce the crash (I use a macbook and on my-side I wasn't/am not able to get the crash).
Thanks
Comment 12•5 months ago
|
||
Authored by https://github.com/bendk
https://github.com/mozilla/application-services/commit/abe38650e3ccdb6d08a7d2c2460d008ea391e1d6
[main] Bug 1989840 - Don't call unwrap() in webext-storage custom types (#6967)
| Assignee | ||
Comment 13•5 months ago
|
||
This was fixed in the app-services code, but I wanted to add some JS
tests to make sure we don't regress.
Comment 14•5 months ago
•
|
||
Reopening this until the upstream code gets vendored.
Comment 15•5 months ago
|
||
Comment 16•5 months ago
|
||
Comment 17•5 months ago
|
||
STR:
- Load attached extension at about:debugging.
Expected:
- Firefox should not crash
Actual:
- Firefox crashes
Note: the relevant part of the test is the part that creates a deeply nested object:
a = {};
for (let i = 0, current = a; i < 126; ++i) {
const next = {};
current.a = next;
current = next;
}
browser.storage.sync.set({ a })
Comment 18•5 months ago
|
||
I identified the regressor with mozregression: bug 1888472. Before the change, the API call threw an error. After the change, Firefox crashes.
10:29.60 INFO: Last good revision: 9373fb1b31f59943239a307b620aa22715db1e8e
10:29.60 INFO: First bad revision: 8d3854141ccc463c3a5170669430a1437f962cc0
10:29.60 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9373fb1b31f59943239a307b620aa22715db1e8e&tochange=8d3854141ccc463c3a5170669430a1437f962cc0
Comment 19•5 months ago
|
||
That was my change--sorry about that. Thanks for fixing this, :bdk.
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 20•5 months ago
|
||
- Updated
Cargo.tomlto point to the app-services commit with the fix - Reverted my default rust to
1.86.0 - Ran
./mach configureand./mach vendor rust
Updated•5 months ago
|
| Assignee | ||
Comment 21•5 months ago
|
||
- Did not updated Cargo.toml, since it's points to a branch.
- Ran
cargo update -p context_id -p error-support -p filter_adult -p interrupt-support -p relevancy -p search -p sql-support -p suggest -p tabs -p tracing-support -p viaduct -p webext-storageto update app-services versions. - Reverted my default rust to 1.86.0
- Ran ./mach configure and ./mach vendor rust
Updated•5 months ago
|
| Assignee | ||
Comment 22•5 months ago
|
||
- Updated Cargo.toml to point to the app-services commit with the fix
- Set the rust version to 1.89.0
- Ran ./mach bootstrap ./mach configure and ./mach vendor rust
Updated•5 months ago
|
Comment 23•5 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined: Crash in Firefox when extensions try to save data.
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: This is just a one line Rust change from
.unwrap()to?. - String changes made/needed: None
- Is Android affected?: no
| Assignee | ||
Comment 24•5 months ago
|
||
- Updated
Cargo.tomlto point to the app-services commit with the fix - Reverted my default rust to
1.86.0 - Ran
./mach configureand./mach vendor rust
Original Revision: https://phabricator.services.mozilla.com/D266197
Comment 25•5 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined: Crash in Firefox when extensions try to save data.
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: This is just a one line Rust change from
.unwrap()to?. - String changes made/needed: None
- Is Android affected?: no
| Assignee | ||
Comment 26•5 months ago
|
||
- Did not updated Cargo.toml, since it's points to a branch.
- Ran
cargo update -p context_id -p error-support -p filter_adult -p interrupt-support -p relevancy -p search -p sql-support -p suggest -p tabs -p tracing-support -p viaduct -p webext-storageto update app-services versions. - Reverted my default rust to 1.86.0
- Ran ./mach configure and ./mach vendor rust
Original Revision: https://phabricator.services.mozilla.com/D266199
Comment 27•5 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Crash in Firefox when extensions try to save data.
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: This is just a one line Rust change from
.unwrap()to?. - String changes made/needed: None
- Is Android affected?: no
| Assignee | ||
Comment 28•5 months ago
|
||
- Updated Cargo.toml to point to the app-services commit with the fix
- Set the rust version to 1.89.0
- Ran ./mach bootstrap ./mach configure and ./mach vendor rust
Original Revision: https://phabricator.services.mozilla.com/D266200
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
| Assignee | ||
Comment 29•5 months ago
|
||
I'm not sure why, but I had to use ./mach vendor force for a seemingly unrelated error:
0:09.46 E Vet error: There are some issues with your policy.audit-as-crates-io entries
0:10.23 related error: Some non-crates.io-fetched packages match published crates.io versions
mtu:0.2.9@git:b3d8f0d21db5657ebafb14f9b60c8892d2eb3aa9
Updated•5 months ago
|
Updated•5 months ago
|
Comment 30•5 months ago
|
||
| uplift | ||
Updated•5 months ago
|
Updated•5 months ago
|
Comment 31•5 months ago
|
||
| uplift | ||
Updated•5 months ago
|
Updated•5 months ago
|
Comment 32•5 months ago
|
||
| uplift | ||
Comment 33•5 months ago
|
||
Verified as Fixed. Tested on the latest Beta (144.0b6/20250925193047 from https://treeherder.mozilla.org/jobs?repo=mozilla-beta&revision=ded84973fa47d2f7a5372aa9ec150d28954b5ac3), Release (143.0.3/20250925195835 from https://treeherder.mozilla.org/jobs?repo=mozilla-release&revision=532de6796f942901e3943d4d241b84bcaf670ae7) and ESR (140.4.0esr/20250926042521 from https://treeherder.mozilla.org/jobs?repo=mozilla-esr140&revision=749c9205fb7f0d8ce362c52d501f63ffc952e6b8) under Windows 11.
Using the STR and extension from Comment 17, the browser does not crash, confirming the fix.
I see the report is set to Reopened and not to Resolved, although tracking shows 3 versions as fixed. I will mark it as Verified once itβs set to Resolved noting that the fix was successful as per the info above.
Comment 34•5 months ago
|
||
(In reply to Alex Cornestean from comment #33)
I see the report is set to Reopened and not to Resolved, although tracking shows 3 versions as fixed. I will mark it as Verified once itβs set to Resolved noting that the fix was successful as per the info above.
The fixes have landed. Perhaps the bug was not automatically closed because the vendoring landed without bug ID? (comment 29).
There is also an approved unit test that has yet to land, once that lands the bot should close/resolve the bug anyway.
Updated•5 months ago
|
Comment 35•5 months ago
|
||
Comment 36•5 months ago
|
||
Comment 37•5 months ago
|
||
Backed out for causing xpc failures @ test_ext_storage_local.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/02330a50598482173101f0c0f9e5c5eafdb9f2c2
| Assignee | ||
Comment 38•5 months ago
|
||
This is passing for me locally. :robwu any ideas why this is failing in CI?
| Assignee | ||
Updated•5 months ago
|
Comment 39•5 months ago
|
||
The RunListener error is a sign that the test ends before an event was dispatched and handled.
In this specific test, there is a storage.onChanged handler. Every method that mutates storage should await the propagation of the event before continuing, but that is currently not happening after the storage.set calls in the newly added testDeeplyNestedObject test. See other storage.set (or storage.remove) calls in the same file to see how you can await the right thing.
Comment 40•5 months ago
|
||
A user reported he got the first Firefox crash with the following error:
Firefox 139.0.1 Crash Report [@ core::result::unwrap_failed | webext_storage::impl$55::try_lift ]
(He wrote on the Mozilla Italia forum https://forum.mozillaitalia.org/index.php?topic=79638.new;topicseen#new in Italian)
Comment 41•5 months ago
|
||
Firefox 139.0.1 Crash Report [@ core::result::unwrap_failed | webext_storage::impl$55::try_lift ]
Crash ID: 571392d4-d6ed-4458-80b7-5a08e0250608
Comment 42•5 months ago
|
||
Firefox 139.0.1 Crash Report [@ core::result::unwrap_failed | webext_storage::impl$55::try_lift ]
Crash ID: eec26b03-6cba-4730-bb54-a3a6f0250608
Comment 43•5 months ago
|
||
Please stop posting crash reports from 139.0.1. It's not a version that will ever see this fix. The 143.0.3 release due to ship tomorrow should contain this fix as well as the 140.4esr release due to ship in 2 weeks. If those versions still continue to crash, that would be useful information to have in this bug.
| Assignee | ||
Comment 44•5 months ago
|
||
Thanks Rob wu, I think the tests are passing now: https://treeherder.mozilla.org/jobs?repo=try&revision=50b4ba95feedcd6843b647fa31bd4ccc437544c4. I'm going to try landing this again now.
Comment 45•5 months ago
|
||
Comment 46•5 months ago
|
||
Comment 47•5 months ago
|
||
Backed out for causing xpcshell failures at test_ext_storage_sync.js.
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/8f95067809f1d0df666022e02d9294b3c411a391
Failure log: https://treeherder.mozilla.org/logviewer?job_id=529225049&repo=autoland&task=O-z8mtvbScaD3xAUHaKI3w.0&lineNumber=2859
Updated•5 months ago
|
Updated•5 months ago
|
| Assignee | ||
Comment 49•5 months ago
|
||
I'm still working on getting the tests to pass. Rob had some suggestions in the phabricator patch (thanks!), here's a try run with them: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=156168
Comment 50•5 months ago
|
||
Comment 51•5 months ago
|
||
| bugherder | ||
Updated•5 months ago
|
Comment 52•5 months ago
|
||
Verified as Fixed. Tested on the latest Nightly (145.0a1/20251002211313) under Windows 11.
Using the STR and extension from Comment 17, the browser does not crash, confirming the fix.
Also, as per Comment 33, setting FX144, FX143 and ESR 140 as Verified.
Description
•