Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to fetch token fails to report server error #13997

Closed
richardcrichardc opened this issue Oct 30, 2024 · 3 comments · Fixed by #14014
Closed

Failure to fetch token fails to report server error #13997

richardcrichardc opened this issue Oct 30, 2024 · 3 comments · Fixed by #14014
Assignees

Comments

@richardcrichardc
Copy link

Description

Failure to fetch token fails to report server error.

I.e. error message 'Invalid fetch response, expected 'token' or 'Error' key' is shown, instead of the error after the 'Error' key returned by the FCM service.

Reproducing the issue

This issue is evident for some or all of the problems indicated by this issue in the Flutter Firebase library: firebase/flutterfire#13558

The error can be found by inspecting the code here:

The error key is parsed into errorValue on out on line 146. Lines 148-176 do not assign the error to responseError in all cases, including when errorValue is the string 'TOO_MANY_REGISTRATIONS'. Lines 177-183 then report the key 'Error' was not set.

Firebase SDK Version

latest

Xcode Version

n/a

Installation Method

CocoaPods

Firebase Product(s)

Messaging

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

Looks like it may be related to #13969

@leojaygoogle
Copy link
Contributor

Thanks for the report! I agree that the error message can be improved to make it easier to debug fetch token failures. I will send out a PR to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants