bubblewrap
bubblewrap copied to clipboard
[BUG] Notification opens chrome instead of PWA
Describe the bug The MediaSession notification from the PWA is opening chrome instead of the PWA. My app is using fingerprints generated by google play and I followed the asset links process to remove for example the top bar.
To Reproduce Steps to reproduce the behavior:
When you start a track the media session appears and taping the notification redirect to chrome.
Expected behavior The notification should open the PWA
Smartphone (please complete the following information):
- Device: Android Xiaomi note pro 10
- OS: Android 11
- Browser: chrome
- Version 98.0.4758.87
Additional context The app has been created with pwabuilder
Same Issue
https://play.google.com/store/apps/details?id=in.awesong.twa
Is this something that used to work in the past and has just broken now, or was it always broken?
It was broken since starting
Is this something that used to work in the past and has just broken now, or was it always broken?
I never saw it working from the APK but from the pwa it's working as expected
I also have this issue, which makes the App itself not useful enough. People should not see that the App itself is "just" a website. I am using bubblewrap 1.15.0
Edit: I am using onesignal + wordpress by the way, if that matters. I also tried webpushr, but that did not show a native notification message at all, only inside the app itself. But that also applied to the pure PWA installed via browser, so I guess that is a problem of the software. @ymeskini which software are you using to send out push notifications?
I found this as a related, possible solution. However I have no idea about the generated android app, maybe someone of the developers can say if this could help? https://stackoverflow.com/questions/55426730/how-to-use-push-notification-for-trusted-web-activity
@andreban Can you give us a hint maybe? This is a super important feature, if you ask me.
I am having the same problem. Isn't there a solution to this? When you click on incoming notifications, directing them to the Samsung browser instead of the application makes the application useless.
Any ideas, anyone?
@PEConn can you maybe help here?
Hey,
So the original problem in this bug (Chrome is getting launched when you click on a media notification) is an issue in Chrome, not in the TWA shell. (So unfortunately, there's not really anything you can do in your TWA to fix it). From Chrome's point-of-view (I'm on the Chrome team), we're aware of the issue, it's just a matter of us getting the time to figure out how to fix it.
With regards to kilicabdulkadir's issue - that sounds like it's a problem not just with media notifications, but with notifications in general, when the user's default browser is Samsung Browser (and therefore the TWA is launched in that). For that you'd want to file a bug with Samsung browser.
Thanks for the explaination @PEConn ! That seems like it will take some time, if the bug is inside multiple browsers.
Is the chrome bug tracked somewhere? Do you have a ticket link?
Sure, I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1358863 to track this.
Thanks a lot! Hope to see this fix soon, it would be such a nice addition to easy-to-setup PWA app :)
Hi @PEConn I noticed that after verifying my TWA this now has been fixed. I dont know if there was also an update in chrome in the meantime, but its worth to check that out.
You can check if the app is verified by looking at the url above. If there is no URL, then the app is verified. If not, it will always show the url, as the TWA could be not trusted. After that push notifications started to open in the App.
@PEConn Should we close the linked chromium bug?
My TWA is verified with the signing key still the apk notification opens chrome
Hey all, this is now fixed and the fix is available from chrome version 114.0.5679.3