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

Issue in configuring Push Notifications with android device

6 Answers 123 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anatoli
Top achievements
Rank 1
Anatoli asked on 27 Aug 2013, 02:41 PM
I am referring following blog for implementing push notifications. 
http://www.icenium.com/blog/icenium-team-blog/2013/04/17/push-notifications-with-cordova-icenium

When I run the app on android app, log shows following error 

[Web Console] deviceready has not fired after 5 seconds.:6672
[Web Console] Channel not fired: onPluginsReady:6665
[Web Console] Channel not fired: onCordovaReady:6665
[Web Console] Channel not fired: onCordovaConnectionReady:6665
[Web Console] processMessage failed: Message: Jjavascript:pushCallbacks.onNotificationGCM
[Web Console] processMessage failed: Error: ReferenceError: pushCallbacks is not defined:975
[Web Console] processMessage failed: Stack: ReferenceError: pushCallbacks is not defined
[Web Console]     at eval 
[Web Console]     at processMessage 
[Web Console]     at Function.androidExec.processMessages 
[Web Console]     at pollOnce 

Any idea?

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Aug 2013, 01:48 PM
Hello Purna,

This could be a possible side effect of the fact that you have managed to push two projects in a single workspace (most probably due to changing remote repository). Please let us know which one should we delete, as currently you cannot build multiple projects in the same workspace.

Also the blog post you refer to has runnable server and application attached to it, you can find them at the end of the blog in the Sample code section. If the problem persists, please disable the PushPlugin and make sure that Cordova events are fired in your project. If not, you can start a clean project and move your files to it one by one to identify the culprit.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Anatoli
Top achievements
Rank 1
answered on 29 Aug 2013, 05:09 AM
Steve,

I have deleted both the projects and started with a new one, But again same issue.

Again, I tried with a dummy project "MyPushNotifications". Followed the same steps as give in example.
push.js is the file. Still I am getting the same error
0
Christoph
Top achievements
Rank 2
answered on 29 Aug 2013, 07:12 AM
Hi,
I have the same problem. It seems that the window.pushCallback ist not declared.

Here is the log:
[Web Console] processMessage failed: Message: Jjavascript:pushCallbacks.onNotificationGCM
[Web Console] processMessage failed: Error: ReferenceError: pushCallbacks is not defined at file:///storage/emulated/0/Icenium/com.telerik.SecureMessanger/cordova.js:975
[Web Console] processMessage failed: Stack: ReferenceError: pushCallbacks is not defined
[Web Console]     at eval at processMessage 
[Web Console]     at processMessage 
[Web Console]     at Function.processMessages 
[Web Console]     at pollOnce

The cordova events are firing fine.

Chris
0
Steve
Telerik team
answered on 29 Aug 2013, 03:32 PM
Hi guys,

@Purna: in the blog post, the functionality for iOS and Android is separated in two separate files and you're referencing the file for iOS, the one for Android is hello-world.js file. If you download the promotion app from the blog, you would notice that push.js is commented out.

@Chris: We see that you've manually updated the PushPlugin to a more recent version we have not tested against. We took a brief look at your code and plugin.xml and they seem to look correct, but we've not tested and reviewed the changes they've made and cannot really say what is wrong at this time. The good news is that we would update to the latest version of this plugin for the upcoming version of Icenium at the end of September where we would also introduce Cordova 3.0 support. For the time being our suggestion is to downgrade the plugin version to the one we have tested and sure it works or contact the plugin authors for advice.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Ufuk
Top achievements
Rank 1
answered on 08 Oct 2013, 01:33 PM
I have similar problem:

Is "Jjavascript:pushCallbacks" normal or is there a typo?

[Web Console] processMessage failed: Message: Jjavascript:pushCallbacks.onNotificationGCM
[Web Console] processMessage failed: Error: ReferenceError: pushCallbacks is not defined:975
[Web Console] processMessage failed: Stack: ReferenceError: pushCallbacks is not defined
[Web Console]     at eval 
[Web Console]     at processMessage 
[Web Console]     at Function.androidExec.processMessages 
[Web Console]     at androidExec 
[Web Console]     at DirectoryEntry.getFile 
[Web Console]     at findFile 
[Web Console]     at getFile 
[Web Console]     at loadAllServiceData 
[Web Console]     at featuredServicesReady 
[Web Console]     at file:///storage/emulated/0/Icenium/com.panteon.v7070/scripts/versionControl.js:89:21:976

Thanks.
0
Steve
Telerik team
answered on 09 Oct 2013, 02:17 PM
Hi Ufuk,

We see you're using latest 1.3.4 version from the PushPlugin repo. We have not tested against it and see that there is already an issue filed that it has problems with Android in Cordova 3.0. We recommend using the PushPlugin version from our Integrated Plugins which is 1.3.3 and verified. Get your project working with it and after that (if we haven't upgraded to 1.3.4 yet) you could try to upgrade it.

General troubleshooting for PushNotification in Android include:
  • Verify that you have created an API project in the Google APIs portal.
  • Verify that you have enabled the Google Cloud Messaging for Android service for your Google API project. In the Google APIs portal, click Services and verify that the status of the Google Cloud Messaging for Android service is ON.
  • If your Google API key is set correctly please try first with this application http://gcm.codeplex.com/

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
General Discussion
Asked by
Anatoli
Top achievements
Rank 1
Answers by
Steve
Telerik team
Anatoli
Top achievements
Rank 1
Christoph
Top achievements
Rank 2
Ufuk
Top achievements
Rank 1
Share this question
or