Closed
Bug 1454228
Opened 7 years ago
Closed 7 years ago
PWA fails launching with "Insecure connection"
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)
Tracking
(fennec?, firefox59 unaffected, firefox60 unaffected, firefox61blocking verified)
VERIFIED
FIXED
Firefox 61
| Tracking | Status | |
|---|---|---|
| fennec | ? | --- |
| firefox59 | --- | unaffected |
| firefox60 | --- | unaffected |
| firefox61 | blocking | verified |
People
(Reporter: ishitatsuyuki, Assigned: droeh)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
|
1.44 KB,
patch
|
jchen
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952
Steps to reproduce:
Launch a PWA from home screen.
Probably first bad build number: 20180415000619
Actual results:
A toast "Insecure connection" was shown. The PWA was opened in a new tab instead of being opened immersively.
Expected results:
It should open full screen and not as a tab.
Comment 1•7 years ago
|
||
Can you give a link to a PWA that exhibits that behaviour?
Component: General → Web Apps
Flags: needinfo?(ishitatsuyuki)
Comment 3•7 years ago
|
||
Can confirm this issue on the latest Nightly build (2018-04-16), with any PWA: twitter.com, pwa.rocks,ft.com.
Devices:
Huawei P9 Lite (Android 6.0)
HTC 10 (Android 8.0)
Status: UNCONFIRMED → NEW
status-firefox59:
--- → unaffected
status-firefox60:
--- → unaffected
status-firefox61:
--- → affected
Ever confirmed: true
Keywords: regression
OS: Unspecified → Android
Hardware: Unspecified → All
Updated•7 years ago
|
tracking-fennec: --- → ?
Updated•7 years ago
|
tracking-firefox61:
--- → +
Comment 4•7 years ago
|
||
I see this with GMail too. We can't ship with this bug.
Severity: normal → blocker
Comment 6•7 years ago
|
||
Yup noticed it as well, seemed like an upgrade issue, However I got taken off this feature / area quite a while ago, hopefully Andreas can find someone?
Flags: needinfo?(dharvey) → needinfo?(abovens)
Comment 7•7 years ago
|
||
This is because the start_url is loaded, but then immediately thereafter, a redirect happens. That's the reason why the PWA is opened in the browser instead.
The same behavior can be observed in gotransit.com
Personally, I'm not sure what is best here... I do think it's a little strange to redirect immediately after launching the start_url: why not point to the right location from the manifest? That said, redirects within the same domain are fine, and perhaps the "Insecure connection" string should be more precise.
Flags: needinfo?(snorp)
Flags: needinfo?(cnevinchen)
Flags: needinfo?(abovens)
Comment 8•7 years ago
|
||
Pinging Snorp and Nevin for their take.
Comment 9•7 years ago
|
||
This behavior also shows on https://pinafore.social as well. It has a start_url of "/?pwa=true". AFAICT it does not do any kind of redirect when you load this URL.
Comment 10•7 years ago
|
||
RyanVM pointed out that I am actually the triage owner for this component, being that I dont do any other work on mobile and am not given any time to work on this, probably best if someone else is found
Comment 11•7 years ago
|
||
That's probably a mistake, Dale. Snorp or someone in his team should be able to assist, I believe.
I think Dylan is planning to look at this soon.
Flags: needinfo?(snorp)
Comment 13•7 years ago
|
||
OK, it seems like this is more serious than I thought. All types of PWAs appear to be affected by this, so this is a serious regression: any PWA that I install and launch from the home screen opens in the browser instead of in standalone mode. Stable is not affected.
Susheel, can this be prioritized?
NI sdaswani: note he's on PTO atm.
Snorp, will your team prioritize this and work on it? I want to make sure this isn't forgotten because it sounds like an important regression to fix. If not, please NI me again.
Flags: needinfo?(snorp)
Flags: needinfo?(sdaswani)
Priority: -- → P1
Comment 15•7 years ago
|
||
Dylan said he'd take a look.
Assignee: nobody → droeh
Flags: needinfo?(snorp)
| Assignee | ||
Comment 16•7 years ago
|
||
Jim, I narrowed this down to your patches for bug 1453537, but nothing is immediately jumping out at me. Any ideas/suggestions?
Flags: needinfo?(nchen)
Comment 17•7 years ago
|
||
The prompt is displayed at [1], so seems like a good start is to debug `onSecurityChange` calls and how its behavior changed.
[1] https://searchfox.org/mozilla-central/rev/11a2ae294f50049e12515b5821f5a396d951aacb/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java#117
Flags: needinfo?(nchen)
Comment 18•7 years ago
|
||
Clearing NI as it seems to be a platform issues and/or assigned, feel free to re-add me if necessary.
Flags: needinfo?(sdaswani)
| Assignee | ||
Comment 20•7 years ago
|
||
It looks like the issue is the removal of browser.stop() from startup() in geckoview.js; without that we (for some reason) get a bogus initial onSecurityChange which causes us to exit the PWA.
Attachment #8971227 -
Flags: review?(nchen)
Comment 21•7 years ago
|
||
Comment on attachment 8971227 [details] [diff] [review]
Revert a GV change to fix PWA bustage
Review of attachment 8971227 [details] [diff] [review]:
-----------------------------------------------------------------
We want the initial load for consistency with e10s. We should just ignore the onSecurityChange call for the about:blank load.
Attachment #8971227 -
Flags: review?(nchen) → review-
I would *really* like to kill the initial about:blank nonsense. Apparently, this is difficult. Bug 1447406 has some stuff on that.
| Assignee | ||
Comment 23•7 years ago
|
||
Fair enough, let's just not fire onSecurityChange for that load.
Attachment #8971227 -
Attachment is obsolete: true
Attachment #8971430 -
Flags: review?(nchen)
Comment 24•7 years ago
|
||
Comment on attachment 8971430 [details] [diff] [review]
Don't fire onSecurityChange for about:blank
Review of attachment 8971430 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/modules/geckoview/GeckoViewProgress.jsm
@@ +250,5 @@
> return;
> }
>
> + // Don't fire onSecurityChanged for about:blank loads.
> + if (aRequest.QueryInterface(Ci.nsIChannel).URI.displaySpec === "about:blank") {
Wouldn't this disable `onSecurityChange` for all "about:blank" loads? We only want to disable the first one, otherwise if the user explicitly loads "about:blank", they will be left with stale security information.
Comment 25•7 years ago
|
||
I suggest just putting the workaround in WebAppActivity itself.
| Assignee | ||
Comment 26•7 years ago
|
||
Attachment #8971430 -
Attachment is obsolete: true
Attachment #8971430 -
Flags: review?(nchen)
Attachment #8971621 -
Flags: review?(nchen)
Comment 27•7 years ago
|
||
Comment on attachment 8971621 [details] [diff] [review]
Ignore first about:blank load for PWAs.
Review of attachment 8971621 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
@@ +114,5 @@
>
> @Override
> public void onSecurityChange(GeckoSession session, SecurityInformation security) {
> + // We want to ignore the extraneous first about:blank load
> + if (mIsFirstLoad) {
Check that |security.origin| starts with "moz-nullprincipal:", which should be true for about:blank
Attachment #8971621 -
Flags: review?(nchen) → review+
Comment 28•7 years ago
|
||
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ebd471b8e07
Ignore onSecurityChange for initial about:blank load in PWAs. r=jchen
Comment 29•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Updated•7 years ago
|
Flags: needinfo?(cnevinchen) → qe-verify+
Comment 30•7 years ago
|
||
Verified as fixed on Beta 61.0b3.
Devices:
Sony Xperia Z2 (Android 6.0.1)
Samsung Galaxy Note 8 (Android 7.1.1)
Flags: qe-verify+
Updated•7 years ago
|
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•