Closed Xoshbin closed 1 year ago
Unfortunately this is not an error that can be fixed within the SDK, it's most likely a configuration issue in the Firebase console, see, for example https://stackoverflow.com/a/56045461
Another possible/related reason could be that you try to send the notification to a device that is not registered with your Firebase application. This can happen when you work with multiple environments: a device could be registered with a production project, but the message is sent from an QA environment.
I'm going to close the issue because it's most likely not directly related to the SDK, but feel free to add further comments with your findings so that others might benefit from them when they face the same issue.
For some reason, the APNS key is revoked in Apple developer keys (maybe I did it in mistake). So Firebase didn't have access to APNS. After creating a new key and uploading it to Firebase, the error solved. Thank you
Good to hear! Thank you for coming back and describing the root and solution to the problem! 🙏🏻
Describe the bug
Hi, When trying to send a notification to an individual FCM token that's grabbed from any iOS device, gives the error below. The same process is working for Android devices's FCM tokens.
Auth error from APNS or Web Push Service {"userId":"********","exception":"[object] (Kreait\\Firebase\\Exception\\Messaging\\AuthenticationError(code: 0): Auth error from APNS or Web Push Service at /project/vendor/kreait/firebase-php/src/Firebase/Exception/Messaging/AuthenticationError.php:22)
The error looks like and authentication issue, but I checked it and found no issue with authentications. and another proof is that it's working for Android devices.
Installed packages
PHP version and extensions
Steps to reproduce the issue.
Error message/Stack trace
Additional information
One of the FCM tokens that make the error: