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

PushNotificationsAPI: Failed to register device: NOKResponse(error=Unauthorized, description=The device token provided could not be validated against any known credentials) #107

Open
mona-baharlou opened this issue May 30, 2020 · 10 comments

Comments

@mona-baharlou
Copy link

My Pusher Beams has worked fine for 3 months, but today I got this error, and there is no document about how can I resolve this error.

"PushNotificationsAPI: Failed to register device: NOKResponse(error=Unauthorized, description=The device token provided could not be validated against any known credentials)"

@MohsenSameti
Copy link

any news on this?
this is happeing to me too, till last week it was working, but now i get this error.

@daniellevass
Copy link
Contributor

daniellevass commented Jul 24, 2020

Hi,

The error can be triggered for a number of reasons. We're using Google's api from https://developers.google.com/instance-id/reference to check the device token (which you can also curl yourself to confirm).

I'd recommend checking the following:

  • does the device have an internet connection?
  • does the instance id match the project you configured in the pusher dashboard?
  • Is the project configured correctly using the firebase cloud messaging secret into the correct instance id?

If you're still seeing issues - we'd appreciate some more information on what's happening. Do you have any steps to reproduce?

Thank you,

@JonnyHov
Copy link

I have been having this same error happen to my Android application. It will work for a while and then it will stop connecting to push notifications with the same error message. I have to clear the app data in order for it to start working properly. It is not a consistent error; it has only happened a couple of times.

@mfreeman451
Copy link

We are having the same issues. We can call PusherBeams.instance.start('') (flutter client) fine with no errors, we can also subscribe to a device interest, with no errors. However we keep seeing these messages in our logs:

W/PushNotificationsAPI( 1979): Failed to register device: NOKResponse(error=Unauthorized, description=The device token provided could not be validated against any known credentials)

This is happening on Android devices for us, will test IOS next

Please advise

@mfreeman451
Copy link

We did configure Safari APN stuff last night, this is possibly related. Going to try removing the Safari configuration.

@mfreeman451
Copy link

We did configure Safari APN stuff last night, this is possibly related. Going to try removing the Safari configuration.

No change

@kimonneuhoff
Copy link

I have the same error. Is there a fix yet?

@guruz
Copy link

guruz commented Mar 16, 2022

Got the same issue when playing around with different brandings (using different package name in AndroidManifest.xml).

Not sure what causes it. There is a Stackoverflow with similar:
#107

EDIT: Maybe it's somehow related to DeviceStateStore and deviceId.
It uses a getSharedPreferences, so when I played around with same app with different package ID before then it somehow collides(? no idea)

@guruz
Copy link

guruz commented Mar 16, 2022

Seems to work now
after
deleting the app on the phone
AND deleting the build dir completely.

I also see this in the log then when launching, probably related:

MessagingService: Got new or refreshed FCM token: (...)

@fabiorbap
Copy link

fabiorbap commented Sep 29, 2023

I'm still getting it using

implementation 'com.pusher:push-notifications-android:1.8.0'
implementation 'com.pusher:pusher-java-client:2.2.1'

Any news on how to solve it? I can't ask users to clear their data to solve this

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

8 participants