Closed gerbiljames closed 1 year ago
I found a few problems with this issue:
@gerbiljames the easiest way to resolve this would be to add a android:versionName
to the AndroidManifest file in your instrumented tests. See https://github.com/firebase/firebase-android-sdk/blob/master/firebase-sessions/src/androidTest/AndroidManifest.xml for an example. We will make a change in Firebase to mitigate this to make testing easier.
@mrober That fixed it thanks. I originally tried to specify it in build.gradle
for the library but it wasn't being populated in the manifest for some reason.
This is fixed in the latest versions of Sessions and Crashlytics.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When the Firebase SDK is initialised in an environment where
packageInfo.versionName
returnsnull
an NPE is thrown. This is specifically happening for instrumented tests when the testing target is an Android library and not an application.Relevant Code:
Captured stack trace: