Fennec GeckoView hangs if Gecko isn't already running (with extension using blocking webRequest listener)
Categories
(Firefox for Android Graveyard :: Custom Tabs, defect, P2)
Tracking
(geckoview64 unaffected, firefox62 unaffected, firefox63 unaffected, firefox64+ wontfix, firefox65 wontfix, firefox66+ verified, firefox67 verified)
Tracking | Status | |
---|---|---|
geckoview64 | --- | unaffected |
firefox62 | --- | unaffected |
firefox63 | --- | unaffected |
firefox64 | + | wontfix |
firefox65 | --- | wontfix |
firefox66 | + | verified |
firefox67 | --- | verified |
People
(Reporter: tech4pwd, Assigned: JanH)
References
Details
(Keywords: testcase, Whiteboard: [priority:high])
Attachments
(3 files)
581.06 KB,
text/plain
|
Details | |
1.88 KB,
application/x-xpinstall
|
Details | |
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release-
|
Details | Review |
Reporter | ||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Updated•7 years ago
|
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Reporter | ||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Comment 21•7 years ago
|
||
Comment 22•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 23•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Comment 25•7 years ago
|
||
Comment 26•7 years ago
|
||
Comment 28•7 years ago
|
||
Reporter | ||
Comment 29•7 years ago
|
||
Updated•7 years ago
|
Comment 30•7 years ago
|
||
Comment 31•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 32•7 years ago
|
||
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
Updated•7 years ago
|
Comment 35•7 years ago
|
||
Comment 36•7 years ago
|
||
Comment 37•7 years ago
|
||
Comment 39•6 years ago
|
||
Comment 40•6 years ago
|
||
Reporter | ||
Comment 42•6 years ago
|
||
Reporter | ||
Comment 43•6 years ago
|
||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
Comment 46•6 years ago
|
||
Comment 47•6 years ago
|
||
Comment 48•6 years ago
|
||
Comment 49•6 years ago
|
||
Dylan are you still working on this or should we hand it off to the Fennec team?
Comment 50•6 years ago
|
||
(In reply to Liz Henry (:lizzard) (use needinfo) from comment #49)
Dylan are you still working on this or should we hand it off to the Fennec team?
As far as I can see, any complete fix for this is going to be Fennec-specific and won't likely contribute to GV, so I'm going to unassign myself.
Updated•6 years ago
|
Comment 51•6 years ago
|
||
I think Jan's patch from bug 1494748 should also resolve this so this should be checked again after that patch gets merged.
Comment 52•6 years ago
|
||
It's still not solved even if the bug 1494748 was fixed on the latest nightly .. when an Adblock module is active I can't have custom tabs working if I killed Firefox nightly from the recent app
Assignee | ||
Comment 53•6 years ago
|
||
To be honest, personally I wouldn't have expected any improvement there from my patch, either.
Comment 54•6 years ago
|
||
I can confirm that the problem goes away if I disable uBlock Origin. I was testing opening a link from the Gmail app in Firefox 64.0.2 (installed from Google Play Store) on Android 9 (Pie) on a Nokia 6.1. (I also have the same problem opening links from Reddit Sync, but didn't try that with the add-on disabled.)
Assignee | ||
Comment 56•6 years ago
|
||
Bug 1520992 has some more info that would fit the theory about this happening in combination with certain extensions.
While testing something unrelated, yesterday I've also experienced the case where the initial load in a custom tab would in fact work, but subsequently clicking on a link would hang. So it seems there's another bug in that the very first request might not actually be handled by the extension, which is good for this bug, but another issue in itself.
Comment 57•6 years ago
|
||
(In reply to nandhp from comment #54)
I can confirm that the problem goes away if I disable uBlock Origin. I was testing opening a link from the Gmail app in Firefox 64.0.2 (installed from Google Play Store) on Android 9 (Pie) on a Nokia 6.1. (I also have the same problem opening links from Reddit Sync, but didn't try that with the add-on disabled.)
With my oneplus 6t on android pie the bug of a non-loading custom tabs (tabs stay white trying to load infinitly) only appear if there's a adblocking module active and firefox nightly killed from recent.. If the adblocking module is disabled , custom tabs (from sync for reddit/ gmail / all other app that use custom tabs) works great even if Firefox nightly is killed from recent .. so yeah the issue is with module handling i think
Comment 58•6 years ago
|
||
with extension using webRequest.onBeforeSendHeaders in blocking mode?
uBlock Origin does not install any onBeforeSendHeaders listener; it installs listeners only for onBeforeRequest and onHeadersReceived.
Assignee | ||
Comment 59•6 years ago
|
||
I guess any blocking webRequest listener will do...
If somebody could bundle up a minimal testcase extension along the lines of bug 1520992 comment 0, this would be appreciated.
Updated•6 years ago
|
Comment 61•6 years ago
|
||
@lizzard
As written Firefox nightly is affected too .. so 67 if affected too
Assignee | ||
Comment 64•6 years ago
|
||
(In reply to Jan Henning [:JanH] from comment #59)
If somebody could bundle up a minimal testcase extension along the lines of bug 1520992 comment 0, this would be appreciated.
Never mind, I found something in the webextensions sample repository.
Comment 65•6 years ago
|
||
There seemed to be some confusion as to how to reproduce this bug earlier in its history, unsure if that's been clarified or not yet?
Anywhere, here are a very simple set of steps that I can use to reproduce it every time (assuming an extension such as uBlock Origin is active):
- Press the "app switcher" virtual button on the phone (left button on Samsungs, right button on most other phones)
- Swipe both Firefox and its custom apps away to quit them (if any are running)
- Open the custom tab again
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 66•6 years ago
|
||
Once a webextension using a blocking WebRequest listener has started loading,
all network connections covered by the extension's manifest are held until the
extension is ready the process them.
One condition for the extension being ready apparently includes browser startup
having progressed far enough, as signified by "browser-delayed-startup-finished"
having been dispatched.
Therefore, we have to start sending that notification when opening a new Gecko-
View window, too, and copy Fennec's InitLater() system for that.
Unlike Fennec, we cannot tie registration of those InitLater() runnables to the
initial content load having progressed far enough because of
a) e10s, which makes that approach neither easily possible nor really sensible,
as content will load in a different process in that case, and
b) because we're racing with extension startup here - if extensions are loaded
quick enough to block even the initial page load, we'd be deadlocked: We
cannot send the notification until the page finishes loading, but the page
cannot load until we send the notification. Fennec isn't affected by the
latter problem because "sessionstore-windows-restored", which Fennec will
send in any case, serves as an alternative pathway for completing extension
startup.
And unlike Desktop, we don't really have any chrome content to paint, so we
cannot tie delayed initialisation to a paint listener for that, either.
Therefore, we simply fire off a runnable at the end of geckoview.js's
startup() method, which should give more pressing initialisation tasks enough of
a headstart.
For completeness, we're also adding the "browser-idle-startup-tasks-finished"
notification and thereby solve bug 1465832 as well, allowing the ScriptPreloader
to detect which scripts are commonly loaded during GeckoView startup and to
start caching and pre-parsing them.
Comment 68•6 years ago
|
||
Comment 69•6 years ago
|
||
bugherder |
Comment 70•6 years ago
|
||
So it's fixed on today nightly build ?
Assignee | ||
Comment 71•6 years ago
|
||
Yes, should be.
Comment 72•6 years ago
|
||
It's working for me now in the latest Nightly available from the play store.
Comment 73•6 years ago
|
||
Yeah seems solved for me too :) I'll make more test after work
Assignee | ||
Comment 74•6 years ago
|
||
Comment on attachment 9041877 [details]
Bug 1496684 - Dispatch commonly expected startup notifications when opening a GeckoView window. r?snorp
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
unclear
User impact if declined
For users with extensions using blocking WebRequest listeners, e.g. adblockers, pages in custom tabs/PWAs might not load if Firefox isn't already running.
Is this code covered by automated tests?
No
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
Install a corresponding extension, e.g. uBlock Origin, and then follow comment #65.
List of other uplifts needed
none
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
GeckoView was merely missing a notification that was expected by other platform code (including extension startup) to detect browser window initialisation.
String changes made/needed
none
Comment 76•6 years ago
|
||
Comment on attachment 9041877 [details]
Bug 1496684 - Dispatch commonly expected startup notifications when opening a GeckoView window. r?snorp
Fix for a hang, verified in Nightly, let's uplift for beta 7.
Comment 78•6 years ago
|
||
Comment on attachment 9041877 [details]
Bug 1496684 - Dispatch commonly expected startup notifications when opening a GeckoView window. r?snorp
Glad to see this going into Fx66, but I don't think this needs to be in the dot release.
Updated•6 years ago
|
Comment 79•6 years ago
|
||
bugherder uplift |
Comment 80•6 years ago
|
||
Verified on the latest version of Beta 66.0b7 using steps from comment 65.
Devices:
-OnePlus 5T (Android 9);
-Samsung Galaxy S8 (Android 8.0).
Due to that, I'll mark this issue as Verified, thanks.
Updated•4 years ago
|
Description
•