Pat*_*ick 10 firebase firebase-tools
因此,当我突然遇到以下错误时,我正在考虑自己的公司尝试在Angular应用中初始化Firebase项目:
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
为了达到这一点,我按照此处的文档中的说明执行了这些说明:
$ npm install -g firebase-tools
$ firebase login //原来我已经登录。
$ firebase list //确保您可以访问您的帐户。
无论如何,回到错误。“好吧,”我想。“我只会查看指向我的日志。” 我打开日志,然后看到:
HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
FirebaseError: HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
关于“无效的身份验证凭据”的部分使我认为这与我未登录Firebase有关,但firebase login显示我已登录。
日志中的URL仅将我带到使用我的应用程序中使用firebase auth的文档。好吧,我很乐意。但是首先,我需要此命令才能运行,Firebase。
有没有人遇到这个问题/有解决方案?
Pat*_*ick 25
解决方法是:
$ firebase logout
$ firebase login
似乎在升级firebase-tools时,可能会使auth令牌无效。您只需要注销然后重新登录。
这是您注销时的消息:
$ firebase logout
! Invalid refresh token, did not need to deauthorize
+ Logged out from <email>
Mih*_*hir 21
对于不想注销的人,以下命令也有效
firebase login --reauth
Run Code Online (Sandbox Code Playgroud)
首先进入命令提示符并运行下面的代码,然后执行上面的代码。在命令提示符下:
跑步 :powershell Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
小智 6
用于firebase logout注销然后用于firebase login在 CLI 中重新登录到 firebase
在使用更新 firebase 工具后执行此操作 npm install -g firebase-tools
成功登录后,使用firebase use --add列出您拥有的所有项目
| 归档时间: |
|
| 查看次数: |
1436 次 |
| 最近记录: |