Pushwoosh/pushwoosh-unity

app crash after update to firebase 8.0.0

Closed this issue · 1 comments

Unity version 2020.3.0f1
Pushwoosh version 6.0.7

After updating firebase to version 8.0.0, I get this error: : "Unable to get provider com.pushwoosh.PushwooshInitProvider: java.lang.IllegalStateException: You must add "implementation 'com.google.firebase:firebase-messaging:+'" line to your app build.gradle." and the app crashes instantly.

I think the version of firebase-messaging in the depencies is now obsolete.. I try to set the latest but the app also crash.

Logcat
image

Pushwoosh dependencies

<dependencies>
    <androidPackages>
        <androidPackage spec="com.pushwoosh:pushwoosh:6.2.7"/>
        <androidPackage spec="com.pushwoosh:pushwoosh-firebase:6.2.7"/>
        <androidPackage spec="com.pushwoosh:pushwoosh-amazon:6.2.7"/>
        <androidPackage spec="com.pushwoosh:pushwoosh-badge:6.2.7"/>
        
        <androidPackage spec="com.google.firebase:firebase-messaging:19.0.0"/>
<!--        <androidPackage spec="com.pushwoosh:pushwoosh-location:6.2.7"/>-->
    </androidPackages>
   
    <iosPods>
    	<iosPod name="Pushwoosh" version="6.1.1"/>
    	<!-- <iosPod name="Pushwoosh/Geozones"/> -->
  	</iosPods>
</dependencies>

Firebase messaging dependency

<dependencies>
  <iosPods>
    <iosPod name="Firebase/Messaging" version="8.1.1" minTargetSdk="9.0">
    </iosPod>
  </iosPods>
  <androidPackages>
    <androidPackage spec="com.google.firebase:firebase-messaging:22.0.0">
    </androidPackage>
    <androidPackage spec="com.google.firebase:firebase-analytics:19.0.0">
    </androidPackage>
    <androidPackage spec="com.google.firebase:firebase-messaging-unity:8.0.0">
      <repositories>
        <repository>Assets/Firebase/m2repository</repository>
      </repositories>
    </androidPackage>
  </androidPackages>
</dependencies>

mainTemplate

implementation 'com.google.firebase:firebase-messaging:19.0.0' // Assets/ThirdParty/Pushwoosh/Editor/PushwooshDependencies.xml:9
implementation 'com.google.firebase:firebase-messaging:22.0.0' // Assets/Firebase/Editor/MessagingDependencies.xml:13
implementation 'com.google.firebase:firebase-messaging-unity:8.0.0' // Assets/Firebase/Editor/MessagingDependencies.xml:20

Do you have a solution ?
Thank you !

wfhm commented

@agrobost,

Google removed Firebase Instance ID API with the latest Unity plugin release, and it breaks our SDK. As a workaround, you can manually add the firebase-iid dependency explicitly to your project:

implementation "com.google.firebase:firebase-iid:21.1.0"