Push notification not working on some device even after restarting and reinstalling app. Also it is successfully generating the token, when we send push from "https://fcm.googleapis.com/fcm/send" api it shows success but notification wont come. Also we tried from firebase console messaging section to sent globally and with the specific token too. It is only for some devices and even on the same device one day it will work and another day wont.
Random behaviour so unable to reproduce. Only thing is common sometimes it works on the same device and sometimes it wont.
Experiencing the same issue
Same, I've tried from PushTry and every other platform to test on my iOS device only with one specific correct token but still facing same issue.
Just observed one behaviour, few hours ago device A is getting the notification but device B is not. But after 1 hour on the same build when tried to send global notification from firebase console device B starts getting the notification but now device A is not getting.
Thanks for the report.
@ankitjaiswal1994 the version of Firebase you're using is well over a year old - we're currently on Firebase 6.23.0.
@vishvabhatt and @anshumandash1995 can you please share which version of Firebase you're using?
Without specific reproduction steps it'll be hard to track anything down here. It could be an issue with the backend or APNS itself.
@chliangGoogle do you know of any backend issues recently?
@ryanwilson Thanks for your response.
I was using the exact same latest version 6.23.0. But in this thread someone mentioned that downgrading the version works fine https://github.com/firebase/firebase-ios-sdk/issues/2438
In conclusion, I am facing the same issue on latest and older version both.
Do you have device logs you could share? Without logs and without a repro there's likely nothing we can do to make progress on this.
@ryanwilson I don't what logs will help you. But I can give you the token which is not working. Here it is :
ctimO_nsM4I:APA91bGZtrZBFYvjfzvNgjfL0ioRcLDR2cVVNhGJPJEKwijK1Gqv2_kHaITCMCvjryQL5a_hWoW_gOACVggcZ66z5xR1OFqje3xZtF1VVKchatxXYhdTCIB3nrGzoTUKnZGoD84zaCf2
I hope using this token you can debug what is actually going wrong.
Hey all, if you're running into Messaging issues that you cannot reproduce but you are able to isolate individual Instance IDs that fail to receive messages, please file a support issue so the Firebase staff will be able to look directly at your project information.
Hi all, I am having the same issue myself using Messaging 6.16.0. So far the issue only seems to affect iOS 13 devices (tested on 13.3 - 13.4.1), never happened on an older version so far. The first difference I noticed between iOS 12 and 13 is that while for iOS 12 the framework returns nil as the fcmToken at fresh install, for iOS 13 I get the token from the previous app install until the defaultToken is downloaded. Maybe this caching behaviour for the token could cause the issue?
I am using https://fcm.googleapis.com/fcm/send from Postman to send the notification.
Instance ID: dr1JrjVysEzBgHJOXSaIQ5
Token: "dr1JrjVysEzBgHJOXSaIQ5:APA91bFqaOz1fqdeWVtHQH_mNCvDXckIv_XnWuNTy4B3T8C3SziwevFHlgSsBLPNSha0XCySjg9BhEiHBTCB5Rx4EtJrqRNs0aAHG6klUhXmbFVEzhTW4c4Pr3QQguWIQdS5_KR2H-jH"
Response:
{
"multicast_id": 6171660467171542265,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:1588062951208765%4fe8fe384fe8fe3x"
}
]
}
P.S. If I try to send a push using a cached token (from a previous app install on the same device), I don't receive "error:NotRegistered" but a success. In the past, using an old token from the same device would give the mentioned error.
In order to get notifications working again on those devices, I had to do several reinstalls of the app.
@charlie8093 your issue seems different than the one filed, can you file a new issue so we can follow up separately?
@ankitjaiswal1994 Can you provide debug log or file a customer support issue so we can follow up with you on the token query internally with our teams.
Here's how you collect the debugLog following the steps:
Enable "debugLog" by adding -FIRDebugEnabled flag on your xcode scheme: more details here https://firebase.google.com/docs/analytics/debugview
Hey @ankitjaiswal1994. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hey @ankitjaiswal1994. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@ankitjaiswal1994 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Hi all, I am having the same issue myself using Messaging 6.16.0. So far the issue only seems to affect iOS 13 devices (tested on 13.3 - 13.4.1), never happened on an older version so far. The first difference I noticed between iOS 12 and 13 is that while for iOS 12 the framework returns nil as the fcmToken at fresh install, for iOS 13 I get the token from the previous app install until the defaultToken is downloaded. Maybe this caching behaviour for the token could cause the issue?
I am using https://fcm.googleapis.com/fcm/send from Postman to send the notification.
Instance ID: dr1JrjVysEzBgHJOXSaIQ5
Token: "dr1JrjVysEzBgHJOXSaIQ5:APA91bFqaOz1fqdeWVtHQH_mNCvDXckIv_XnWuNTy4B3T8C3SziwevFHlgSsBLPNSha0XCySjg9BhEiHBTCB5Rx4EtJrqRNs0aAHG6klUhXmbFVEzhTW4c4Pr3QQguWIQdS5_KR2H-jH"
Response:
{
"multicast_id": 6171660467171542265,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:1588062951208765%4fe8fe384fe8fe3x"
}
]
}
P.S. If I try to send a push using a cached token (from a previous app install on the same device), I don't receive "error:NotRegistered" but a success. In the past, using an old token from the same device would give the mentioned error.
In order to get notifications working again on those devices, I had to do several reinstalls of the app.
I think i have the same issue. i have 4 devices running IOS 13. One device on IOS 12. I am using the Firebase Console to send push messages. I am running FirebaseMessaging 4.4.0. One iOS 13 is getting the PN as expected while app in bg, as is the IOS 12 device. The rest don't show the incoming PN until I open the app. Some of those IOS 13 devices did work at one point, but I think you're right, it takes a few installs before it kicks in again, quite random. I found that updating OS seemed to get it working so initially i thought it was fixed with latest IOS 13.5.x update but now it's as bad as before. Restarted device, deleting app, messing with Notification settings all do nothing. I also use php to send PN and the messages are sent successfully, i get no bad tokens back from Firebase. It's incredibly frustrating.
Your case seems very similar to #5709, i'm not able to reproduce to get the same cached token. If you can reproduce again, would you mind sharing the debug log from xcode?
Basically we want to see how new install can still get the cached token even tho it should be wiped out.
Here's a video demonstrating the problem. I am sending PN from firebase console.
They all receive the PN in app, but not while in bg.
The white device is latest ios 12, the rest are latest IOS 13.
https://1drv.ms/v/s!Ahwp-wTQ_5K2hZAbm-UJwbfO_2Yn8Q?e=tW9KBw
https://1drv.ms/v/s!Ahwp-wTQ_5K2hZAcCeU58OX_lSt1ug?e=cRtEkR
One more thing i should mention. The PN will show up when you go back into the app on the devices where it did not appear. then after closing or killing the app, the PN is now visible in the ios notification area, which is strange in itself.
last note. I rebooted the one remaining working ios 13 device and now it behaves like the others.
Just created uploaded and installed a testflight build, and PN works great in and out of the app, on all devices.
Most helpful comment
Hi all, I am having the same issue myself using Messaging 6.16.0. So far the issue only seems to affect iOS 13 devices (tested on 13.3 - 13.4.1), never happened on an older version so far. The first difference I noticed between iOS 12 and 13 is that while for iOS 12 the framework returns nil as the fcmToken at fresh install, for iOS 13 I get the token from the previous app install until the defaultToken is downloaded. Maybe this caching behaviour for the token could cause the issue?
I am using https://fcm.googleapis.com/fcm/send from Postman to send the notification.
Instance ID: dr1JrjVysEzBgHJOXSaIQ5
Token: "dr1JrjVysEzBgHJOXSaIQ5:APA91bFqaOz1fqdeWVtHQH_mNCvDXckIv_XnWuNTy4B3T8C3SziwevFHlgSsBLPNSha0XCySjg9BhEiHBTCB5Rx4EtJrqRNs0aAHG6klUhXmbFVEzhTW4c4Pr3QQguWIQdS5_KR2H-jH"
Response:
{
"multicast_id": 6171660467171542265,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:1588062951208765%4fe8fe384fe8fe3x"
}
]
}
P.S. If I try to send a push using a cached token (from a previous app install on the same device), I don't receive "error:NotRegistered" but a success. In the past, using an old token from the same device would give the mentioned error.
In order to get notifications working again on those devices, I had to do several reinstalls of the app.