问题描述
我正在为在响应本机中完成的应用实现CICD,但现在情况是,firebase不允许我上传ipa和apk,“ 服务器的响应状态为400 。我已经使用我的帐户进行了第一次上传,现在我使用了另一个帐户,因此可以正常运行。现在,不允许我上传它。任何建议将非常有帮助。由于是客户的帐户详细信息,因此我无法在此处共享屏幕截图或代码。抱歉我已经在互联网上搜索了可能的原因,但找不到任何原因。请帮我。提前致谢。祝您编码愉快!!
这是我在终端窗口中看到的。
[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
表示“错误的请求”。而且,老实说,这缺乏 Fastlane 的细节,因为它只是表明(回顾性地)提供的配置不完整或不正确。
以下是发生在此处的示例:原因是从 Firebase 项目复制的错误应用 ID(我尝试的是编码的应用 ID,而不是应用 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: 'eric.platon@gmail.com',release_notes: release_notes,)
end
end
截至撰写本文时,我在 Fastlane 的错误跟踪中找到了线索。某些 react-app-rewired 抛出了错误。
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)
查看它是如何崩溃的有助于理解罪魁祸首是这里的应用程序 ID。希望这在 OP 情况下也足够了。