Firebase Authentication Error



I kept getting this error when I followed the tutorial to set up Firebase deployment

Error: HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See

Any help is appreciated


Most likely your credentials are incorrect at the deployment time. If you encrypted your credentials, they were probably encrypted incorrectly. Try specifying the repo with -r, and the endpoint with --pro (for .com), or --org (for .org); e.g.,

travis encrypt -r OWNER/REPO --com

Alternatively, try setting it on the settings panel.


I am not successful with the approach. Anyone else is lucky with this?


Setting edge to true has seemed to resolve the problem.

This could possibly be because of a recent change to the firebase-tools which has fixed the issue.


Try this:

- npm test
- npm run build
  - firebase --non-interactive --token $FIREBASE_TOKEN