java.lang.IllegalArgumentException: Component class com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver does not exist

Hey there,

We have an Android application with OneSignal however we get this error on application start;

[lua]D ShortcutBadger: Finding badger
D ShortcutBadger: Current badger:com.onesignal.shortcutbadger.impl.DefaultBadger
W System.err: java.lang.IllegalArgumentException: Component class com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver does not exist in 
W System.err: at android.os.Parcel.readException(Parcel.java:1688)
W System.err: at android.os.Parcel.readException(Parcel.java:1637)
W System.err: at android.content.pm.IPackageManager$Stub$Proxy.setComponentEnabledSetting(IPackageManager.java:4356)
W System.err: at android.app.ApplicationPackageManager.setComponentEnabledSetting(ApplicationPackageManager.java:2082)
W System.err: at OneSignal.LuaLoader$InitFunction.invoke(LuaLoader.java:118)
W System.err: at com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
W System.err: at com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:381)
W System.err: at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:382)
W System.err: at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1612)
W System.err: at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)[/lua]

Any ideas?

Thank you.

What version of Corona are you using?

What OS version are you building for?

Rob

Hi Rob,

We are getting this error on Android and Corona 3223, Corona 3229.

Thank you

Have you reached out to OneSignal yet?

Rob

I wrote them when I opened this topic but not reply.

Bulent

@bulupe Is this causing any crashes, issues with the device registering for push, or notification not to show?

I believe error is being caught by our SDK and then is just printed to the logcat.

@Rob Miracle Has the  com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver class been renamed in Corona? Or is it included conditionally? The OneSignal SDK disabled this and invokes it manually if the GCM / FCM payload is not from OneSignal. This workaround was done to prevent duplicated notifications. If there is a more correct way to do this let me know. Thanks.

Hi Josh,

No it is just a warning and I am not sure if it is preventing One Signal working correctly. 

However top 2 ANR  (they are happening really a lot) on android in our game are OneSignal related thats why I thought this might be important.

Because of these ANR we are really thinking to drop OneSignal, here is the last 7 day ANR screenshot.

Screen_Shot_2018_03_08_at_07_17_00.png

Thanks

Bulent

@bulupe Can you share the full logs from these ANRs that includes all stack traces from all threads? Feel free to share them with OneSignal support if you don’t want to share them publicly on this forum. Thanks

Hi Joshua, 

Will do that on OneSignal support.

Thank you.

@josh_OneSignal, I’ll have to ask engineering. The person with that answer is out on holiday.  It will likely be Monday before I get an answer.

Rob

I am getting this error as well. What is the status on this?

Had the same issue. For me the solution was to add plugin “plugin.notifications.v2” to project’s build.settings

What version of Corona are you using?

What OS version are you building for?

Rob

Hi Rob,

We are getting this error on Android and Corona 3223, Corona 3229.

Thank you

Have you reached out to OneSignal yet?

Rob

I wrote them when I opened this topic but not reply.

Bulent

@bulupe Is this causing any crashes, issues with the device registering for push, or notification not to show?

I believe error is being caught by our SDK and then is just printed to the logcat.

@Rob Miracle Has the  com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver class been renamed in Corona? Or is it included conditionally? The OneSignal SDK disabled this and invokes it manually if the GCM / FCM payload is not from OneSignal. This workaround was done to prevent duplicated notifications. If there is a more correct way to do this let me know. Thanks.

Hi Josh,

No it is just a warning and I am not sure if it is preventing One Signal working correctly. 

However top 2 ANR  (they are happening really a lot) on android in our game are OneSignal related thats why I thought this might be important.

Because of these ANR we are really thinking to drop OneSignal, here is the last 7 day ANR screenshot.

Screen_Shot_2018_03_08_at_07_17_00.png

Thanks

Bulent

@bulupe Can you share the full logs from these ANRs that includes all stack traces from all threads? Feel free to share them with OneSignal support if you don’t want to share them publicly on this forum. Thanks

Hi Joshua, 

Will do that on OneSignal support.

Thank you.