question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best way to determine specific errors?

See original GitHub issue

I’m trying to determine when there is an invalid token, an expired token, message rate exceeded error, etc. (https://firebase.google.com/docs/cloud-messaging/send-message#admin_sdk_error_reference).

When i send a single message/notification to a token like so: var response = await FirebaseMessaging.DefaultInstance.SendAsync(message);

I get the following response (I’m getting this when i catch a thrown exception from FirebaseMessaging… I think i must be using this incorrectly as this seems strange… shouldn’t there be a response object?).

What am I doing that is incorrect? Shouldn’t I be able to find a code that matches to whats in the admin_sdk_error_reference section? (link i have above)

Response status code does not indicate success: 400 (BadRequest)
{
  "error": {
    "code": 400,
    "message": "The registration token is not a valid FCM registration token",
    "errors": [
      {
        "message": "The registration token is not a valid FCM registration token",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:26 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
hiranya911commented, Jul 15, 2019

@swebgit They will be released incrementally over a series of releases.

1reaction
hiranya911commented, Aug 9, 2019

Note that the FCM APIs now support the fine-grained error handling scheme outlined above. FirebaseMessagingException and MessagingErrorCode types were included in the v1.8 release. More to come.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Measurements and Error Analysis
Random errors can be evaluated through statistical analysis and can be reduced by averaging over a large number of observations (see standard error)....
Read more >
Calculate Percentage Error
How to Calculate Percentage Error · Step 1. Subtract the actual value from the estimated value. · Step 2. Divide the results with...
Read more >
How to Accurately Perform Basic Error Analysis
To find the percent error, find the difference between your average and the true value and divide it by the true value.
Read more >
Estimation of Errors: Formulas & How to Calculate
You can estimate the errors of a measured value by comparing it to a standard value or reference value. The error can be...
Read more >
ERRORS AND ERROR ESTIMATION
There may be no “best” method. Sometimes “best” is a matter of opinion. When attempting to estimate the error of a measurement, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found