OneSignal-Flutter-SDK icon indicating copy to clipboard operation
OneSignal-Flutter-SDK copied to clipboard

[Bug]: Firebase Social Authentication Causing APNS Bad Device Token Issue

Open petodavid opened this issue 1 year ago • 2 comments
trafficstars

What happened?

We have identified a specific scenario where devices utilizing Firebase Social Authentication encounter an "APNS Bad Device Token" issue. Devices that have never utilized social login functionality successfully receive push notifications through the latest plugin. However, upon logging in with a social provider for the first time, these devices experience difficulties with APNS token retrieval, resulting in the "APNS Bad Device Token" error.

Steps to reproduce?

1. Login to the application using a social authentication provider.
2. Observe the "APNS Bad Device Token" issue for the logged-in device.

What did you expect to happen?

Devices should successfully receive valid APNS tokens regardless of whether social authentication is used.

OneSignal Flutter SDK version

Release 5.1.0

Which platform(s) are affected?

  • [X] iOS
  • [ ] Android

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Here is a summary of the actions we took:

Followed the troubleshooting guide diligently:

  1. Adhered to the iOS Mismatched User Environment documentation.
  2. Uninstalled the app on recognized player IDs.
  3. Clicked the iOS config on the OneSignal settings page and pressed save to clear the warning.
  4. Re-installed the app on the device.
  5. Opened the app, re-subscribed to the prompt, obtaining a new player ID.
  6. Sent a notification to check for the warning's recurrence.

Despite these efforts, the "Apns Bad Device Token" warning continues to reappear. We also attempted to click the iOS config on the OneSignal settings page and press save, even when no recognized player IDs were present.

petodavid avatar Feb 23 '24 08:02 petodavid

Downgrading the plugin to version 3.5.2 resolves the problem, and push notifications function as expected. However, this is considered a temporary workaround and is not acceptable for long-term use.

petodavid avatar Feb 23 '24 08:02 petodavid