Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,414,268
Community Members
 
Community Events
170
Community Groups

Firebase pipeline authentication error

Hi community

 

I am trying to auto-deploy my Vue.js app to Fireabse hosting, so I created a pipeline for that in my Bitbucket repo, with the following content, but the issue is right after building the app and deploying it to Firebase I get this error: 

Error: 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.

 

I am sure my access token is valid, as I generated it with login:ci . 

Why am I getting an authentication error?

 

bitbucket-pipelines.yml

image: node
pipelines: default:

- step: name: Test

script: - npm install && npm test

- step:

name: Build

script: - npm install && npm run build

artifacts: - build/**

- step:

name: Deploy to Firebase deployment: production

script: -

pipe: atlassian/firebase-deploy:0.2.1

variables:

FIREBASE_TOKEN: $1XXXXXXXXXXXX

PROJECT_ID: $XXXXXXXXXXXXX

1 answer

I recently had the same problem. Many others solved this by doing firebase logout and firebase login to refresh their credentials in the cli. I actually had to run firebase login:ci which regenerates a new TOKEN you can use in your project Bitbucket repo under Repository Settings > Repository Variables. I deleted my old token and just Created a new one with the new token and it worked again. Hope this helps if you haven't solved it yet. 

Thanks alot for the answer. I saw this happen again to me today. Indeed regenerating a new TOKEN using $firebase login:ci helped.

Seems like the TOKEN gets expired after a few days (inactivity) maybe ?

Is there a way someone figured out, how to avoid this happening again ?

As far as I know the token should not expire. I recently sent a push using the pipeline and everything seemed to be working still. I also keep my global firebase-tools updated on my pc, but that should only effect my working environment. There is a possibility of some updates occurring, like sometimes Bitbucket updates their templates we use to deploy to firebase hosting, etc. In 1 project I have the pipe for atlassian/firebase-deploy:0.3.4 and a newer project it is 1.2.0. But I doubt that has any effect on the TOKEN giving in the cli, that basically grants access to run the deploy. I googled for answers and still did found WHY that happens yet. 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events