Backendless Support
 
Answered

Unable to retrieve device. Invalid device ID

Backendless was working fine until a couple of days ago, now comed up with an errore out of no where, without having touched any line of code.

backendless?.messagingService.getRegistrationAsync({ (deviceRegistration) in }

returns: Unable to retrieve device. Invalid device ID

and

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

backendless?.messagingService.registerDeviceToken(deviceToken, response: { (sucess) in

print(sucess)

}, error: { (fault) in

print("error registretion token \(fault!.detail)")

})

}

returns: error registretion token Optional("java.lang.NullPointerException")

my question is: is it backendless problem? because it was working fine and suddenly has started with this 2 errors

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #e7e8eb}

span.s1 {font-variant-ligatures: no-common-ligatures}

Leave a Comment

Comments (16)

photo
1

Hello,

It might be related to the 4.3.0 update we rolled out today. Could you please let us know your application ID?

Regards,

Mark

photo
1

thanks for the prompt reply Mark

D47C16E4-5548-E79C-FF19-9D440EFB4800

photo
1

Just to confirm, do both API calls fail? registering a device AND retrieving device registration?

Do you happen to have device ID which you try to retrieve registration for?

photo
1

yess both of them fail for the new devices

photo
1

Hello,

This issue has been fixed, the new version of iOS-SDK with this fix will be available shortly.

As a workaround for now please use this method instead.

  1. backendless.messaging.registerDevice(deviceToken,
  2. channels: ["default"],
  3. response: { (success) in
  4. print(success!)
  5. print("Device registration completed with token \(deviceToken)")
  6. }, error: { (fault) in
  7. print("Device registration failed: \(fault!.detail)")
  8. })

Regards, Olga

photo
1

Hi Olga, ive tried the suggested meth but this is the result: Argument labels '(_:, channels:, response:, error:)' do not match any available overloads.

I'm running Backendless pod versione '4.0b2'

photo
1

The latest available version is 4.0.15. Please update and check.

photo
1

Ive updtadted all the methods with the new versione, still just missing

backendless!.messaging.registerForRemoteNotifications()

because now with 4.0.15 sims to be not allowed anymore

photo
1

Yes, this method was removed from SDK because it's a standard push notification's registration logic. Please, check the official Apple documentation for more information (or this topic for more examples).

Regards, Olga

photo
1

get if, dont need to call it anyMore.

still have a question before the update

facebook login where: backendless?.userService.login(withFacebookSDK: (FBSDKAccessToken)

after the update, it require FBSDKAccessToken as a String

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #e7e8eb}

span.s1 {font-variant-ligatures: no-common-ligatures; color: #18b5b1}

span.s2 {font-variant-ligatures: no-common-ligatures}

span.s3 {font-variant-ligatures: no-common-ligatures; color: #e12da0}

backendless?.userService.login(withFacebookSDK: (String),....

because i cant find any documentation about it, all the documentations that ive find are old, about previous versions.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #e7e8eb}

span.s1 {font-variant-ligatures: no-common-ligatures}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #18b5b1}

span.s1 {font-variant-ligatures: no-common-ligatures}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #51c34f}

span.s1 {font-variant-ligatures: no-common-ligatures}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #e7e8eb}

span.s1 {font-variant-ligatures: no-common-ligatures; color: #18b5b1}

span.s2 {font-variant-ligatures: no-common-ligatures}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #e7e8eb}

span.s1 {font-variant-ligatures: no-common-ligatures}

span.s2 {font-variant-ligatures: no-common-ligatures; color: #18b5b1}

photo
1

get it, dont need to call it anyMore.

still have a question, before the update

facebook login where: backendless?.userService.login(withFacebookSDK: (FBSDKAccessToken)

after the update, it require FBSDKAccessToken as a String

backendless?.userService.login(withFacebookSDK: (String),....

because i cant find any documentation about it, all the documentations that ive find are old, about previous versions.

photo
1

Please create the separate topic for this question because it doesn't match the "Unable to retrieve device" topic.

Regards, Olga

photo
photo
1

Hello,

My app also keeps crashing, it was working fine until a few days ago i have not touched any code

This is the error: Could not register device on Backendless server: Table with the name DeviceRegistration does not exist

i am on running compile 'com.backendless:backendless:4.+'

app ID: E4F02731-D92B-7950-FFB8-EA52C2E23D00

photo
1

Hello,

Please create the separate topic for this issue.

Regards, Olga

photo
1

Okay

photo
photo
1

We had an update yesterday. This could be a cause of some errors, when you was trying to work with messaging system. Now it should work.