I am implementing the CICD for an app which I've done in react native but I've a situation now that the firebase is not letting me upload the ipa and apk "the server responded with status 400". I have used my account for uploading first there it was working perfectly now I am using another account. Now it's not letting me upload it.
This is what I get in the terminal window.
[13:28:30]: 🔐 Authenticated successfully.
[13:28:33]: ⌛ Uploading the APK.
[13:28:47]: ✅ Uploaded the APK.
[13:28:48]: the server responded with status 400
+------+---------------------------+-------------+
| fastlane summary |
+------+---------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------+-------------+
| 1 | clean assembleRelease | 315 |
| 💥 | firebase_app_distribution | 18 |
+------+---------------------------+-------------+
400 means "bad request". And, to be honest, that lacks detail from Fastlane, as it just indicates (retrospectively) the provided configuration is incomplete or incorrect.
Here is an example on what happened here: The reason was a bad app ID copied from the Firebase project (I was trying the encoded app ID, instead of the app ID).
platform :ios do
desc 'Me App'
lane :beta do
build_ios_app(
export_method: 'ad-hoc',
export_options: {
provisioningProfiles: {
'com.example.meapp' => 'Me App'
}
}
)
firebase_app_distribution(
app: 'bad_id', # The 400 was from a bad ID here.
testers: '[email protected]',
release_notes: release_notes,
)
end
end
As of time of writing, I found clues in the error trace from Fastlane. Some Ruby code was throwing the error.
def self.run(params)
params.values # <= printing out the `params` showed all pieces that could lead to a 400 Bad Request
# ...
app = fad_api_client.get_app(app_id, app_view)
Looking at how it broke helped understand the culprit was the app ID here. Hopefully this would be enough in the OP situation too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With