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

Is this supposed to work cross-browser? #523

Open
miloskroulik opened this issue Jan 6, 2021 · 6 comments
Open

Is this supposed to work cross-browser? #523

miloskroulik opened this issue Jan 6, 2021 · 6 comments

Comments

@miloskroulik
Copy link

I tried to follow instructions at https://github.com/firebase/quickstart-js/tree/master/messaging as closely as possible, but I still find the behavior of the messaging quickstart inconsistent -while it works in Chrome as well as FF, the subscription button doesn't show up in either browser. This is not a big issue, because the browser displays a popup asking user to subscribe. This popup needs to be manually selected in Firefox. I wasn't able to debug the inline script in index.html - it looks like it's not executed. Am I doing anything wrong?

@samtstern
Copy link
Contributor

@miloskroulik yeah I just took a look at the messaging sample and it seems to be broken in a few ways:

  1. The magic __init.js file from the local hosting server doesn't include the appId so initialization doesn't work (Local __init.js does not include appId firebase-tools#2798)
  2. I get some MIME type errors in the console (see below)
  3. The UI does not load, as you said

Screen Shot 2021-01-07 at 4 33 53 PM

@kroikie or @jhuleatt can you take a look?

@miloskroulik
Copy link
Author

miloskroulik commented Jan 7, 2021

Thanks for your observations and help. In addition, I wasn't able to make the messaging quickstart work on several Android browsers, where "ordinary" push notifications worked fine (such as example at https://serviceworke.rs/push-payload_demo.html). I'm not sure if this is in scope of this issue - please let me know if I should provide more details here or in a separate issue.

@samtstern
Copy link
Contributor

@miloskroulik that's a separate issue I think. What are "ordinary" push notifications?

@miloskroulik
Copy link
Author

@samtstern Alright, I will do it. I also added link to the working example.

@samtstern samtstern assigned jamesdaniels and unassigned kroikie and jhuleatt Jan 13, 2021
@samtstern
Copy link
Contributor

@jamesdaniels is going to take a look at this sample

@jamesdaniels
Copy link
Member

jamesdaniels commented Jan 13, 2021

I suspect most of this has to do with the quickstart using the depreciated FCM API. There are some sharp corners there in terms of race conditions when adding the VAPID key, asking for permission, and registering the service-worker; the new API seems to work a lot better in my experience with AngularFire. I'll get this up to date and do some x-browser testing.

See also #525. Def looks like we have a couple issues.

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

No branches or pull requests

5 participants