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

[Bug]: Apns Bad Device Token after update from 3.5.0 to 5.0.4 #824

Closed
2 of 3 tasks
andreaparadigma opened this issue Jan 18, 2024 · 8 comments
Closed
2 of 3 tasks

Comments

@andreaparadigma
Copy link

andreaparadigma commented Jan 18, 2024

What happened?

After update from 3.5.0 to 5.0.4 in iPhone I no longer receive push notifications.

Steps to reproduce?

1. update to onesignal_flutter: ^5.0.4
2. migrate the code https://github.com/OneSignal/OneSignal-Flutter-SDK/blob/user_model/main/MIGRATION_GUIDE.md
3. launch the app
4. send a notification
5. no notification received and "Apns Bad Device Token" in Dashboard under "Subscription Status"

If revert to 3.5.0 all works correctly

NB: In the iOS config on the OneSignal settings page I don't have any warnings

What did you expect to happen?

I expected to receive a push notification

OneSignal Flutter SDK version

Release 5.0.4

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@faisal-atrule
Copy link

I was facing this issue also. I have fixed that by manually setting the 'aps-environment' to 'production'

iOS -> Runner -> Runner.entitlements

@fabioselau077
Copy link

Same here in new project onesignal
image

@fabioselau077
Copy link

I was facing this issue also. I have fixed that by manually setting the 'aps-environment' to 'production'

iOS -> Runner -> Runner.entitlements

make but same error :/

@fabioselau077
Copy link

For OneSignal support, work!

"Hi there,
The error "Apns Bad Device Token" can be fixed following the troubleshooting guide.
Please follow the steps in our iOS Mismatched User Environment docs if you have not already.
Then try the following:

  • uninstall the app on these listed player IDs (if you recognize the player ID)
  • click the iOS config on the OneSignal settings page and press save, this will clear the warning
  • re-install the app on the device
  • open the app and re-subscribe to the prompt. This will give you a new player ID.
  • Send yourself a notification and see if the warning appears again
    If you don't recognize any of the listed player IDs, just click the iOS config on the OneSignal settings page and press save, this will clear the warning. On the next iOS notification see if the warning shows again.
    Let us know if you have any additional questions for us.
    Thanks."

@InfoSpecific
Copy link

InfoSpecific commented Feb 10, 2024

I am facing same issue.

#828 (comment)

@petodavid
Copy link

petodavid commented Feb 22, 2024

We are facing the same issue, the mentioned steps are not working in our case, any updates?

For OneSignal support, work!

"Hi there, The error "Apns Bad Device Token" can be fixed following the troubleshooting guide. Please follow the steps in our iOS Mismatched User Environment docs if you have not already. Then try the following:

  • uninstall the app on these listed player IDs (if you recognize the player ID)
  • click the iOS config on the OneSignal settings page and press save, this will clear the warning
  • re-install the app on the device
  • open the app and re-subscribe to the prompt. This will give you a new player ID.
  • Send yourself a notification and see if the warning appears again
    If you don't recognize any of the listed player IDs, just click the iOS config on the OneSignal settings page and press save, this will clear the warning. On the next iOS notification see if the warning shows again.
    Let us know if you have any additional questions for us.
    Thanks."

@wearemeeters
Copy link

we are experiencing the same behaviour but on our Xamarin SDK 4.3.4 and this started to appear on ios 17. Before on ios 16 it worked as expected. And from fellow developer I know that he same happens on the MAUI version. So this does not look like a SDK issue to me.

Tried to fix certificates, to no avail. I am using p8 key to authorize APNS via OneSignal if that helps.

@jennantilla
Copy link
Contributor

Hello everyone--apologies that this issue has gone stale. If this is still a concern for anyone, please let us know here!

More information on APNS Bad Device Token troubleshooting can be found here.

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

No branches or pull requests

7 participants