Reputation: 479
I am using Google's quickstart-js messaging project, yet the onMessage function isn't firing at-all. I've tried several things I've found on here (closing/opening firefox and such).
Background worker works just fine, foreground doesn't react at all. Any ideas?
Firebase Messaging quickstart-js on github
Upvotes: 1
Views: 258
Reputation: 479
I was able to get rid of this bug by updating the importScripts in firebase-messaging-sw.js to the same version used in index.html, specifically to this:
importScripts('/__/firebase/7.3.0/firebase-app.js');
importScripts('/__/firebase/7.3.0/firebase-messaging.js');
importScripts('/__/firebase/init.js');
I will also post an issue on their github page so they update it.
Upvotes: 1