I'm cross-posting this issue: https://github.com/darkreader/darkreader/issues/3968
Succession of these steps doesn't matter, the Dark Reader extension can be activated before loading that URL, or after.
Firefox should keep working.
Firefox displays a loading animation, then gets killed by the OS in a couple of seconds. Here's a screen capture that doesn't capture that moment, because if I wait that long, the screen recorder gets killed with it too:
https://1drv.ms/v/s!AjsDtucE3_zVo-IlLPJTRUb9uW7roA
Note that I tested this in Firefox on the desktop too (macOS), and it's not reproducible on the desktop.
I was able to reproduce this issue partially on the 10/29 Nightly, on beta 83.0.0-beta.2, and RC 82.1.1 builds with Sony Xperia Z5 Premium (Android 7.1.1), and Samsung Galaxy Tab S6 (Android 10).
The page keeps loading, without the user acting on it.
Maybe the attached logcat might help.
logcat.txt.txt
Additional details: The page gets stuck loading and also, if you try to open the Dark reader settings page, it also gets stuck with "Loading, please wait" message.
These are the logcat errors when opening extension settings page:
2020-11-03 15:49:45.936 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "can't access property "gMultiProcessBrowser", chromeWin is null" {file: "resource://gre/modules/PrivateBrowsingUtils.jsm" line: 41}]
isBrowserPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:41:9
canAccessTab@chrome://geckoview/content/ext-android.js:560:29
getWrapper@chrome://extensions/content/parent/ext-tabs-base.js:1975:14
get activeTab@chrome://geckoview/content/ext-android.js:527:23
candidates@chrome://extensions/content/parent/ext-tabs-base.js:2047:11
query@chrome://extensions/content/parent/ext-tabs-base.js:2066:7
query@chrome://geckoview/content/ext-tabs.js:466:24
recvAPICall/result</<@resource://gre/modules/ExtensionParent.jsm:958:68
withPendingBrowser@resource://gre/modules/ExtensionParent.jsm:489:26
recvAPICall/result<@resource://gre/modules/ExtensionParent.jsm:958:24
callAndLog@resource://gre/modules/ExtensionParent.jsm:920:14
recvAPICall@resource://gre/modules/ExtensionParent.jsm:957:25
2020-11-03 15:49:45.949 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "Unchecked lastError value: Error: An unexpected error occurred" {file: "moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js" line: 1787}]
queryTabs/<@moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js:1787:25
2020-11-03 15:49:45.963 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "TypeError: can't access property 0 of undefined" {file: "moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js" line: 1900}]
2020-11-03 15:49:57.546 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "AbortError: Actor 'ExtensionContent' destroyed before query 'Execute' was resolved" {file: "resource://gre/modules/ExtensionCommon.jsm" line: 739}]
normalizeError@resource://gre/modules/ExtensionCommon.jsm:739:10
recvAPICall/<@resource://gre/modules/ExtensionParent.jsm:973:29
2020-11-03 15:49:57.547 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "AbortError: Actor 'ExtensionContent' destroyed before query 'Execute' was resolved" {file: "resource://gre/modules/ExtensionCommon.jsm" line: 739}]
normalizeError@resource://gre/modules/ExtensionCommon.jsm:739:10
recvAPICall/<@resource://gre/modules/ExtensionParent.jsm:973:29
2020-11-03 15:49:57.727 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "TypeError: can't access property "sendAsyncMessage", this._manager.messageManager is null" {file: "chrome://geckoview/content/geckoview.js" line: 501}]
_updateContentModuleState@chrome://geckoview/content/geckoview.js:501:5
set enabled@chrome://geckoview/content/geckoview.js:481:10
init/</<@chrome://geckoview/content/geckoview.js:111:9
forEach@chrome://geckoview/content/geckoview.js:142:19
init/<@chrome://geckoview/content/geckoview.js:110:12
2020-11-03 15:49:59.655 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "Permission error: undefined" {file: "resource://gre/modules/GeckoViewPermission.jsm" line: 271}]
prompt/<@resource://gre/modules/GeckoViewPermission.jsm:271:12
2020-11-03 15:49:59.656 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "Permission error: undefined" {file: "resource://gre/modules/GeckoViewPermission.jsm" line: 271}]
prompt/<@resource://gre/modules/GeckoViewPermission.jsm:271:12
2020-11-03 15:49:59.656 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIContentPermissionRequest.cancel]" {file: "resource://gre/modules/GeckoViewPermission.jsm" line: 275}]
2020-11-03 15:49:59.657 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIContentPermissionRequest.cancel]" {file: "resource://gre/modules/GeckoViewPermission.jsm" line: 275}]
Also, an important note: This only happens when the mode is set to Dynamic.
Hi!
I got this issue linked, so to give some clarification of possible identifying the bug on Firefox or on our side.
2020-11-03 15:49:45.949 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "Unchecked lastError value: Error: An unexpected error occurred" {file: "moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js" line: 1787}]
queryTabs/<@moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js:1787:252020-11-03 15:49:45.963 15290-15419/org.mozilla.fenix.debug E/GeckoConsole: [JavaScript Error: "TypeError: can't access property 0 of undefined" {file: "moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js" line: 1900}]
I only see 2 error traces back to the extension's code.
Whereby the first one queryTabs/<@moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js:1787:25
Is querying all tabs. The specific code is located at https://github.com/darkreader/darkreader/blob/v4.9.23/src/background/tab-manager.ts#L7
This seems to return a lastError which is being throwned.
This leads to the error JavaScript Error: "TypeError: can't access property 0 of undefined" {file: "moz-extension://0d076bf6-01ac-4eb6-ab7a-85c32fa79fc1/background/index.js" line: 1900}]
Which called the queryTabs function and is located at https://github.com/darkreader/darkreader/blob/v4.9.23/src/background/tab-manager.ts#L150 it seems like we don't have any error checking in place for and probably caused this crash.
Interesting is that this seems to happen in recent versions and as well to happen on specific scenario's where this error is being throwned.
Regards,
Gusted
Most helpful comment
Additional details: The page gets stuck loading and also, if you try to open the Dark reader settings page, it also gets stuck with "Loading, please wait" message.
These are the logcat errors when opening extension settings page: