I’ve been following the Push Notifications tutorial and I’ve set it up accordingly but still nothing happens when i try to send a notifications from the Firebase console.
The build happens without failure and I get a print of the regID.
When I send a notification with the Firebase console there’s nothing happening.
No notification on the device or in the Fuse console.
There’s plenty of configuration-level things that could go wrong. I don’t think this is a problem related to Fuse or your JavaScript code at all. Especially since you’re getting a regID. You’ll need to debug this yourself, so I suggest you start with these questions:
Does the Firebase console have any (delivery) reports you could look into?
What is the device that you are testing your code on?
Did you try turning off the notifications permission for your app and then turning it on again? Did you kill the app in between those two actions? Try both.
Did you make a preview, or a release build of your application?
Does your APP ID (com.company.myapp) match that one registered with Firebase project? Are you sure, since it differs between preview and release builds? And you did use a unique, proper name there, not com.company.myapp, right?
Was the app in foreground or in background when you sent the notification? Note that the console.log only gets printed once the payload is delivered to the application (so when it enters foreground), not when the notification reaches the phone.
And more.
Please share whatever details you can gather in a proper debugging session, and we can take it from there.
Does the Firebase console have any (delivery) reports you could look into?
Tried to look into the DebugView on Firebase but it says that no devices has been in contact with the server the last 30 minutes.
What is the device that you are testing your code on?
I’m testing on my tablet which is a Samsung Galaxy Tab.
Did you try turning off the notifications permission for your app and then turning it on again? Did you kill the app in between those two actions? Try both.
I did and it made no difference.
Did you make a preview, or a release build of your application?
I’ve been previewing on Android so far through Fuse only.
Does your APP ID (com.company.myapp) match that one registered with Firebase project? Are you sure, since it differs between preview and release builds? And you did use a unique, proper name there, not com.company.myapp, right?
Yes I have used another proper APP ID and they’re matching.
Was the app in foreground or in background when you sent the notification? Note that the console.log only gets printed once the payload is delivered to the application (so when it enters foreground), not when the notification reaches the phone.
Okay, but those questions were only to get you started. You still need to check everything that could potentially be the cause of the problem, and we’re in no position to suggest anything without seeing a complete reproduction (and getting one with push notifications is a bit of a challenge…).
If Firebase says that no device has been in contact with it, then that sounds like a good point to start testing with. Make sure that your galaxy shows up in Firebase, and that the registration ID it got is actually visible in Firebase console as a client. If it isn’t then the question is - where did the device get the regID from?
Also, I’d suggest you use this repo for reference on how to set up push notifications correctly.