Solution skill
HTTP Error: 401 while setting up firebase cloud functions for android project
Complete solution
Shows how to fix hTTP Error: 401 while setting up firebase cloud functions for android project. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
[M.Ali (accepted answer)] I solved the problem! you need to logout firebase logout then log-in firebase login again or just refresh the token with firebase login --reauth it seems that the expiry time of Firebase auth token is limited to max 1Hr Context: Stack Overflow #52891500 (accepted answer, 648 votes, 5 answers): I`m trying to set up firebase functions, but I get an error after running firebase init.
Steps
- [M.Ali (accepted answer)] I solved the problem! you need to logout firebase logout then log-in firebase login again or just refresh the token with firebase login --reauth it seems that the expiry time of Firebase auth token is limited to max 1Hr
When to use
You are seeing this: Error: HTTP Error: 401, Request had invalid authentication credentials. Use this skill when you run into "HTTP Error: 401 while setting up firebase cloud functions for android project".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://developers.google.com/identity/sign-in/web/devconsole-project
Evidence
Source: Stack Overflow #52891500 (accepted answer, 648 votes, 5 answers): I`m trying to set up firebase functions, but I get an error after running firebase init. 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.
Verified resolution: [M.Ali (accepted answer)] I solved the problem! you need to logout firebase logout then log-in firebase login again or just refresh the token with firebase login --reauth it seems that the expiry time of Firebase auth token is limited to max 1Hr
Source URL: https://stackoverflow.com/questions/52891500
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_c001g--xKNJD7s2uOQgOcA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">HTTP Error: 401 while setting up firebase cloud functions for android project <span>— Vectle</span></a>