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

FIS_AUTH_ERROR #284

Open
ppetree opened this issue Aug 29, 2024 · 7 comments
Open

FIS_AUTH_ERROR #284

ppetree opened this issue Aug 29, 2024 · 7 comments
Labels
android Related to the Android platform

Comments

@ppetree
Copy link

ppetree commented Aug 29, 2024

Bug Report

Error requesting a token on Android devices (Apple works fine)

Admittedly this could be an FCM issue but some sources online say that going to firebase 20.0.1 solves this problem.

Expected Behaviour

Get a token back as I always have.

Actual Behaviour

on register I get an error stating
java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR

Reproduce Scenario (including but not limited to)

Registering a device for push notifications using

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 13, Android 14

(Android) Device Vendor (e.g. Samsung, HTC, Sony...)

Pixel, Teclast (tablet), Samsung and Blu

Sample Push Data Payload

Can't push without a token

Sample Code that illustrates the problem

java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR

Logs taken while reproducing problem

java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR

All online resources point to an FIS authorization problem but I have granted that permission (repeatedly), updated my sha1/256 fingerprints and done everything else and then checked it all thrice. I still get the error. One post suggests going back to firebase sdk 20.0.1 to solve the problem.

BTW, I'm updating 3 projects that I've not touched in over a year (cancer). I'm trying to get back at it but my update plans are sticking on this error.

@ksch10bob
Copy link

@ppetree did you solve your problem?
If yes, what did you do?
If no, did you build a minimal reproduction scenario to narrow down the root cause?

@ppetree
Copy link
Author

ppetree commented Oct 4, 2024

@ppetree did you solve your problem? If yes, what did you do? If no, did you build a minimal reproduction scenario to narrow down the root cause?
No I did not find a solution. I've googled my brains out and nothing seems to work.

@ksch10bob
Copy link

@ppetree
i would suggest the following:
Update your cordova tooling to the latest Versions

  • create a sample cordova app via cordova cli
  • add the push plugin in the latest published version
  • add some logic for push registration in the deviceready event handler
  • add cordova-android platform veersion 13.0.0
  • add your google-service.json to the app
  • build the app and test the registration logic

If this works you can be sure your google-service.json is generated properly and the root cause is another one.

@ppetree
Copy link
Author

ppetree commented Oct 16, 2024

@ksch10bob None of that is the problem and, in fact, downloading a new google-service.json was the problem.

The new google-services.json has the wrong Web API Key. Get the correct key off the General Project Settings tab and MANUALLY update your google-services.json.

There should be better error handling around this than what's provided.

@ksch10bob
Copy link

@ppetree
i, am glad you fixed the problem and found the root cause.

There should be better error handling around this than what's provided.

Are you referring to the FCM SDK itself or the errorhandling of the plugin?
From my understanding the plugin can not do anything about a missleading error message of the FCM SDK.
If the FCM SDK itself is the problem, you could close this issue since it is not related to the plugin. Or do i miss something important?

@ppetree
Copy link
Author

ppetree commented Nov 21, 2024

In this particular case I don't think the error ever reached the plugin, I think it errored out during the FCM response.

I have a console.log hijacker and this was the capture:
java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR ]

There was no bubbling up through the plugin.

@erisu erisu added the android Related to the Android platform label Nov 22, 2024
@erisu
Copy link

erisu commented Nov 22, 2024

This change might address part of it, but needs testing: https://github.com/havesource/cordova-plugin-push/compare/master...havesource:cordova-plugin-push:fix/gh-284?w=1

However, for an improved and clear error message, it might be more challenging becauseFIS_AUTH_ERROR might be triggered by various configuration issues, not just an incorrect API Key. I am thinking it could occur due to any incorrect or incomplete data in the google-services.json file, mismatched project settings, or other authentication problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Related to the Android platform
Projects
None yet
Development

No branches or pull requests

3 participants