bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

[BUG] Notification opens chrome instead of PWA

Open ymeskini opened this issue 2 years ago • 16 comments

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

ymeskini avatar Feb 06 '22 14:02 ymeskini

Same Issue

https://play.google.com/store/apps/details?id=in.awesong.twa

kartikcool15 avatar Feb 12 '22 20:02 kartikcool15

Is this something that used to work in the past and has just broken now, or was it always broken?

PEConn avatar Feb 14 '22 15:02 PEConn

It was broken since starting

kartikcool15 avatar Feb 14 '22 16:02 kartikcool15

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

ymeskini avatar Feb 14 '22 19:02 ymeskini

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?

NicoHood avatar Mar 12 '22 18:03 NicoHood

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

NicoHood avatar Mar 24 '22 22:03 NicoHood

@andreban Can you give us a hint maybe? This is a super important feature, if you ask me.

NicoHood avatar Apr 09 '22 07:04 NicoHood

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.

kilicabdulkadir avatar Apr 09 '22 08:04 kilicabdulkadir

Any ideas, anyone?

NicoHood avatar May 06 '22 11:05 NicoHood

@PEConn can you maybe help here?

NicoHood avatar Aug 24 '22 16:08 NicoHood

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.

PEConn avatar Aug 25 '22 09:08 PEConn

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?

NicoHood avatar Aug 25 '22 09:08 NicoHood

Sure, I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1358863 to track this.

PEConn avatar Sep 01 '22 10:09 PEConn

Thanks a lot! Hope to see this fix soon, it would be such a nice addition to easy-to-setup PWA app :)

NicoHood avatar Sep 02 '22 17:09 NicoHood

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?

NicoHood avatar Sep 21 '22 06:09 NicoHood

My TWA is verified with the signing key still the apk notification opens chrome

TahaSaifee53 avatar Oct 03 '22 11:10 TahaSaifee53

Hey all, this is now fixed and the fix is available from chrome version 114.0.5679.3

SayedElabady avatar Mar 28 '23 13:03 SayedElabady