Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

java.lang.IllegalArgumentException: Component class com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver does not exist
Started by bulupe Mar 06 2018 05:18 AM

13 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

bulupe

[GLOBAL: userInfoPane.html]
bulupe
  • Enthusiast

  • 51 posts
  • Corona SDK

Hey there,

 

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

 

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)

 

 
 
Any ideas?
 
Thank you.


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,790 posts
  • Enterprise

What version of Corona are you using?

 

What OS version are you building for?

 

Rob



[TOPIC: post.html]
#3

bulupe

[GLOBAL: userInfoPane.html]
bulupe
  • Enthusiast

  • 51 posts
  • Corona SDK

Hi Rob,

 

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

 

Thank you



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,790 posts
  • Enterprise

Have you reached out to OneSignal yet?

 

Rob



[TOPIC: post.html]
#5

bulupe

[GLOBAL: userInfoPane.html]
bulupe
  • Enthusiast

  • 51 posts
  • Corona SDK

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

 

Bulent



[TOPIC: post.html]
#6

josh_OneSignal

[GLOBAL: userInfoPane.html]
josh_OneSignal
  • Enthusiast

  • 57 posts
  • Corona SDK

@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.



[TOPIC: post.html]
#7

bulupe

[GLOBAL: userInfoPane.html]
bulupe
  • Enthusiast

  • 51 posts
  • Corona SDK

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



[TOPIC: post.html]
#8

josh_OneSignal

[GLOBAL: userInfoPane.html]
josh_OneSignal
  • Enthusiast

  • 57 posts
  • Corona SDK

@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



[TOPIC: post.html]
#9

bulupe

[GLOBAL: userInfoPane.html]
bulupe
  • Enthusiast

  • 51 posts
  • Corona SDK

Hi Joshua, 

 

Will do that on OneSignal support.

 

Thank you.



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,790 posts
  • Enterprise

@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



[TOPIC: post.html]
#11

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 406 posts
  • Corona SDK

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



[TOPIC: post.html]
#12

sergey120xh

[GLOBAL: userInfoPane.html]
sergey120xh
  • Observer

  • 1 posts
  • Corona SDK

Had the same issue. For me the solution was to add plugin "plugin.notifications.v2" to project's build.settings



[TOPIC: post.html]
#13

akao

[GLOBAL: userInfoPane.html]
akao
  • Contributor

  • 354 posts
  • Corona SDK

We just saw this error as well. Should we be worried? 

 

 

10-09 15:33:27.097  1537 10100 D PackageManager: setEnabledSetting : userId = 0 packageName = com.sx.wonsterwords cmp = com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver newState = 2 callingPackage = 10485/com.sx.wonsterwords
10-09 15:33:27.097 25419 25450 W System.err: java.lang.IllegalArgumentException: Component class com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver does not exist in com.sx.wonsterwords
10-09 15:33:27.098 25419 25450 W System.err: at android.os.Parcel.readException(Parcel.java:1963)
10-09 15:33:27.098 25419 25450 W System.err: at android.os.Parcel.readException(Parcel.java:1905)
10-09 15:33:27.098 25419 25450 W System.err: at android.content.pm.IPackageManager$Stub$Proxy.setComponentEnabledSetting(IPackageManager.java:5705)
10-09 15:33:27.098 25419 25450 W System.err: at android.app.ApplicationPackageManager.setComponentEnabledSetting(ApplicationPackageManager.java:2910)
10-09 15:33:27.098 25419 25450 W System.err: at OneSignal.LuaLoader$InitFunction.invoke(LuaLoader.java:118)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.JavaToNativeShim.nativeRender(Native Method)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:195)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.Controller.updateRuntimeState(Controller.java:357)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:425)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
10-09 15:33:27.098 25419 25450 W System.err: at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)



[TOPIC: post.html]
#14

josh_OneSignal

[GLOBAL: userInfoPane.html]
josh_OneSignal
  • Enthusiast

  • 57 posts
  • Corona SDK

@akao This is only a warning and can be ignored. The "plugin.notifications.v2" used to be included in Corona automatically which OneSignal has to disable if found to prevent double notifications from showing. No need to add "plugin.notifications.v2" unless you need it for something else.

 

If you are considered about "plugin.notifications.v2" being disabled it is only the remote notification part. Also OneSignal filter proxies non-OneSignal payloads to it so it won't cause issues with pushes from other sources.




[topic_controls]
[/topic_controls]