Closed felixchez closed 1 year ago
I found a few problems with this issue:
Thanks for reporting, @felixchez. I can't seem to reproduce this issue on the latest version 3.0.3
. Any chance you could share a MCVE? It'll help me investigate this further. Thanks
@argzdev I will try to come up with a MCVE.
just want to describe the process that we ended up with the Missing App id issue.
The project environment is setup with gitlab CI/CD.
In this scenarios, we will encounter the Missing App id
issue
build stage: ./gradlew assembleDebug
firebase stage: ./gradlew appDistributionUploadDebug
In the following scenarios, we will NOT experience the Missing App id
issue. Noticed that assembleDebug
is called again in firebase stage.
build stage: ./gradlew assembleDebug
firebase stage: ./gradlew assembleDebug appDistributionUploadDebug
Thanks for the extra details, @felixchez. This is quite odd, I was able to upload the APK in both scenarios.
Could you check what Gradle and AGP version are you using in your CI/CD? In my setup, im currently using Gradle version 7.3.3
and AGP version 7.2.0
.
Hey @felixchez. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
using Gradle version 7.5.1 and AGP version 7.2.1 still seeing the issue. Let me work on downgrading to Gradle version 7.3.3 and AGP version 7.2.0.
downgrade to AGP version 7.3.3 and AGP version 7.2.0 still complaint error of missing AppId.
when using Gitlab CI/CD pipelines, this AppId issue gets away only when setting with the following methods exclusively.
Method #1:
firebaseAppDistribution {
appId = "...."
}
Method #2:
export FIREBASE_APP_ID=""
./gradlew appDistributionUploadDebug
Method #3:
./gradlew assembleDebug appDistributionUploadDebug
Observing from method #3 which running assembleDebug
on the same stage, firebaseAppDistribution don't complaint about the AppId error. However, when having build
and deploy
stages, Gitlab doesn't cache environment variables e.g. mobilesdk_app_id
from build
stage for deploy
stage.
That's insightful! Thanks for the extra details, @felixchez. I'll notify our engineers and see what we can do here.
Hey @felixchez! I'm a developer on the App Distribution team. When the appId
parameter isn't set in your build.gradle
file, the gradle plugin gets the appId
from the resource file that is output from the google-services
plugin when the assembleDebug
command is run. The file's location is app/build/generated/res/google-services/{build_type}/values/values.xml
.
https://developers.google.com/android/guides/google-services-plugin#processing_the_json_file
Are you passing this file from the build
stage to the firebase
stage?
@tagboola caching values.xml
between build
stage to the firebase
stage does resolve the issue with missing appId. Thank you!
Happy to help!
@tagboola and @argzdev, Thank you for your help! Hopefully, this thread will help others as well when using Gitlab with build and Firebase deploy in stages.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
related to this issue https://github.com/firebase/firebase-android-sdk/issues/3501
still seeing "Missing app id. Please check that it was passed in and try again" error
Steps to reproduce:
./gradlew appDistributionUploadDebug
Relevant Code: