Closed Bug 1432160 Opened 2 years ago Closed 2 years ago

push notification system does not work with geckoview open

Categories

(GeckoView :: General, defect)

defect
Not set

Tracking

(firefox59 verified, firefox60 verified)

RESOLVED FIXED
mozilla60
Tracking Status
firefox59 --- verified
firefox60 --- verified

People

(Reporter: bkelly, Assigned: jchen)

Details

Attachments

(1 file)

STR:

1. Login and install a webapp that uses push notifications on fennec nightly 59.  Like telegram or twitter.
2. Close the installed webapp.
3. Launch fennec nightly 59 and open https://gauntface.github.io/simple-push-demo/
4. Select "enable push notifications", accept the permission prompt, and click "send a push via xhr".
5. Observe that a push notification is received.
6. Use the tab switcher to kill fennec.
7. Launch the installed webapp from (1).
8. Repeat steps 3 and 4.
9. Observe that the simple-push-demo cannot enable push notifications.  The UI element stays greyed out.

It seems like there is something broken with permissions or the push notification service if geckoview is started before the main browser.

Another effect from this is you basically don't receive push notifications while a geckoview installed webapp is running.  I noticed this after my wife thought I was ignoring her telegram messages.

James, do you have anyone who could look into this?
Flags: needinfo?(snorp)
bkelly: you should also know that telegram, due to a bug, goes offline when idle and ignores push messages. https://github.com/zhukov/webogram/issues/1602
(In reply to Jovan Gerodetti from comment #1)
> bkelly: you should also know that telegram, due to a bug, goes offline when
> idle and ignores push messages.
> https://github.com/zhukov/webogram/issues/1602

Thanks, but that seems unrelated to comment 0.  I can reproduce using twitter and not using telegram at all.
Jim, can you please investigate?
Flags: needinfo?(snorp) → needinfo?(nchen)
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Flags: needinfo?(nchen)
Any luck here?  I basically can't use our installed PWA support right now because of this.  I worry about it getting visibility without our marketing push around PWAs shipping.
I can spend some time on this today.
Is there a bug to get mochitest/WPT tests running in geckoview?
Comment on attachment 8949579 [details]
Bug 1432160 - Initialize PushService for custom tabs / PWA;

https://reviewboard.mozilla.org/r/218956/#review224824
Attachment #8949579 - Flags: review?(snorp) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b4fbfcf77891
Initialize PushService for custom tabs / PWA; r=snorp
I think this is enough to fix the bug, but please reopen if not
Can this be uplifted to beta?  Also, I'm really worried we don't have test coverage for this stuff since we're marketing the install-to-homescreen support.
Flags: needinfo?(nchen)
That seems like a good idea. Let me check with Ritu.
Yeah should be upliftable once it lands in central
Flags: needinfo?(nchen)
https://hg.mozilla.org/mozilla-central/rev/b4fbfcf77891
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Verified as fixed on the latest Nightly build (2018-02-12).
Device: Sony Xperia Z5 Premium (Android 6.0.1)
Comment on attachment 8949579 [details]
Bug 1432160 - Initialize PushService for custom tabs / PWA;

Approval Request Comment
[Feature/Bug causing the regression]: N/A
[User impact if declined]: Unable to use web push when custom tab / PWA is open
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: Slightly
[Why is the change risky/not risky?]: The patch initializes web push for cases where we didn't before -- when using custom tab /PWA; it's possible but unlikely this can introduce regressions
[String changes made/needed]: None
Attachment #8949579 - Flags: approval-mozilla-beta?
Comment on attachment 8949579 [details]
Bug 1432160 - Initialize PushService for custom tabs / PWA;

Product team (abovens) would like this uplifted to 59, fix has been verified on Nightly, Beta59+
Attachment #8949579 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on the latest Beta build, 59.0b11.

This issue was verified using a Sony Xperia Z3 - Android 5.1.1
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 60 → mozilla60
You need to log in before you can comment on or make changes to this bug.