AppDistribution - Latest version which fixed ` Missing app id. Please check that it was passed in and try again` not working for APK splits
Hi,
com.google.gms.google-services:4.4.1
com.google.firebase.appdistribution:4.2.0
I read there was an issue with previous versions where GMS broke AppDistribution, and then AppDistribution issues an fix. All is working for my non-apk split project.
However, for the one with apk split, there was a need to register task per ABI manually like this (prior 4.x app distribution)
tasks.register("appDistributionUpload${abiName.capitalize()}${variant.name.capitalize()}", com.google.firebase.appdistribution.gradle.UploadDistributionTask) {
artifactPath = output.outputFile.absolutePath
serviceCredentialsFile = project.file("secrets/ci-firebase-account.json").absolutePath
releaseNotes = abi
}
Now after upgrading to the latest, this also produces the known (https://github.com/firebase/firebase-android-sdk/issues/5349)
Using APK path specified by the artifactPath parameter in your app's build.gradle: /Users/ursus/AndroidStudioProjects/o2-selfcare-android/mo2-android/radost/app/build/outputs/apk/tstFaceRecoDev/release/app__tstDevRelease_arm64-v8a_f008e376cb__05-03-2024__v1-24_200179907.apk.
Uploading APK to Firebase App Distribution...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':foo:app:appDistributionUploadArm64v8aTstDevRelease'.
> Missing app id. Please check that it was passed in and try again
Could you please elaborate what was your fix, which fixed the non-apk split default behavior? It seems to me I need to "set" it manually here as well, since I'm registering a new Task
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @ursusursus, thank you for reaching out and reporting the issue. I was able to replicate the issue and I noticed that by adding the appId the upload pushed through.
tasks.register("appDistributionUpload${abiName.capitalize()}${variant.name.capitalize()}", com.google.firebase.appdistribution.gradle.UploadDistributionTask) {
appId = "" <-- app id from your google-services.json
artifactPath = output.outputFile.absolutePath
serviceCredentialsFile = project.file("credential/service-accountA.json").absolutePath
group = "tester"
}
Can you check if that works for you too?
According to our documentation,
appIdis required only if you don't have the Google Services Gradle plugin installed. You can find the App ID in the google-services.json file or in the Firebase console on the General Settings page. The value in your build.gradle file overrides the value output from the google-services plugin.
Understandably this behavior should not be happening, since the google-services.json is already present. I'll notify our engineers and see what we can do here.
@lehcar09 yes adding appId = ".." makes it work
Hi @ursusursus, apologies for the hold up. Thank you for the confirmation that adding appId works. I have reported the issue to our engineers and it is internally tracked in b/329843319. I'll leave this issue open for now.
P.S. For folks who's also experiencing this issue thumbs up on the original post can help us prioritize adding this to the roadmap.
Any update on this please? Still broken in 5.0.0 .. because of this I'm still stuck on 2.2.0 !
Do I really need to parse google-services.json myself to extract the appIds?
Or better yet, could the plugin just simply register tasks for actually ALL variants? i.e. apk splits included?
play-publisher does this out of the box and I've never needed to wrestle with it