I tried running firebase deploy like I have always done but came across this Error:
Error: Failed to get Firebase project project-name. Please make sure the project exists and your account has permission to access it.
I have run firebase login and I get 'Already logged in as email#example.com'
The firebase-debug.log file shows a few 401 http responses and some of them have the following text:
'Request had invalid authentication credentials' and also 'invalid token'
How can this be solved?
For me this worked,
firebase logout
firebase login
This worked for me:
Run
firebase use --add
And re-select the project
Simply
use firebase login --reauth
For me, I was setting up a new machine with an existing firebase project. This is what I did:
First successfully login to firebase from your command console
firebase login
Get a list of your projects
firebase projects:list
Tell firebase which project you are using
firebase use <Project ID>
Then, I was able to deploy and use other commands for this project. Hope this helps someone.
sometimes there is a token error you can check debug.log
Error Message in debug.log : [debug] [2020-10-13T23:01:28.050Z] <<< HTTP RESPONSE BODY {"error":{"code":401,"message":"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.","status":"UNAUTHENTICATED"}}
Solution of error use
firebase login --reauth
and again firebase init for reinitializing the project
select project and
firebase deploy
Run
firebase use --add
And re-select the project
This works 100%
Try logging out of firebase CLI and then log back in with the account that has the project that you are trying to run.
This was the case with me. I was logged in to another firebase account.
Steps:
`firebase logout`
`firebase login`
Any typo inside the .firebaserc would show this error. For me I had an extra comma, removing it solved the error.
Disconnecting the company's VPN and trying it again worked for me.
If none of the other answers worked for you, I had the same problem and received this solution from Firebase Support. (ty Sergei)
My system will occasionally create and Environment Variable named FIREBASE_TOKEN. The token will expire, but the variable does not. Restarts and logout/login cycles did nothing. Deleting the variable works every time though.
Remove-Item Env:\FIREBASE_TOKEN
It's really awesome and confusing------>
just did these command ->
> firebase logout
>
> firebase login
if you use Mac or Linux, you can write this command export http_proxy=http://127.0.0.1:1087 to make sure your terminal uses the proxy, which is useful for me.
None of the above solutions worked for me but removing/editing the stored value of the default project in $HOME/.config/configstore/firebase-tools.json did work.
If you have this issue in a CI pipeline, you can regenerate a token on your local machine with
firebase login:ci
Put the generated token as an environment variable, e.g. FIREBASE_TOKEN and run like this:
firebase deploy --token "$FIREBASE_TOKEN"
1.run this
firebase logout
firebase login
2.if u can not login successfully , like this ?
[https://i.stack.imgur.com/4MJM5.png][1]
run this , export http_proxy=http://localhost:your proxy port
4.successfully!!!
[https://i.stack.imgur.com/sRcvG.png][1]
It is possible you are trying to deploy without internet connection. The first thing to look for is if your internet is okay.
Make sure that you don't have this file .firebaserc already existing in your project directory if you already do!
Delete it and try firebase init in console again.
I got this error in Linux when I was out of disk space, freeing some space resolved it.
This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.
Everything working fine without any changes today I get above error, When I send request for verification code get success from signInWithPhoneNumber but verification code didn't getting.
I tried with adding test number in firebase console but get same error.
Let me know if any know how to fixed that.
Thanks in advance!
Clearing the cash of google play services to solve it.
This happens when I uninstall and reinstall the app multiple times and signing in into multiple accounts and change the system clock frequently for testing.
I am new to firebase, I wanted to retrieve list of my authenticated users in JSON Format
I have searched for the solution but couldn't have found, some say it isn't possible !!!
Please, someone, tell me whether it is possible or any other alternative ways to
get my users username/displayName/emailId or any other description based on their SignUp method.
I found a way to do it but I got an error , using Nodejs with this command :
**firebase auth:export users.json --format=json --project projectname**
This is a rather indirect answer, but, when they sign up, you could add the info you need about the user to the Firebase live database. Then, when you retrieve that information from the database, it's in JSON. I guess this probably isn't the answer you were looking for, but I hope it helps.
Ensure that you have firebase-cli installed on your computer. If so, just use firebase auth:export <name.format> --project <project-id> from the command line.
You can read more about the exported file from their tutorials here.
I know exactly what I want to achieve, but need some help to be able to start.
Flow:
Automatic periodic checking of my gCalendar to see if I just finished a meeting
Sending message to Slack with question "What is to-do list after the meeting?"
User writes a response.
Response get stored in Google Sheet.
My main concern right now are steps 1 and 2: is Api.ai capable of automatic periodic checking of my gCalendar by itself, so when my meeting is over, I get message in Slack and then I can continue normal communication with the Api.ai bot?
The problem I see here is that I expect Api.ai to push a message to Slack after some external trigger instead of waiting trigger from me as a Slack user.
If you haven't done so, you may want to check Bot Users which enable teams to conversationally interact with external services or your custom code by building bot users.
What can bot users do?
The primary way bot users interact with people on a given team is by connecting to the Real Time Messaging API (RTM API for short) and opening up a websocket connection with Slack.
The Events API is an alternative way to receive and respond to events as a bot user contained within a Slack App. Instead of connecting over a websocket, you subscribe to specific events and messages and Slack sends them to your server.
Secondly, you may want to also check the Bot implementation given in this GitHub post or you may try to customize your bot behavior using the following steps:
Clone the repository https://github.com/api-ai/api-ai-slack-bot
Change the code to index.js
In the Docker, use the run command specifying the full path to the directory containing the index.js file:
run command:
docker run -d --name slack_bot \
-e accesstoken="Api.ai client token" \
-e slackkey="Slack bot user key" \
-v /full/path/to/your/src:/usr/app/src \
speaktoit/api-ai-slack-bot
Lastly, for additional information, please also see Slack Integration documentation wherein it gives guidelines on how you can set up Slack Integration in API.AI. Please also see Slack Help Center for ways on how you can connect Google Calendar to Slack.
I've followed the iOS getting started tutorial here, registered my device but the notifications don't seem to arrive. What am I doing wrong?
It would be helpful to:
Check the exact reason in the statistics page of that notification
Did you compile the app with the correct provision profile? In order to test with production certificate, you'll need to compile the app with AdHoc provision profile.
For easier debugging, please add our error delegation method as shown in our wiki here