Fenix: [Bug]problem with push notification

Created on 12 Sep 2020  ·  14Comments  ·  Source: mozilla-mobile/fenix

can please someone tell me why push notication server side is not working for me with Firefox
example https://webpushdemo.azurewebsites.net/
in Samsung internet after 5 seconds i got an android notification

Push 🐞 bug

All 14 comments

cc @jonalmeida

I'm not sure there is much information to go forward with this. I did a quick test with the Azure web push demo site and I received the push notification.

Could it be that you received the push message which defaults to being a silent notification?

If not, could you provide more details on your device, which version of Fenix you're using, and any other steps to help reproduce the issue.

I'm not sure there is much information to go forward with this. I did a quick test with the Azure web push demo site and I received the push notification.

Could it be that you received the push message which defaults to being a silent notification?

If not, could you provide more details on your device, which version of Fenix you're using, and any other steps to help reproduce the issue.

@ale82to could you please take a look at the comment above?

Tested on latest Nightly with Xiaomi Redmi Note 8T (Android 9) and couldn't reproduce the issue.

to be honest no push notifications works for me I opened another bug https://github.com/mozilla-mobile/fenix/issues/15460
also if u search bug reports other people are reporting the same (at least 1)
i use fenix nighlty on lineage OS 14, android 7.1.2.
lookaat the screenshot link it may help.
with any other browsers like Chrome yandex or Samsung i ve got no problems at all!

@ale82to could you post all the version numbers you see in 'About Firefox' from the browser and provide steps to reproduce or (if possible) a video of the bug with this site. I'm closing the other bug as a duplicate of this one since it seems to be related to this same issue.

I tested today nighlty and https://webpushdemo.azurewebsites.net/
I can not receive push notifications at all.
here's the nighlty stats:
Nightly 200929 17:11 (Build #2015766795)
AC: 61.0.20200925190057, 01306f87c
GV: 83.0a1-20200922094538
AS: 63.0.0
since I cannot receive any push notication may be there must be problem with lineage OS another bug report similar to mine come from a user on lineage OS 14.
please if possible help me solve the issue thank you very much
I don't know if it can help please see screenshot about serviceworker
https://drive.google.com/file/d/1bDDzR5qXNC1LfK7EtXm8fXxDGxjeGkbs/view

I am able to get push notifications on LineageOS 16, Asus Zenfone and nightly

@ale82to that's for the version information, unfortunately the service worker screenshot doesn't tell us anything more than we already know.

Could you verify that you have allowed notifications for the site as seen in this bottom drawer when you click the lock 🔒 icon. Here's a screenshot of my device with notifications enabled.
Screen Shot 2020-09-29 at 5 32 22 PM

With @s-ankur 's verification (thanks for that!) we know that WebPush can work fine on LineageOS so this might be something else.

yes I m quite tech expert, notification permission was first thing I checked

@ale82to in that case, if you have a development setup ready with adb: could you swipe away nightly from the app switcher, then re-open it, click the 'Initialize push' button on the site, and after the notification does not work, then grab the logs.

You can either copy the contents of adb logcat or grab a bug report by following the instructions at this link: https://developer.android.com/studio/debug/bug-report

One common issue with notifications is having your device in do not disturb mode. In that mode you need to allow each application that you want to bypass do not disturb or exit do not disturb.

I'm experiencing the same issue, no push notifications work on Firefox Stable nor Firefox Nightly.
Tested in Firefox Nightly on Nokia 8 (TA-1004) (Android 9)

Nightly App version: 201201 17:01 (Build #2015778891)

enabled dom.push.debug=true and dom.push.loglevel=Info in about:config

12-01 22:08:49.318 I/GservicesProvider(19932): Gservices pushing to system: true; secure/global: true
12-01 22:17:51.930 I/AutoPushFeature(23311): Checking validity of push subscriptions.
12-01 22:17:52.513 I/GservicesProvider(23483): Gservices pushing to system: true; secure/global: true
12-01 22:18:26.064 E/WebPushEngineDelegate(29404): Error on push onSubscribe.
12-01 22:18:26.065 W/App     (29404): mozilla.appservices.push.CommunicationError: Error(Communication Error: "Unhandled client error 410 : \"{\\\"code\\\": 410, \\\"errno\\\": 103, \\\"error\\\": \\\"\\\", \\\"more_info\\\": \\\"http://autopush.readthedocs.io/en/latest/http.html#error-codes\\\", \\\"message\\\": \\\"Request did not validate UAID not found\\\"}\"")
12-01 22:18:26.065 W/App     (29404):   at mozilla.appservices.push.RustError.intoException(RustError.kt:13)
12-01 22:18:26.065 W/App     (29404):   at mozilla.appservices.push.PushManager.subscribe(PushManager.kt:13)
12-01 22:18:26.065 W/App     (29404):   at mozilla.components.feature.push.RustPushConnection.subscribe(Connection.kt:4)
12-01 22:18:26.065 W/App     (29404):   at mozilla.components.feature.push.AutoPushFeature$subscribe$$inlined$ifInitialized$lambda$2.invokeSuspend(AutoPushFeature.kt:5)
12-01 22:18:26.065 W/App     (29404):   at mozilla.components.feature.push.AutoPushFeature$subscribe$$inlined$ifInitialized$lambda$2.invoke(Unknown Source:10)
12-01 22:18:26.065 W/App     (29404):   at mozilla.components.feature.push.ext.CoroutineScopeKt$launchAndTry$2.invokeSuspend(CoroutineScope.kt:5)

I am unable to enable dom.push.debug in the Stable release, because about:config does not work, but i can see the same behavior there. The only thing in the log is the following:

12-01 22:31:26.422 E/WebPushEngineDelegate(32393): Error on push onSubscribe.

In my application code the ServiceworkerRegistration.pushManager.subscribe() promise resolves with an undefined value, which seems kind of wierd. it should probably reject?

I should mention that the same code works on Firefox Desktop (83.0) and Chrome Android. I think it worked in the previous version of Stable, or the version before that.
Hope it is somewhat helpful.

@de4np this is super helpful, thank you!

The issue you're seeing is something we've seen with other push applications (Send Tab). This is good to know that it isn't exclusive to only communication with the FxA server.

In my application code the ServiceworkerRegistration.pushManager.subscribe() promise resolves with an undefined value, which seems kind of wierd. it should probably reject?

Yes, this probably should. I can file a separate issue for it and is probably because we're returning null here.

Filed as https://github.com/mozilla-mobile/fenix/issues/16802.

@de4np since your issues are unrelated to what the OP posted, I'm going to move this over to this issue.

Was this page helpful?
0 / 5 - 0 ratings