Fenix: FNX2-15680 ⁃ [Bug] WebPush messages are not properly delivered

Created on 16 Apr 2020  ·  9Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. navigate to https://gauntface.github.io/simple-push-demo/
  2. make sure "Enable Push Notifications" is disabled
  3. toggle "Enable Push Notifications" to be active
  4. enter a payload text
  5. tap send
  6. --> Result 1
  7. Connect device to remote debugger
  8. copy the network request that triggers a new push notification as cURL
  9. close fenix via android activity manager
  10. connect to device via ADB logcat
  11. paste cURL command into terminal and send request
  12. --> Result 2
  13. Launch fenix activity via android launcher
  14. use cURL command once more
  15. --> Result 3
  16. reopen tab with https://gauntface.github.io/simple-push-demo/
  17. connect remote debugger to tab
  18. issue cURL command again
  19. --> Result 4
  20. enter payload text
  21. tap send
  22. --> Result 5

Expected behavior

  1. works as expected

2 - 5. A notification should be created

Actual behavior

  1. logcat shows that fenix is started in the background and that a push message is being processed, but no notification is triggered by the service worker.
  2. same result as 2, launching the main activity doesn't change anything.
  3. the remote debugger prints the log message "Received push" after the cURL command is issued. This seems to indicate that the message is delivered to the service worker but creating a notification somehow fails.
  4. This sometimes didn't trigger the "Received push" log message which seemed to indicate that the push was not delivered to the service worker, but when I tried it again later, it did. So I'm not quite sure about this last one.

Device information

  • Android device: SONY Xperia 10, Android 9
  • Fenix version: Nightly 200415 18:00 (Build #21061806)

Mentioning @jonalmeida because I think he worked on this.

engverified gv 🐞 bug 🙅 waiting

All 9 comments

Thanks for filing @TitanNano ! This is a known issue that is being worked on.

GV issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1611035

@jonalmeida aww I see. I only checked here on GitHub for existing reports. Should we keep this open in here too, or should I close it since it's already being tracked on Bugzilla?

Let's keep this open to get a sense of what product priority this is for Fenix.

GeckoView bug has been resolved and the nightly build has propagated down into Fenix. I can confirm that this works now.

GeckoView bug has been resolved and the nightly build has propagated down into Fenix. I can confirm that this works now.

It almost works _too_ well now. 😅

For QA, some simplified STR:

Steps to reproduce

  1. Go to https://gauntface.github.io/simple-push-demo/
  2. Toggle the 'Enable Push Notification' on.
  3. Send a notification.
  4. Swipe the app away.
  5. Re-open the tab and send a notification again.

Expected

  • At 3 and 5, the notification should be sent.

Actual

  • At only 3 the notification is sent.

Hi, verified as fixed on the latest Nightly Build 200529 from 5/29 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)

► Video
20200529-101646

@jonalmeida this issue came back (with a different reason I think).

The following error is thrown when a push notification is received and Fenix is not running or didn't visit the origin site since launch:

 NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIPushNotifier.notifyPushWithData] GeckoViewPushController.jsm:67
    onEvent resource://gre/modules/GeckoViewPushController.jsm:67

I tested this with https://gauntface.github.io/simple-push-demo/ again.

I filed BZ-1660867 for this since it seems to be a GeckoView bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robsmith11 picture robsmith11  ·  3Comments

topotropic picture topotropic  ·  3Comments

andreicristianpetcu picture andreicristianpetcu  ·  3Comments

abodea picture abodea  ·  3Comments

andreicristianpetcu picture andreicristianpetcu  ·  3Comments