Bitrise google play deploy Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/
Bitrise google play deploy Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/
我一直在尝试这个部署教程 google 玩 bitrise (https://www.bitrise.io/integrations/steps/google-play-deploy) 但没有成功。
有时我遇到了错误
Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/org.aacctt.[REDACTED]/edits?alt=json&prettyPrint=false: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fandroidpublisher" not defined
已经尝试查找令牌范围的问题,但没有找到任何有用的信息。知道哪里出了问题吗?
日志片段:
+------------------------------------------------------------------------------+
| (9) google-play-deploy@3 |
+------------------------------------------------------------------------------+
| id: google-play-deploy |
| version: 3.0.2 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-05-04T17:39:34Z |
+------------------------------------------------------------------------------+
| |
Getting configuration
Configs:
- JSONKeyPath: *****
- PackageName: org.aacctt.[REDACTED]
- AppPath: /bitrise/deploy/app-release-bitrise-signed.apk\n
- ExpansionfilePath:
- Track: internal
- UserFraction: 0
- WhatsnewsDir:
- MappingFile:
Found .apk file: /bitrise/deploy/app-release-bitrise-signed.apk
Configuration read successfully
Authenticating
Authenticated client created
Create new edit
Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/org.aacctt.[REDACTED]/edits?alt=json&prettyPrint=false: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fandroidpublisher" not defined
| |
+---+---------------------------------------------------------------+----------+
| x | google-play-deploy@3 (exit code: 1) | 12.45 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-google-play-deploy/issues |
| Source: https://github.com/bitrise-io/steps-google-play-deploy |
+---+---------------------------------------------------------------+----------+
我也遇到了这个错误,事实证明,对于我的情况,我没有设置正确的 Play 商店服务帐户密钥文件路径。需要服务帐户才能在 Play 商店控制台中对 Bitrise 进行身份验证。
解决方案是将 BITRISE_DEPLOYER_SERVICE_ACCT_KEY
环境变量的值设置为包含您的 json 文件的有效 URL。一种方法是将帐户密钥直接上传到 Bitrise(到代码签名选项卡下的通用文件存储区域)并在工作流程的 'Deploy to Google Play' 步骤中引用生成的 URL。
我想您也可以将 json 文件存储在 GCS 等安全环境中,并将环境变量设置为文件 URL
如果@kip2 的答案不起作用,专业提示:尝试一个预期的错误路径,首先验证是否发生相同的错误。
如果不是这个问题?创建一个新的服务帐户并授予对其的访问权限。对我们来说,这一行出错了:
Fill out the Service account user role and Service account admins role
fields of the Grant users access to this service account
因为我们从 Fastlane 迁移到 Bitrise,而 Fastlane 不需要权限Service account admins
(我不知道为什么 Bitrise 需要)。
然后再次在 Play 商店中授予访问权限并提供帐户 admin permission
以确保权限配置也没有任何错误。
我一直在尝试这个部署教程 google 玩 bitrise (https://www.bitrise.io/integrations/steps/google-play-deploy) 但没有成功。
有时我遇到了错误
Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/org.aacctt.[REDACTED]/edits?alt=json&prettyPrint=false: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fandroidpublisher" not defined
已经尝试查找令牌范围的问题,但没有找到任何有用的信息。知道哪里出了问题吗?
日志片段:
+------------------------------------------------------------------------------+
| (9) google-play-deploy@3 |
+------------------------------------------------------------------------------+
| id: google-play-deploy |
| version: 3.0.2 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-05-04T17:39:34Z |
+------------------------------------------------------------------------------+
| |
Getting configuration
Configs:
- JSONKeyPath: *****
- PackageName: org.aacctt.[REDACTED]
- AppPath: /bitrise/deploy/app-release-bitrise-signed.apk\n
- ExpansionfilePath:
- Track: internal
- UserFraction: 0
- WhatsnewsDir:
- MappingFile:
Found .apk file: /bitrise/deploy/app-release-bitrise-signed.apk
Configuration read successfully
Authenticating
Authenticated client created
Create new edit
Failed to perform edit insert call, error: Post https://www.googleapis.com/androidpublisher/v3/applications/org.aacctt.[REDACTED]/edits?alt=json&prettyPrint=false: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fandroidpublisher" not defined
| |
+---+---------------------------------------------------------------+----------+
| x | google-play-deploy@3 (exit code: 1) | 12.45 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-google-play-deploy/issues |
| Source: https://github.com/bitrise-io/steps-google-play-deploy |
+---+---------------------------------------------------------------+----------+
我也遇到了这个错误,事实证明,对于我的情况,我没有设置正确的 Play 商店服务帐户密钥文件路径。需要服务帐户才能在 Play 商店控制台中对 Bitrise 进行身份验证。
解决方案是将 BITRISE_DEPLOYER_SERVICE_ACCT_KEY
环境变量的值设置为包含您的 json 文件的有效 URL。一种方法是将帐户密钥直接上传到 Bitrise(到代码签名选项卡下的通用文件存储区域)并在工作流程的 'Deploy to Google Play' 步骤中引用生成的 URL。
我想您也可以将 json 文件存储在 GCS 等安全环境中,并将环境变量设置为文件 URL
如果@kip2 的答案不起作用,专业提示:尝试一个预期的错误路径,首先验证是否发生相同的错误。
如果不是这个问题?创建一个新的服务帐户并授予对其的访问权限。对我们来说,这一行出错了:
Fill out the Service account user role and Service account admins role fields of the Grant users access to this service account
因为我们从 Fastlane 迁移到 Bitrise,而 Fastlane 不需要权限Service account admins
(我不知道为什么 Bitrise 需要)。
然后再次在 Play 商店中授予访问权限并提供帐户 admin permission
以确保权限配置也没有任何错误。