Open Bug 1691950 Opened 3 years ago Updated 3 years ago

Several ExtensionParent errors in browser console regarding an unavailable FrameMessageManager after importing data with --migration command

Categories

(WebExtensions :: General, defect)

Desktop
All
defect

Tracking

(firefox85 wontfix, firefox86 wontfix, firefox87 fix-optional)

Tracking Status
firefox85 --- wontfix
firefox86 --- wontfix
firefox87 --- fix-optional

People

(Reporter: atrif, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

Attached image migration.gif

Affected versions

  • 87.0a1 (20210209214921)
  • 86.0b8 (20210209185733)
  • 85.0.2 (20210208133944)

Affected platforms

  • Windows 10x64
  • Ubuntu 18.04
  • macOS 10.15

Steps to reproduce

  1. Open Firefox with -migration -p command.
  2. Select to import data from any browser.
  3. After importing is complete, open the browser console.

Expected result

  • No errors are displayed.

Actual result

  • Several
    can't access property "loadFrameScript", browser.messageManager is undefined - ExtensionParent.jsm:430 this.browser.loadURI is not a function - ext-backgroundPage.js:70 errors are displayed in the browser console.

Regression range

  • I will search for one ASAP.

Notes

  • The errors are not displayed if the data is imported from Library -> Import data and Backup -> Import Data from another browser.
  • Attached a screen recording.
  • Attached console log: link.
Has Regression Range: --- → no
Has STR: --- → yes
QA Whiteboard: [qa-regression-triage]
Has Regression Range: no → yes
Component: Migration → General
Product: Firefox → WebExtensions
Summary: Several errors in browser console after importing data with --migration command → Several ExtensionParent errors in browser console regarding an unavailable FrameMessageManager after importing data with --migration command

This issue does not appear to be specific to extensions. There is also the following error message before any extension errors:

TypeError: can't access property "addMessageListener", this.mm is undefined SanityTest.jsm:294:7

references code at https://searchfox.org/mozilla-central/rev/8d9564059dbc1e36fb9152e6b6227343d0b49662/toolkit/components/gfx/SanityTest.jsm#291,297

Based on the analysis below, it's more likely an issue with timing related to migration, and/or registration of the custom element (browser-custom-element.js).

Questions for reporter:

  • Is the console output from the report consistent?
  • Do these errors always appear, and in that order?
  • Is anyone looking into the SanityTest.jsm errors? If this is consistently the first error in the log, it may be easier to investigate than to investigate the more complicated flow through the implementation of the extension framework.
  • When this error occurs, does the Screenshots add-on work? (probably not)

Both SanityTest.jsm and the extension code (ExtensionParent.jsm / ext-backgroundPage.js) have a similar error, that the <browser>'s get messageManager method have returned undefined: https://searchfox.org/mozilla-central/rev/8d9564059dbc1e36fb9152e6b6227343d0b49662/toolkit/content/widgets/browser-custom-element.js#471,477 (OR the MozBrowser custom element in browser-custom-element.js is not registered, in which case browser.messageManager doesn't trigger the getter and the undefined value is seen).

The extension code only reaches that point at https://searchfox.org/mozilla-central/rev/8d9564059dbc1e36fb9152e6b6227343d0b49662/toolkit/components/extensions/parent/ext-backgroundPage.js#59,67,70
when XULFrameLoaderCreated has been observed at https://searchfox.org/mozilla-central/rev/8d9564059dbc1e36fb9152e6b6227343d0b49662/toolkit/components/extensions/ExtensionParent.jsm#1177,1199,1208-1209
... so the frameLoader should be there, yet somehow browser.messageManager and/or (browser.)frameLoader.messageManager is undefined

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: