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

Getting FIS_AUTH_ERROR error on registering push notification in android and not getting push notification after sending push notification in iOS #1863

Closed
smkhizar1 opened this issue Oct 30, 2023 · 2 comments

Comments

@smkhizar1
Copy link

smkhizar1 commented Oct 30, 2023

Bug Report

Plugin(s)

@capacitor/push-notifications: "^4.1.2",

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.5.1
  @capacitor/core: 5.5.1
  @capacitor/android: 5.5.1
  @capacitor/ios: 5.5.1

Installed Dependencies:

  @capacitor/cli: 4.8.0
  @capacitor/core: 4.8.0
  @capacitor/android: 4.8.0
  @capacitor/ios: 4.8.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

Ionic : 5.4.16
Android
iOS

Current Behavior

Below error is getting in registration error listener after calling register method in android.
Registration error: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR

and in iOS, i get registration token but i can't get notification on iOS with this token.

Expected Behavior

After calling register method, i should get registration token from listener and after sending push notification on this token. I should get push notification on phone.

Code Reproduction

I initialise listeners first then call register method.
addListeners = async () => {
await PushNotifications.addListener('registration', token => {
console.info('Registration token: ', token.value);
});

await PushNotifications.addListener('registrationError', err => {
  console.error('Registration error: ', err.error);
});

await PushNotifications.addListener('pushNotificationReceived', notification => {
  console.log('Push notification received: ', notification);
});

await PushNotifications.addListener('pushNotificationActionPerformed', notification => {
  console.log('Push notification action performed', notification.actionId, notification.inputValue);
});

}

registerNotifications = async () => {
let permStatus = await PushNotifications.checkPermissions();

if (permStatus.receive === 'prompt') {
  permStatus = await PushNotifications.requestPermissions();
}

if (permStatus.receive !== 'granted') {
  throw new Error('User denied permissions!');
}

await PushNotifications.register();

}

Other Technical Details

Additional Context

@jcesarmobile
Copy link
Member

FIS_AUTH_ERROR seems to be related to misconfigurations in your firebase keys.
Try downloading google-services.json file from firebase console again and replace the existing one.

Anyway, you are using Capacitor 4, which is out of date, you should move to Capacitor 5 and latest @capacitor/push-notifications 5.x

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
Copy link

ionitron-bot bot commented Nov 14, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants