Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Error Despite Correct Token - Proxy and SSL Certificate Prb. #6362

Open
ftmzhrsckldr opened this issue Sep 15, 2023 · 0 comments

Comments

@ftmzhrsckldr
Copy link

We encountered the following error even though the token was correct:

.../step_2se4t5ss.ytl/eb0525e1-ebfb-48ab-835a-c48c6a9bfb7a.script:13:in `run_command': Command failed. Check logs for details  (RuntimeError)
⚠  Authenticating with --token is deprecated and will be removed in a future major version of firebase-tools. Instead, use a service account key with GOOGLE_APPLICATION_CREDENTIALS: https://cloud.google.com/docs/authentication/getting-started
i  uploading binary...
Error: failed to upload release. Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth
For CI servers and headless environments, generate a new token with firebase login:ci
⚠  Unable to fetch the CLI MOTD and remote config.

However, the actual cause of the error was as follows:

We are using a proxy, and the proxy is intercepting the Firebase CLI requests by performing HTTPS inception. Meanwhile, the SSL certificate being used is self-signed, causing Firebase to encounter an SSL certificate error.

Firebase is reporting an authentication error despite the token being correct, but it should be reporting a self-signed certificate error.

To resolve this issue, it is necessary to add the NODE_EXTRA_CA_CERTS environment variable.

Steps to Reproduce:

  1. Use a proxy that intercepts HTTPS requests.
  2. Use a self-signed SSL certificate.
  3. Authenticate with Firebase using a correct token.
  4. Observe that Firebase reports an authentication error instead of a self-signed certificate error.

Expected Behavior:

Firebase should correctly report a self-signed certificate error when an SSL certificate issue is encountered.

Actual Behavior:

Firebase incorrectly reports an authentication error when an SSL certificate issue is encountered.

Additional Information:

Adding the NODE_EXTRA_CA_CERTS environment variable is a necessary step to address this issue.

@joehan joehan self-assigned this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants