You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error message - [messaging/unknown] The operation couldn’t be completed. Too many server requests.
I have get error message when i try to get token in firebase method messaging().getToken().
In simulator get token but in real device I have get Too many server error message.
You ignored the template, so this issue will be summarily closed.
The error message is explicit, look for ways to reduce your messaging API request throughput.
Never test messaging on simulator or emulator, use real devices as the simulator and emulator both may perform differently then real devices and the simulator (which is a specific word and implies iOS) does not support messaging and tokens at all
While using real devices connected to your computer watch debug logs (Xcode console or adb logcat)
I have solved this issue by configuring Google CloudAPIs.
Login with Google Cloud
Choose Project
Choose APIs keys (Added by firebase) and configure
Add application restriction and set restrict key (Firebase Installation and other APIs, if you want - By Dropdown)
Cause and fix have been confirmed in my case as well: the API key "iOS key (auto created by Firebase)" was misconfigured. Fixing key configuration in Google Cloud Console fixed the issue in my case.
Issue
Error message - [messaging/unknown] The operation couldn’t be completed. Too many server requests.
I have get error message when i try to get token in firebase method messaging().getToken().
In simulator get token but in real device I have get Too many server error message.
Code
requestNotifications(['sound', 'badge']).then(
async ({status, settings}) => {
if (status === RESULTS.GRANTED) {
const authorizationStatus = await messaging().requestPermission();
if (authorizationStatus) {
messaging()
.getToken()
.then(async (token) => {
alert(token);
console.log('Permission status:', authorizationStatus);
})
.catch((err) => {
console.log(err);
debugger;
});
}
// Get the token
}
},
);
The text was updated successfully, but these errors were encountered: