arleyandrada / PushClient

FREE and Open Source - Titanium PushClient Module
Other
44 stars 17 forks source link

java.lang.NullPointerException: PushType is NONE #128

Closed ruscles closed 8 years ago

ruscles commented 8 years ago

Hi,

I get the following error when first trying to register for push notifications on an Android device running 5.0.1, pushclient 1.12, and Titanium SDK 5.2.2.GA. I don't get the error when building to a 6.0.1 device and notifications come through fine. Any ideas?

[ERROR] AndroidRuntime: FATAL EXCEPTION: main
[ERROR] AndroidRuntime: Process: com.capitalone.toc.toc2go, PID: 840
[ERROR] AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.PushBroadcastReceiver: java.lang.NullPointerException: PushType is NONE!
[ERROR] AndroidRuntime:     at android.app.ActivityThread.handleReceiver(ActivityThread.java:3000)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.access$1800(ActivityThread.java:177)
[ERROR] AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1525)
[ERROR] AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] AndroidRuntime:     at android.os.Looper.loop(Looper.java:145)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5942)
[ERROR] AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
[ERROR] AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
[ERROR] AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
[ERROR] AndroidRuntime: Caused by: java.lang.NullPointerException: PushType is NONE!
[ERROR] AndroidRuntime:     at com.appcelerator.aps.CCPushService.ifEnabled(CCPushService.java:256)
[ERROR] AndroidRuntime:     at com.appcelerator.aps.PushBroadcastReceiver.onReceive(PushBroadcastReceiver.java:59)
[ERROR] AndroidRuntime:     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2993)
[ERROR] AndroidRuntime:     ... 9 more
arleyandrada commented 8 years ago

Hi,

No part of this error refers to my module.

However this error suggests that you're using another module to control push notifications or you have changed your tiapp.xml file trying to set up services or intents wrongly and unnecessarily in the case of using my module.

Remove the "ti.cloudpush" module from your project. It is not possible to use both modules in one project.

Regards,

Arley