-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening pwa via push notification links is broken on Android 15 QPR1 #8668
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I have now also tried via the emulator in android studio... None of the android 15 images there had the December update yet, so everything works fine for them. But the android 16 preview had the same problem as Android 15 QPR1 (December feature drop). So I guess some bug/change from android 16 have been included in android 15 qpr1, causing the issue... This should probably be reported as a bug to android... |
To test this furter, I tried overriding the notificationclick handler in the service worker based on firebase js sdk with some code to log and focus my window, and used devtools remote debugging to see the logs from the service worker on my phone...
It crashes when running client.focus(), disconnecting the remote debugging.... But I can see the logging up until that point, so I guess this has to be fixed in chrome (by using some new api or acquiring some new permission needed by android 15 qpr1), or by fixing a bug introduced in android 15 qpr1.... |
I also confirmed it works to open a new window in the code above, by changing
with
So thats why clicking notifications works if no existing client is running.. Exchanging focus with openWindow means reloading the app, so this is not a working solution though... Could someone at least acknowledge seeing the same problem as me? This is breaking my pwa on the latest android, which use push notifications for chat messages and other collaborative tasks. And it will probably break a lot of others as the latest android is rolled out to more devices... As I assume this can't be fixed in firebase, I have open a bug in the chromium issue tracker: https://issues.chromium.org/issues/383355287 |
Operating System
Android 15 QPR1 (security update December 5, 2024)
Environment (if applicable)
Chrome PWA
Firebase SDK Version
11.0.2
Firebase SDK Product(s)
Messaging
Project Tooling
Nx + Angular + firebase
Detailed Problem Description
When receiving a push notification while the pwa is minimized (running in the background), clicking the notification doesn't open the pwa. This has been working for years, and stopped now with Android 15 QPR1. It still works with Android 15 QPR1 if the pwa is not running, then it opens the pwa with the link in the notification. But if the pwa is minimized and should be restored/focused (via "launch_handler.client_mode: focus-existing"), nothing happens when clicking the notification, and it seems the pwa is crashing when opening it after that... Clicking notifications for websites not installed as pwa also still works, it's just minimized pwa's having the problem....
This may of course be an android problem, it still works on all other platforms, but either webpush is broken on android 15 QPR1, or there are some new api or setting firebase has to use to make it work on the newest android version... Either way this seems like a BIG problem that google would like to know about....
I have tested this on Pixel 8 and Pixel tablet, and tested it that it was working fine before QPR1 and failing after on both.
Steps and code to reproduce issue
Try via any pwa with push notifications... for instance this pwa test app:
https://progressier.com/pwa-capabilities/push-notifications
Follow the steps, send a notification and minimize (not close) the pwa before clicking the notification...
I works on every platform, including android 15 with november update, but fails with android 15 with decemer update (QPR1)
The text was updated successfully, but these errors were encountered: