Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

Application does not define permission com.google.android.c2dm.permission.RECEIVE #385

Closed joe-at-startupmedia closed 1 year ago

joe-at-startupmedia commented 1 year ago

I'm getting the following error:

E/Pushwoosh: Exception occurred
    java.lang.IllegalStateException: Application does not define permission com.google.android.c2dm.permission.RECEIVE
        at com.pushwoosh.firebase.internal.registrar.FcmRegistrar$b.a(Unknown Source:17)
        at com.pushwoosh.firebase.internal.registrar.FcmRegistrar$b.a(Unknown Source:30)
        at com.pushwoosh.firebase.internal.registrar.FcmRegistrar.checkDevice(Unknown Source:2)
        at com.pushwoosh.notification.PushwooshNotificationManager.b(Unknown Source:45)
        at com.pushwoosh.notification.PushwooshNotificationManager.a(Unknown Source:29)
        at com.pushwoosh.Pushwoosh.a(Unknown Source:45)
        at com.pushwoosh.Pushwoosh.registerForPushNotifications(Unknown Source:1)
        at com.pushwoosh.plugin.pushnotifications.PushNotifications.registerDevice(PushNotifications.java:179)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.pushwoosh.plugin.pushnotifications.PushNotifications.execute(PushNotifications.java:682)
        at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
        at org.apache.cordova.PluginManager.exec(PluginManager.java:146)
        at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
        at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:335)
        at android.os.Looper.loopOnce(Looper.java:161)
        at android.os.Looper.loop(Looper.java:288)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Despite the android manifest containing the following line:

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

I'm using version 8.3.11 of the plugin. Target sdk is 33 Gradle version 7.4.2

Ankononenko commented 1 year ago

Hello, @joe-at-startupmedia

Could you please share the full console log starting with the app being opened? Additionally, please let us know the specific device model you're using for testing purposes.

For security purposes, we recommend sending your request to our support email at help@pushwoosh.com to ensure the safety of any personal data that may be included in the logs.

joe-at-startupmedia commented 1 year ago

@finchren I think It's because the device is a Pixel 5 running graphene without play services installed. I assume it's the case because I cannot replicate on a Pixel 3 that has google services running. Based on that I'll close the issue.