Closed Bug 1544261 Opened 5 years ago Closed 5 years ago

Perma tier2 devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_reload.js | A promise chain failed to handle a rejection: accessible._form is undefined - stack: getActorID@resource://devtools/client

Categories

(DevTools :: about:debugging, defect, P5)

defect

Tracking

(firefox-esr60 unaffected, firefox66 unaffected, firefox67 unaffected, firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jdescottes)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(2 files)

#[markdown(off)]
Filed by: apavel [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=240185809&repo=mozilla-central

https://queue.taskcluster.net/v1/task/ZTZv-LgrSjWPrbdGM5N5OQ/runs/0/artifacts/public/logs/live_backing.log

00:40:41 INFO - TEST-START | devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_reload.js
00:40:44 INFO - GECKO(10224) | console.log: "[DISPATCH] action type:" "CLEAR_FLEXBOX"
00:40:45 INFO - GECKO(10224) | console.warn: "Error while detaching the thread front: No such actor for ID: server1.conn34.child1/context18"
00:40:47 INFO - GECKO(10224) | console.log: "[DISPATCH] action type:" "CLEAR_FLEXBOX"
00:40:48 INFO - GECKO(10224) | console.warn: "Error while detaching the browsing context target front: undefined"

00:41:52 INFO - TEST-PASS | devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_reload.js | about:devtools-toolbox page displays correctly -
00:41:52 INFO - Close about:devtools-toolbox page
00:41:52 INFO - Wait for removeTab
00:41:52 INFO - Removing tab.
00:41:52 INFO - Waiting for event: 'TabClose' on [object XULElement].
00:41:52 INFO - Got event: 'TabClose' on [object XULElement].
00:41:52 INFO - Tab removed and finished closing
00:41:52 INFO - Wait for toolbox destroyed
00:41:52 INFO - Buffered messages logged at 00:41:50
00:41:52 INFO - Wait until aboutdebugging is selected
00:41:52 INFO - Wait until about:devtools-toolbox is removed from debug targets
00:41:52 INFO - Buffered messages logged at 00:41:51
00:41:52 INFO - Removing tab.
00:41:52 INFO - Waiting for event: 'TabClose' on [object XULElement].
00:41:52 INFO - Got event: 'TabClose' on [object XULElement].
00:41:52 INFO - Tab removed and finished closing
00:41:52 INFO - Buffered messages finished
00:41:52 INFO - TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_reload.js | A promise chain failed to handle a rejection: accessible._form is undefined - stack: getActorID@resource://devtools/client/accessibility/reducers/accessibles.js:38:3
00:41:52 INFO - cleanupChild@resource://devtools/client/accessibility/reducers/accessibles.js:49:19
00:41:52 INFO - onReceiveChildren@resource://devtools/client/accessibility/reducers/accessibles.js:127:3
00:41:52 INFO - accessibles@resource://devtools/client/accessibility/reducers/accessibles.js:26:14
00:41:52 INFO - combination@resource://devtools/client/shared/vendor/redux.js:630:29
00:41:52 INFO - dispatch@resource://devtools/client/shared/vendor/redux.js:408:22
00:41:52 INFO - waitUntilService/</<@resource://devtools/client/shared/redux/middleware/wait-service.js:59:20
00:41:52 INFO - promiseMiddleware/</<@resource://devtools/client/shared/redux/middleware/promise.js:16:14
00:41:52 INFO - thunk/</<@resource://devtools/client/shared/redux/middleware/thunk.js:16:9
00:41:52 INFO - task/</<@resource://devtools/client/shared/redux/middleware/task.js:39:12
00:41:52 INFO - dispatch@resource://devtools/client/shared/vendor/redux.js:755:18
00:41:52 INFO - exports.fetchChildren/</<@resource://devtools/client/accessibility/actions/accessibles.js:15:21
00:41:52 INFO - promise callback*exports.fetchChildren/<@resource://devtools/client/accessibility/actions/accessibles.js:15:6
00:41:52 INFO - thunk/</<@resource://devtools/client/shared/redux/middleware/thunk.js:15:9
00:41:52 INFO - task/</<@resource://devtools/client/shared/redux/middleware/task.js:39:12
00:41:52 INFO - getChildren@resource://devtools/client/accessibility/provider.js:35:19
00:41:52 INFO - getMembers@resource://devtools/client/shared/components/tree/TreeView.js:466:31
00:41:52 INFO - renderRows@resource://devtools/client/shared/components/tree/TreeView.js:534:28
00:41:52 INFO - render@resource://devtools/client/shared/components/tree/TreeView.js:603:23
00:41:52 INFO - finishClassComponent@resource://devtools/client/shared/vendor/react-dom.js:10332:31
00:41:52 INFO - updateClassComponent@resource://devtools/client/shared/vendor/react-dom.js:10295:10
00:41:52 INFO - beginWork@resource://devtools/client/shared/vendor/react-dom.js:10894:14
00:41:52 INFO - performUnitOfWork@resource://devtools/client/shared/vendor/react-dom.js:12713:12
00:41:52 INFO - workLoop@resource://devtools/client/shared/vendor/react-dom.js:12730:24
00:41:52 INFO - renderRoot@resource://devtools/client/shared/vendor/react-dom.js:12770:7
00:41:52 INFO - performWorkOnRoot@resource://devtools/client/shared/vendor/react-dom.js:13359:22
00:41:52 INFO - performWork@resource://devtools/client/shared/vendor/react-dom.js:13281:7
00:41:52 INFO - performSyncWork@resource://devtools/client/shared/vendor/react-dom.js:13253:3
00:41:52 INFO - requestWork@resource://devtools/client/shared/vendor/react-dom.js:13153:5
00:41:52 INFO - scheduleWork$1@resource://devtools/client/shared/vendor/react-dom.js:13022:11
00:41:52 INFO - scheduleRootUpdate@resource://devtools/client/shared/vendor/react-dom.js:13566:3
00:41:52 INFO - updateContainerAtExpirationTime@resource://devtools/client/shared/vendor/react-dom.js:13581:10
00:41:52 INFO - updateContainer@resource://devtools/client/shared/vendor/react-dom.js:13608:10
00:41:52 INFO - ReactRoot.prototype.render@resource://devtools/client/shared/vendor/react-dom.js:13853:3
00:41:52 INFO - legacyRenderSubtreeIntoContainer/<@resource://devtools/client/shared/vendor/react-dom.js:13965:14
00:41:52 INFO - unbatchedUpdates@resource://devtools/client/shared/vendor/react-dom.js:13478:10
00:41:52 INFO - legacyRenderSubtreeIntoContainer@resource://devtools/client/shared/vendor/react-dom.js:13961:5
00:41:52 INFO - render@resource://devtools/client/shared/vendor/react-dom.js:14012:12
00:41:52 INFO - initialize@resource://devtools/client/accessibility/accessibility-view.js:69:31
00:41:52 INFO - async*onMessage@resource://devtools/client/accessibility/accessibility-view.js:114:19
00:41:52 INFO - postContentMessage@resource://devtools/client/accessibility/panel.js:171:19
00:41:52 INFO - refresh@resource://devtools/client/accessibility/panel.js:136:10
00:41:52 INFO - onPanelVisibilityChange/<@resource://devtools/client/accessibility/panel.js:119:35
00:41:52 INFO - Rejection date: Sun Apr 14 2019 00:41:46 GMT+0000 (Greenwich Mean Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 257
00:41:52 INFO - Stack trace:
00:41:52 INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:257
00:41:52 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1140
00:41:52 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1144
00:41:52 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1005
00:41:52 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
00:41:52 INFO - Leaving test bound
00:41:52 INFO - Console message: [JavaScript Error: "NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIObserverService.removeObserver]" {file: "resource://devtools/server/actors/storage.js" line: 2604}]
00:41:52 INFO - GECKO(10224) | MEMORY STAT | vsize 7431MB | vsizeMaxContiguous 67421564MB | residentFast 671MB | heapAllocated 373MB
00:41:52 INFO - TEST-OK | devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_reload.js | took 70591ms

This appears to be from 1538731, Julian please take a look.

Flags: needinfo?(jdescottes)
Regressed by: 1538731

It looks like the accessibility panel has some issues on windows10-aarch64 opt? Most likely the same issue as Bug 1543588 (for browser_devtools_api.js)
Both tests are indirectly loading the accessibility inspector as part of the test, but maybe we are not waiting for the accessibility inspector to be properly initialized?

The test here waits for await selectTool() and toolbox's "toolbox-ready" event.
The other test is waiting for toolbox's "select" event.

But I see that the head.js of the accessibility panel includes the following "init" logic:

  await waitUntilState(store, state =>
    state.accessibles.size === 1 && state.details.accessible &&
    state.details.accessible.role === "document");

  // Wait for inspector load here to avoid protocol errors on shutdown, since
  // accessibility panel test can be too fast.
  await win.gToolbox.loadTool("inspector");

Yura, does the exception here ring a bell? "accessible._form is undefined - stack: getActorID@resource://devtools/client/accessibility/reducers/accessibles.js:38:3"
Could it be linked to the fact that we are not waiting for the state + inspector load in those tests? And if yes should we just work around it or is there anyway to include this in the tool itself, so that "ready" fires when the panel is really ready?

Flags: needinfo?(jdescottes) → needinfo?(yzenevich)
See Also: → 1543588

Investigated a bit more, and it seems here we fail after FETCH_CHILDREN request that is done when the AccessibilityTree component is mounted. This means that accessibility is enabled on this platform (by default?) even though we don't expect it to be?

Try at https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb3578f53aef4dbd095f217af581dab625c22969 to verify waiting for full init fixes the issue.

See Also: → 1543665, 1543586

We have currently 4 intermittents related to the same issue with the accessibility panel, Bug 1543588, Bug 1543665 and Bug 1543586 (and this bug). The current patch attached here fixes the issue for the aboutdebugging test, but maybe we could have a more global fix?

(In reply to Julian Descottes [:jdescottes] from comment #3)

Investigated a bit more, and it seems here we fail after FETCH_CHILDREN request that is done when the AccessibilityTree component is mounted. This means that accessibility is enabled on this platform (by default?) even though we don't expect it to be?

Try at https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb3578f53aef4dbd095f217af581dab625c22969 to verify waiting for full init fixes the issue.

Hmm this is probably true. Something on this platform triggers accessibility so the panel tries to build the tree since it's enabled by defaults.. In default case (when accessibility service is not enabled) the panel does not do that. I agree, this can probably be fixed in 3 ways:

  • figure out what causes a11y to be initialized. this might be hard as we might not necessarily know what the accessibility client on the platform is. Sometimes it's some software, sometimes it's a touchscreen, onscreen keyboard etc.

  • only fire ready when the panel UI is loaded

  • have this workaround.

I think the first approach will have to be investigated in any case, since it might affect test even outside of the devtools, so a workaround is probably OK for now.

Flags: needinfo?(yzenevich)

I think I should checking for the actual condition that results in failure (when _form is undefined on the front) so I'm trying it here https://treeherder.mozilla.org/#/jobs?repo=try&revision=f933970490bd542a441e0546aafe9bc4f1e74cfc

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Depends on D27468

As suggested, some additonal tests that should be skipped on this platform.
A first batch of tests were disabled in Bug 1533184

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c5502ff1c1c
Wait for a11y panel to be fully initialized in devtools-toolbox test;yzen r=yzen
https://hg.mozilla.org/integration/autoland/rev/0e9aea59c0b5
Skip tests that try to disable a11y service on aarch64 r=yzen

(In reply to Yura Zenevich [:yzen] from comment #7)

  • figure out what causes a11y to be initialized. this might be hard as we might not necessarily know what the accessibility client on the platform is. Sometimes it's some software, sometimes it's a touchscreen, onscreen keyboard etc.

Do we / should we have a bug to track that investigation?

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

(In reply to Yura Zenevich [:yzen] from comment #7)

  • figure out what causes a11y to be initialized. this might be hard as we might not necessarily know what the accessibility client on the platform is. Sometimes it's some software, sometimes it's a touchscreen, onscreen keyboard etc.

Do we / should we have a bug to track that investigation?

I need to follow up with Jamie if it's a known issue.

Flags: needinfo?(jteh)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

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

  • figure out what causes a11y to be initialized. this might be hard as we might not necessarily know what the accessibility client on the platform is. Sometimes it's some software, sometimes it's a touchscreen, onscreen keyboard etc.

Do we / should we have a bug to track that investigation?

This is bug 1531537, which is currently blocked on another bug.

Flags: needinfo?(jteh)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: