messaging/internal-error only IOS
See original GitHub issuecode is working fine when I try to send notification on android but it does not work for IOS notification. Getting the below error:
{
"results": [
{
"error": {
"code": "messaging/internal-error",
"message": "An internal error has occurred. Please retry the request."
}
}
],
"canonicalRegistrationTokenCount": 0,
"failureCount": 1,
"successCount": 0,
"multicastId": 8118740071861272000
}
This is my code sample
return await admin.messaging()
.sendToDevice(deviceToken, {
data: {
title: 'Test Fcm',
body: 'tesing fmc body',
content_available: 'true',
priority: 'high',
requestId: '1',
doctorId: '1',
name: 'waqas',
patientId: '1',
action_type: 'TEST'
},
notification: {
title: 'Test Fcm',
body: 'tesing fmc body',
content_available: 'true',
priority: 'high'
}
}
, {
priority: "high",
timeToLive: 60 * 60 * 24,
contentAvailable:true,
}).catch(err => {
console.log(err);
})
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Unexpected Internal Error in Messenger App - Apple Community
We understand that you're receiving an error message when trying to access the Messenger app. There are a few more steps that you...
Read more >Firebase Messaging fails sporadically with internal-error
I have been having the same problem: node.js firebase admin SDK sending notifications to iOS occasionally fails with 500/ISE.
Read more >How to Fix “WebKit encountered an internal error” on iPhone
The WebKit error message can come from many issues with your iOS software. In this article, we'll walk you through all the possible...
Read more >Firebase Cloud Messaging HTTP protocol - Google
Add Firebase - Apple platforms (iOS+) · Add Firebase - Android ... Add Firebase - Server environments ... Overview · error · firebaseMLModelDownloadDidFail ......
Read more >500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Found the issue - They recently changed it on FCM so they do not allow to sent TEXT and BODY keys. From now on - we should only use the “Body”. Once I removed the “Text” key from the notification object - everything works fine again.
This is still not reliably working for me. I have ‘body’ instead of ‘text’, and I don’t have ‘content-available’ in the payloads. It only randomly fails, works 80-90% time.