grrrian/phonegap-parse-plugin

Error, when app is closed

Closed this issue · 1 comments

12-05 13:56:25.422 15250 15250 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.parse.PushService@f876cc5 with Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 pkg=ru.tenlevels.tenlevels cmp=ru.tenlevels.tenlevels/com.parse.PushService (has extras) }: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(Context) before using the Parse library.
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3027)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.app.ActivityThread.-wrap17(ActivityThread.java)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5417)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: Caused by: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(Context) before using the Parse library.
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.Parse.checkContext(Parse.java:563)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.Parse.getApplicationContext(Parse.java:313)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.ManifestInfo.getContext(ManifestInfo.java:322)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.ManifestInfo.getPackageName(ManifestInfo.java:326)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.ManifestInfo.getIntentReceivers(ManifestInfo.java:131)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.ManifestInfo.hasIntentReceiver(ManifestInfo.java:123)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.ManifestInfo.getPushUsesBroadcastReceivers(ManifestInfo.java:174)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.PushService.wipeRoutingAndUpgradePushStateIfNeeded(PushService.java:504)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at com.parse.PushService.onStartCommand(PushService.java:485)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3010)
12-05 13:56:25.422 15250 15250 E AndroidRuntime:    ... 8 more

Got this, when application was closed and push was received.
(I use App.java for initialization)
Android 6.0

This happens when you call methods of the plugin before calling parsePlugin.initialize()

ian

On Dec 5, 2015, at 9:16 AM, MrFlox notifications@github.com wrote:

12-05 13:56:25.422 15250 15250 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.parse.PushService@f876cc5 with Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 pkg=ru.tenlevels.tenlevels cmp=ru.tenlevels.tenlevels/com.parse.PushService (has extras) }: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(Context) before using the Parse library.
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3027)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.app.ActivityThread.-wrap17(ActivityThread.java)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: Caused by: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(Context) before using the Parse library.
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.Parse.checkContext(Parse.java:563)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.Parse.getApplicationContext(Parse.java:313)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.ManifestInfo.getContext(ManifestInfo.java:322)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.ManifestInfo.getPackageName(ManifestInfo.java:326)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.ManifestInfo.getIntentReceivers(ManifestInfo.java:131)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.ManifestInfo.hasIntentReceiver(ManifestInfo.java:123)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.ManifestInfo.getPushUsesBroadcastReceivers(ManifestInfo.java:174)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.PushService.wipeRoutingAndUpgradePushStateIfNeeded(PushService.java:504)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at com.parse.PushService.onStartCommand(PushService.java:485)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3010)
12-05 13:56:25.422 15250 15250 E AndroidRuntime: ... 8 more
Got this, when application was closed and push was received.
(I use App.java for initialization)
Android 6.0


Reply to this email directly or view it on GitHub.