我正在尝试将构建 apk android 上传到 Firebase Distribution。如果我使用firebase login
cli 登录并部署到 firebase,我可以成功上传 apk。但是如果我将参数 --token 与 from 的值一起使用firebase login:ci
,然后执行
firebase appdistribution:distribute app-dev-release.apk --token “—1//0g1PZMmVfKXw3CgYIARAAGBASNwF-asdasdasdasfdgfgera-O9Jsldzh8Q_2EF60UmttcQVfWFQIVs1-g” --app "1:12321415345345:android:121324131"
我得到如下回复
[2021-07-30T06:31:16.722Z] ----------------------------------------------------------------------
[2021-07-30T06:31:16.725Z] Command: firebase appdistribution:distribute app-dev-release.apk --token “1//0g2GeI8ZZUQ-asdasd-L9IrutOPPagkmqHyc6MMfTkThr9rzWcyqF_PBERT9rBjnTzwl6OzOf_KTgl0OydXgfMWdfA” --app 1:1074048729313:android:asd123sad1 --debug
[2021-07-30T06:31:16.726Z] CLI Version: 7.9.0
[2021-07-30T06:31:16.726Z] Platform: darwin
[2021-07-30T06:31:16.726Z] Node Version: v10.15.3
[2021-07-30T06:31:16.728Z] Time: Fri Jul 30 2021 13:31:16 GMT+0700 (Western Indonesia Time)
[2021-07-30T06:31:16.729Z] ----------------------------------------------------------------------
[2021-07-30T06:31:16.729Z]
[2021-07-30T06:31:16.739Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2021-07-30T06:31:16.739Z] > authorizing via --token option
i getting app details...
[2021-07-30T06:31:16.743Z] > refreshing access token with scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2021-07-30T06:31:16.744Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
<request body omitted>
[2021-07-30T06:31:17.052Z] <<< HTTP RESPONSE 400 expires=Mon, 01 Jan 1990 00:00:00 GMT, pragma=no-cache, cache-control=no-cache, no-store, max-age=0, must-revalidate, date=Fri, 30 Jul 2021 06:31:18 GMT, content-type=application/json; charset=utf-8, vary=X-Origin, Referer, Origin,Accept-Encoding, server=scaffolding on HTTPServer2, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43", accept-ranges=none, transfer-encoding=chunked
[2021-07-30T06:31:17.056Z] >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/1:12321415345345:android:as2342d234234as
Error: failed to fetch app information. Server Error. Invalid character in header content ["authorization"]
有没有人遇到过这个问题以及如何解决?仅供参考,在将脚本创建到 GitLab 之前,我尝试在本地计算机上部署分发 ci 进行测试