Is this supposed to work cross-browser?
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?
@miloskroulik yeah I just took a look at the messaging sample and it seems to be broken in a few ways:
- The magic
__init.jsfile from the local hosting server doesn't include theappIdso initialization doesn't work (https://github.com/firebase/firebase-tools/issues/2798) - I get some MIME type errors in the console (see below)
- The UI does not load, as you said
@kroikie or @jhuleatt can you take a look?
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.
@miloskroulik that's a separate issue I think. What are "ordinary" push notifications?
@samtstern Alright, I will do it. I also added link to the working example.
@jamesdaniels is going to take a look at this sample
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.