I implemented Firebase FCM in my app about a month ago, and it has worked great ever since, until today. When I am trying to send a push notification from my console, nothing ever shows up. I find this very strange considering it worked before I went to bed yesterday. I do also have a PHP script that sends push notifications (FCM) as well, which also was working - but when I try to use this to send a push notification, I get this:
{"multicast_id":5593178441415796544,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InternalServerError"}]}
I find this very strange. I Googled this, and I read something about re-generating my APNS certificates (because they might be wrong or something), which I thought was weird as well, due to the fact that I created new certificates yesterday as well (which was working). Now I have once again tried to delete, and generate new - without any luck.
I also want to point out that when I go to my 'Cloud messaging' tab in Firebase, to configure my certificates, I am unable to delete - only re-upload.
What could this possibly be? I have checked my certificates and my API key is correct. It was working 100% 10 hours ago.
Could this be a Firebase problem, or how would I solve this? Help is much appreciated.
Most of the InternalServerError returned by FCM before February 2017,
were due to issues with the APNs certificates.
The API has now been updated.
Now if there an issue with the APNs certificate,
FCM will return error:InvalidApnsCredential
Related
I'm using firebase_in_app_messaging: ^0.2.3 on my application.
I can test my Firebase In-app messaging campaign on a real device, but when I published my campaign nothing seems to work.
I'm using the default on_foreground trigger event and another custom event. When I close my app and open it again nothing appears.
Does it take some time to start working? What am I missing?
I solved the issue by re-installing my application.
I assume the campaign didn't appear because I was already testing the campaign, and it's frequency was Once per device.
But still an in-app messaging test should not be considered as a real campaign engagement. It may be Firebase inner bug.
Hope this will help someone out there...
I've been using FCM console(web) to test push notification for Android smartphone.
I use push token from Android device, but FCM console says "Completed" and it's not delivered.
It worked fine before, but recent few days, it's not working.
Is there anyone facing same problem?
I got an answer from FCM support team.
Thank you for that information.
It would seem that you are affected by the changes made between July
31 and August 1st. We rolled out a change to Firebase Notifications to
filter apps by GMP App Id rather than by package name. This change was
purely internal and should have had no effect on visible behavior as
all apps using Firebase should have had both package name and app id
set to match. However, we are now seeing some apps that have the wrong
app id set and this is causing messages to not be delivered (or in
some cases to be delivered to the wrong app if an app has the app id
of another app). These apps have a bug that was previously masked but
is now exposed.
We are investigating ways in which apps have sent these incorrect app
ids and ways in which we can catch them and warn app developers.
For now, the Firebase Notifications console will only work with apps
that use the FCM SDK. We recommend updating to the latest version of
the FCM SDK in order to mitigate the issue, but in case you don't want
to migrate to FCM SDK, you can still use your own server to send push
notifications.
Apologies for the inconvenience this may have caused. Please let me
know if there's anything else I could help with.
Regards,
Does Firebase Cloud Messaging provide any way for a user to retrieve old messages? From the documentation, it looks like messages are thrown away once the client receives them.
I ask because I'm looking to build an IM functionality in my app, and a user needs to be able to see past messages when he closes the app and then opens it again.
Update from the comments here:
Unfortunately this just got worse as of 20 Nov 2017 when FCM Diagnostics was removed from Google Play Console. "I understand that FCM Diagnostics was critical to you in troubleshooting FCM messages but unfortunately this has been deprecated. Rest assured that we are working on something better that should allow a lot more insight into what went wrong during message delivery, but we can’t share any timelines. I’ll share your concern internally and continue to work to get this new feature out.
FCM's main purpose is for Push Notifications. So to answer directly, No. FCM doesn't keep track of the message you send for you. There is a diagnostics and statistics tool you can use, but I don't think this is the one you're looking for.
IMHO, it's the developer's responsibility to keep track of the details they need. In your scenario, you would be needing a database to store the message details themselves, wherein you can make use of Firebase Realtime Database. There's actually a sample Codelab about creating a simple chat app using Firebase here.
I am using FCM Firebase and Api for Server Reference.
I've used the Delete request to https://iid.googleapis.com/v1/web/iid/REGISTRATION_TOKEN to remove a device from all threads.
But now this device can not subscribe for any other topic.
How do I fix this problem?
Yes, same with me. My token was deleted too. But I solved it!!! Yeah!
I`d just removed the application and re-downloaded it!
Few seconds later, I could see that Firebase returns a new instance token!!
(after several tcp connections... in the Xcode debug window for simulation)
I think FCM can automatically assign the token!
We utilize php-apns to send push notifications to our iPhone app users. This worked great when we were developing, however once the app was in the app store and I switched to the production certificate, I'm only able to send to a single recipient. Any more than that and no one gets a push notification.
I've read elsewhere that others have experienced this problem. The only "solution" I'm aware of is to open & close a fresh connection to APNS for every push notification, but I'm not doing that. That's not a good solution.
Anyone have any thoughts?
I found the answer!
It appears to be an issue with sending to the development device tokens. Like most people, we have a database that stores the device tokens, and the earlier records were populated with our device tokens from testing.
As soon as I net out those device tokens from my list, all works!
I really hope someone finds this useful!