Skip to content
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

[BUG] Notification opens chrome instead of PWA #647

Closed
ymeskini opened this issue Feb 6, 2022 · 17 comments
Closed

[BUG] Notification opens chrome instead of PWA #647

ymeskini opened this issue Feb 6, 2022 · 17 comments
Assignees

Comments

@ymeskini
Copy link

ymeskini commented Feb 6, 2022

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

@kartikcool15
Copy link

@PEConn
Copy link
Collaborator

PEConn commented Feb 14, 2022

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

@kartikcool15
Copy link

It was broken since starting

@ymeskini
Copy link
Author

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

@NicoHood
Copy link

NicoHood commented Mar 12, 2022

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
Copy link

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
Copy link

NicoHood commented Apr 9, 2022

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

@kilicabdulkadir
Copy link

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.

@NicoHood
Copy link

NicoHood commented May 6, 2022

Any ideas, anyone?

@NicoHood
Copy link

@PEConn can you maybe help here?

@PEConn
Copy link
Collaborator

PEConn commented Aug 25, 2022

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.

@NicoHood
Copy link

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?

@PEConn
Copy link
Collaborator

PEConn commented Sep 1, 2022

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

@NicoHood
Copy link

NicoHood commented Sep 2, 2022

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

@NicoHood
Copy link

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?

@TahaSaifee53
Copy link

TahaSaifee53 commented Oct 3, 2022

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

@SayedElabady
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants