Closed Bug 1525966 Opened 5 years ago Closed 4 years ago

Error message missing "Error while detaching the browsing context target front: undefined"

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(2 files)

At https://searchfox.org/mozilla-central/rev/490ab7f9b84570573a49d7fa018673ce0d5ddf22/devtools/shared/fronts/targets/browsing-context.js#155 we are trying to display errors occurring during the detach.

However sometimes e is a String and not an error object. Therefore,
Error while detaching the browsing context target front: ${e.message} will log "undefined".

Example STRs:

  • open a tab on any url
  • open about:debugging
  • inspect the tab opened in step 1
  • close about:devtools toolbox

AR: In the logs you will see:

console.warn: "Error while detaching the browsing context target front: undefined"

ER: Instead of undefined, we should have the error message. Here for instance:

Protocol error (noSuchActor): No such actor for ID: server1.conn0.child19/frameTarget1
Severity: normal → enhancement
Priority: -- → P3
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Depends on D55829

In case other rejects are still using strings instead of error objects.

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ff967efc6d6
Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/06ca873edb4c
Support string errors when detach fails in target fronts r=nchevobbe

Sorry about that! Of course tests relied on the error being a string!

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd2a261b6786
Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/b7d37d187a93
Support string errors when detach fails in target fronts r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: