Closed Bug 1668265 Opened 4 years ago Closed 4 years ago

Highlighter breaks while refreshing page

Categories

(DevTools :: Inspector, defect, P1)

Firefox 82
defect

Tracking

(firefox-esr78 unaffected, firefox82 verified, firefox83 verified)

VERIFIED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- verified
firefox83 --- verified

People

(Reporter: gregtatum, Assigned: rcaliman)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

  • Go to gregtatum.com
  • Use the inspect element button to inspect the "programming is poetry" graphic.
  • Mouse over the tag in the inspector, this will show the box layout highlighter on the page.
  • Repeatedly refresh the page while inspecting the element.

Expected results:

  • The highlighter should continue to highlight the element, margins, and paddings.

Actual results:

  • The highlighter disappears forever on the page. The only way to get it back is to close the tab, and re-open.
  • No errors appear in the browser console.

I can reproduce this on 81 and 82 on macOS.

I get the following error on Nightly:

Error: Unexpected packet null, {"from":"server1.conn0.windowGlobal15032385539/frameTarget1","error":"noSuchActor","message":"No such actor for ID: server1.conn0.windowGlobal15032385539/frameTarget1"}
    onPacket resource://devtools/shared/protocol/Front.js:320
    onPacket resource://devtools/client/devtools-client.js:492
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Front.js:321:15

Error: Unexpected packet null, {"from":"server1.conn0.windowGlobal15032385539/frameTarget1","error":"noSuchActor","message":"No such actor for ID: server1.conn0.windowGlobal15032385539/frameTarget1"}
    onPacket resource://devtools/shared/protocol/Front.js:320
    onPacket resource://devtools/client/devtools-client.js:492
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
ThreadSafeDevToolsUtils.js:82:13

However, I get this error only when the "Multiprocess Browser Console" is open, so I don't know if it's related.

This may also be what folks are reporting in Bug 1352121. However, those steps to reproduce seemed rather old, so I filed a new bug.

Here is a profile with a high sampling rate of me reproducing the issue. I zoomed in to where it breaks:

https://share.firefox.dev/3mY80Bg

The most interesting stack looks like:

AutoRefreshHighlighter
BoxModelHighlighter
_createHighlighter
_onNavigate
bound
_emit
emit
emit
_navigate
DebuggerProgressListener.prototype.onStateChange<
exports.makeInfallible/<
XPCWrappedJS method call

You can also see the screenshot timeline to see the issue reproduced.

I can reproduce the issue as well (Win10, current Nightly), no Fission

I am also seeing the following in the Browser Console:

Error while detaching the browsing context target: Error: Connection closed, pending request to server1.conn0.windowGlobal2147483649/frameTarget1, type detach failed

Request stack:
request@resource://devtools/shared/protocol/Front.js:274:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19
detach@resource://devtools/client/fronts/targets/browsing-context.js:118:19
_destroyTarget@resource://devtools/client/fronts/targets/target-mixin.js:683:22
async*destroy@resource://devtools/client/fronts/targets/target-mixin.js:628:12
destroy@resource://devtools/client/fronts/targets/browsing-context.js:129:27
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
onPacket@resource://devtools/shared/protocol/Front.js:312:13
onPacket@resource://devtools/client/devtools-client.js:492:13
send/<@resource://devtools/shared/transport/local-transport.js:68:25
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
    purgeRequestsForDestroy resource://devtools/shared/protocol/Front.js:98
    purgeRequests resource://devtools/client/devtools-client.js:693
    onPacket resource://devtools/client/devtools-client.js:484
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
target-mixin.js:722:15
Error: Unexpected packet null, {"from":"server1.conn0.windowGlobal2147483649/frameTarget1","error":"noSuchActor","message":"No such actor for ID: server1.conn0.windowGlobal2147483649/frameTarget1"}
    onPacket resource://devtools/shared/protocol/Front.js:320
    onPacket resource://devtools/client/devtools-client.js:492
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Front.js:321:15
Error: Unexpected packet null, {"from":"server1.conn0.windowGlobal2147483649/frameTarget1","error":"noSuchActor","message":"No such actor for ID: server1.conn0.windowGlobal2147483649/frameTarget1"}
    onPacket resource://devtools/shared/protocol/Front.js:320
    onPacket resource://devtools/client/devtools-client.js:492
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Severity: -- → S3
Component: Inspector → Inspector : Highlighters
Priority: -- → P2
See Also: → 1352121
Assignee: nobody → rcaliman
Status: NEW → ASSIGNED
Priority: P2 → P1

I tested the attached patch and the highlighter continues working even after page refresh (I am following STRs from the comment #0)

Thanks Razvan!

Honza

Comment on attachment 9180189 [details]
Bug 1668265 - [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed

Beta/Release Uplift Approval Request

  • User impact if declined: The DevTools node picker stops responding after reloading the page while the tool is active.
    Users are unable to use the node picker again until they restart DevTools.

This is disruptive for web developers who use a live reload script or hot module reloading, both popular approaches, to automatically see their changes applied to the page.

This fixes a regression introduced by Bug 1607756.

  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: This is already covered by an automated test. But manual verification can be done following these steps:

Steps to test:

  • Open http://techno-barje.fr/fission/wiki-n-ubuntu/
  • Open DevTools and click the node picker icon (upper left corner)
  • Move the mouse over the page and see nodes get highlighted
  • Without clicking to pick a node, refresh the page (click the refresh icon next to the address bar)
  • Continue mousing over the page after refresh

Expected result:
Nodes continue to be highlighted until you click to pick one.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Restores functionality that used to work prior to Firefox 81.
    The change is isolated to the DevTools node picker code and is covered by a new automated test.
  • String changes made/needed:
Attachment #9180189 - Flags: approval-mozilla-beta?
Regressed by: 1607756
Has Regression Range: --- → yes
No longer blocks: 1014279
Blocks: 1670012
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/553b8374fcc2 [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed r=ochameau

We had a flaky test, devtools/client/framework/test/browser_keybindings_01.js
Rewritten, try looks good. Attempting to land again.

Flags: needinfo?(rcaliman)
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60dcec0bfd31 [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: qe-verify+

Comment on attachment 9180189 [details]
Bug 1668265 - [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed

devtools regression fix, approved for 82 rc1

Attachment #9180189 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I am having this issue as well, FF Developer Edition 82.0b9. It seems random to me. I have a video of it but not seeing a way to upload the vid here.

(In reply to Julien Cristau [:jcristau] from comment #17)

https://hg.mozilla.org/releases/mozilla-beta/rev/ce34905a6d52

Thank you very much for picking this up to 82 rc1! Really appreciated!

(In reply to tomliv from comment #18)

I am having this issue as well, FF Developer Edition 82.0b9. It seems random to me. I have a video of it but not seeing a way to upload the vid here.

The issue has been fixed. An uplift will happen soon and will arrive to Firefox Beta and DevEdition within a day or two.

Note it won't be in DevEdition until next week's 83.0b1

I'll keep an eye out. Thanks!

Just an FYI for anyone coming across this in the meantime, I am able to get it working again by closing the Inspector and reopening. No need to close the whole tab.

QA Whiteboard: [qa-triaged]

(In reply to Julien Cristau [:jcristau] from comment #20)

Note it won't be in DevEdition until next week's 83.0b1

Thanks for the clarification, Julien!

Tested the latest Firefox Beta 82. The patch has been applied and the bug is fixed there.

I managed to reproduce the issue on an older version of Nightly (2020-09-30) usinf Windows 10 x64.
I retested everything using latest NIghtly 83.0a1 and Firefox 82.0 on Windows 10 x64, Ubuntu 18.04 x64 and macOS 10.15. The issue is not reproducing anymore.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

I can confirm it's fixed for me on Nightly. Thanks for looking into this Razvan!

Still reproducible for me on Firefox 82.0b9 also with another bug https://youtu.be/hjLbt55AJkg
Steps to reproduce:

  1. Open devtools, hover some DOM elements in inspector or select element with node picker
  2. While hovering DOM elements move cursor quickly out of devtools. Highlighter should highlight any element on the page(this is another bug)
  3. While highlighter still highlights element on the page refresh the page
  4. Selection doesn't work nor with node picker neither with hovering elements in DOM inspector
Component: Inspector: Highlighters → Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: