This is a migrated thread and some comments may be shown as answers.

Error when checking device registration status

4 Answers 125 Views
Push Notifications
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 25 Apr 2014, 02:40 AM
I've been working with your "Telerik baas push notification" sample project for a couple of days. I was able to get everything working fine yesterday (build/install on Android), but today I continue to run into the following error after clicking "Enable Notifications" on my phone.

ERROR!

An error occured while checking device status.

undefined

I've tried installing the package on another phone, completely rebuilding the workspace (app/backend), and except for the required changes, I haven't made any changes to the code. The "Register" button no longer appears (just the error) and in turn, my device is never registered.

One interesting note, I cloned (what I think is an older repository - telerik/backend-services-push-hybrid) - and tried that. Although it had some UI issues, it actually did work. I was able to register my device.

Any thoughts?

Thanks again,
David

4 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 25 Apr 2014, 10:13 AM
Hi David,

Unfortunately, it would be very hard to identify the main cause for this behavior without a glimpse on the used code and optionally some details about the device and the AppBuilder client used.

A wild guess would be that the emulatorMode flag was set to true when deploying to a device (or somehow was saved to the device through the LiveSync option).

Could you please verify for any differences between the working and the not working versions?

Just a quick note: the repository you have cloned is the parent source and is also working. There are minor UI differences and such in the namings of the variables.

Please, let us know if you have questions.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
David
Top achievements
Rank 1
answered on 25 Apr 2014, 11:39 AM
Anton,

Sorry, I didn't give you a lot to go on. So, I'm using the AppBuilder web client. And the main Android phone that I'm testing with is a Moto X - although I did attempt a single test on a Samsung Galaxy Victory 4G LTE phone - to the same result.

Just before replying to you I setup a new workspace / sample app / and backend. Here's what I did - no other changes were made.

1) Create a new workspace
2) Create AppBuilder Project
3) Start from sample project / Advanced APIs / Telerik baas push notification
4) Create Backend Services project / Start from scratch
5) Go to Settings / Push notifications
6) Checkmark Android / Add my API Key from Google (Google Cloud Messaging for Android, and the key is for Android applications) / Save
7) Copy the backend API key
8) Open the app / open main.js
9) Replace BAAS_API_KEY with the backend one that I copied
10) Replace GOOGLE_PROJECT_NUMBER with the one from my Google project
11) Save
12) Run / Build / Android / Next
13) Download/install package to my Android Moto X device
14) Open sample app
15) Click Enable Notifications button
16) Get the error :o/

As I mentioned before, this all was working a couple of days ago. Except for after getting the error, I didn't modify the emulatorMode - and then did so only for a moment - then set it back. I've cleared my phone cache many times and have uninstalled / installed the app many times as well.

Although, an unlikely connection, I'll mention it anyway. The sample app seemed to be working up until the AppBuilder issues yesterday with builds failing for some users. I was affected by that, although builds work fine now.

I haven't had a chance to look at the differences between the the two repositories yet, but will look into that today.

Thanks,
David
0
Accepted
Anton Dobrev
Telerik team
answered on 25 Apr 2014, 12:42 PM

Hello David,

Thank you for getting back to us!

In fact, just a while before this post we were able to reproduce the issue. Actually, in the process of debugging the app, everything returned back to working stage.

My initial guess was also that this could be somehow connected to:
  - The AppBuilder build issues from yesterday.
  - The device uuid not being resolved by the plugin (due to build issues).
  - The request for the registration not being prepared as needed.

The AppBuilder team deployed a fix on the live environment and you should be able to build Android apps correctly (as before).

Could you please verify on your side if things are back to normal?

Regards,

Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
David
Top achievements
Rank 1
answered on 25 Apr 2014, 12:53 PM
Great!

I rebuilt/reinstalled the app and all worked as expected. Thanks for the great support.

Thanks,
David
Tags
Push Notifications
Asked by
David
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
David
Top achievements
Rank 1
Share this question
or