Closed Bug 1985446 Opened 2 months ago Closed 27 days ago

Clicked JS error while loading titantv.com in LibreWolf. Debugger crashed.

Categories

(DevTools :: Debugger, defect, P2)

Firefox 142
defect

Tracking

(firefox145 fixed)

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: ken_g6151, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Error in Debugger:

TypeError: can't access property "length", i is undefined

React Component Stack:

in Exceptions
in Connect(Exceptions)
in div
in Editor
in Connect(Editor)
in div
in main
in div
in div
in SplitBox
in div
in div
in SplitBox
in AppErrorBoundary
in div
in App
in Connect(App)
in Provider
in Provider

Stacktrace:

findPos@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:57806
domAtPos@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:94964
updateSelection@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:91607
update@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:170697
Bs/this.dispatchTransactions<@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:168450
dispatch@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:169233
removeLineContentMarker@resource://devtools/client/shared/sourceeditor/editor.js:1192:8
clearMarkers@resource://devtools/client/debugger/src/components/Editor/Exceptions.js:56:14
componentWillUnmount@resource://devtools/client/debugger/src/components/Editor/Exceptions.js:41:10
callComponentWillUnmountWithTimer@resource://devtools/client/shared/vendor/react-dom.mjs:12812:12
safelyCallComponentWillUnmount@resource://devtools/client/shared/vendor/react-dom.mjs:12820:40
commitUnmount@resource://devtools/client/shared/vendor/react-dom.mjs:13143:41
commitNestedUnmounts@resource://devtools/client/shared/vendor/react-dom.mjs:13174:18
unmountHostComponents@resource://devtools/client/shared/vendor/react-dom.mjs:13435:27
commitDeletion@resource://devtools/client/shared/vendor/react-dom.mjs:13494:26
commitAllHostEffects@resource://devtools/client/shared/vendor/react-dom.mjs:14138:25
commitRoot@resource://devtools/client/shared/vendor/react-dom.mjs:14340:9
completeRoot/<@resource://devtools/client/shared/vendor/react-dom.mjs:15727:15
unstable_runWithPriority@resource://devtools/client/shared/vendor/react.mjs:611:12
completeRoot@resource://devtools/client/shared/vendor/react-dom.mjs:15726:27
performWorkOnRoot@resource://devtools/client/shared/vendor/react-dom.mjs:15655:21
performWork@resource://devtools/client/shared/vendor/react-dom.mjs:15563:24
performSyncWork@resource://devtools/client/shared/vendor/react-dom.mjs:15537:14
requestWork@resource://devtools/client/shared/vendor/react-dom.mjs:15406:5
scheduleWork@resource://devtools/client/shared/vendor/react-dom.mjs:15220:16
enqueueSetState@resource://devtools/client/shared/vendor/react-dom.mjs:8188:17
Component.prototype.setState@resource://devtools/client/shared/vendor/react.mjs:322:16
onStateChange@resource://devtools/client/shared/vendor/react-redux.js:1412:16
notify@resource://devtools/client/shared/vendor/react-redux.js:1159:21
notifyNestedSubs@resource://devtools/client/shared/vendor/react-redux.js:1198:20
onStateChange@resource://devtools/client/shared/vendor/react-redux.js:1409:16
visibilityHandlerStore/subscribe/unsubscribe<@resource://devtools/client/shared/redux/visibilityHandlerStore.js:43:11
dispatch@resource://devtools/client/shared/vendor/redux.js:265:7
waitUntilService/</<@resource://devtools/client/debugger/src/actions/utils/middleware/wait-service.js:71:24
promiseMiddleware/</<@resource://devtools/client/debugger/src/actions/utils/middleware/promise.js:38:14
context/</<@resource://devtools/client/debugger/src/actions/utils/middleware/context.js:84:12
thunk/</</<@resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29:100
dispatch@resource://devtools/client/shared/vendor/redux.js:681:28
setBreakableLines/<@resource://devtools/client/debugger/src/actions/sources/breakableLines.js:92:19

Thanks for the report!

Are you reproducing this issue consistently? Do you remember on which error/exception you clicked?

Flags: needinfo?(ken_g6151)

Remarkably, it seems to be consistent this session, anyway. It might help to know my locale is set to "Broadcast - Colorado Springs-Pueblo, CO". Here's the exception - not sure how to format it:

Uncaught (in promise) DOMException: String contains an invalid character
t https://www.titantv.com/:1
u https://www.titantv.com/:1
S https://www.titantv.com/:1
E https://www.titantv.com/:1
Y https://www.titantv.com/:1
a https://www.titantv.com/:1
_ https://www.titantv.com/:1
_ https://www.titantv.com/:1
value https://www.titantv.com/:1
t https://www.titantv.com/:1
u https://www.titantv.com/:1
S https://www.titantv.com/:1
E https://www.titantv.com/:1
Y https://www.titantv.com/:1
a https://www.titantv.com/:1
_ https://www.titantv.com/:1
_ https://www.titantv.com/:1
value https://www.titantv.com/:1
<anonymous> https://www.titantv.com/:1
<anonymous> https://www.titantv.com/:1
<anonymous> https://www.titantv.com/:1
Flags: needinfo?(ken_g6151)

Other relevant information: I'm running three add-ons enabled: Cookie Safe 3.8.2 (all cookies whitelisted), ScriptSafe v1.1.0.1 blocking only Google Tag Manager, and uBlock Origin. LibreWolf's Enhanced Tracking Protection is blocking a.pub.network.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Priority: P3 → P2

:ochameau managed to reproduce the issue, given we had 2 reports quite similar to each other, let's set this as P2.

It seems to reproduce easily and only when having ublock installed.
And it looks like something off with the console passing a -1 column to the debugger which then crashes because of such unexpected value.

It is actually easily reproducible via data:text/html,<script>atob(-1)</script> on clicking on exception location from the console.

It is actually not specific to atob and also fails with: data:text/html,<script>throw new Error("foo")</script>

SmartTrace is actually consuming 1-based columns coming from ObjectActor grip
for JS Error object's stacktrace.
But it maps to 0-based columns as it relies on Debugger Frames components.
This is made uterly complicated as we also have to deal with source maps
and original locations which are 0-based as well.

Assignee: nobody → poirot.alex
Attachment #9511170 - Attachment description: WIP: Bug 1985446 - [devtools] Fix mismatch in column offset between console and debugger. → Bug 1985446 - [devtools] Fix mismatch in column offset between console and debugger. r=#devtools
Status: NEW → ASSIGNED

Use the same helper for both debugger and shared component Frame React components.

Pushed by apoirot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2817046a27c3 https://hg.mozilla.org/integration/autoland/rev/bf11b02491af [devtools] Fix mismatch in column offset between console and debugger. r=devtools-reviewers,bomsy https://github.com/mozilla-firefox/firefox/commit/df11e4ddb48e https://hg.mozilla.org/integration/autoland/rev/7edc79e00f48 [devtools] Assert location opened in the debugger when clicking on a frame location. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
QA Whiteboard: [qa-triage-done-c146/b145]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: