please help me i can't connect to my google cloud shell since yesterday - google-cloud-shell

1 since yesterday, I cannot connect to the google cloud shell. Whenever I try to connect to the cloud shell, an error message comes up saying that "Google Cloud Shell is temporarily unavailable. Try connecting in a few minutes".

What the url you trying to access ?
If '&cloudshell=true' is missing, try to add it at the end of the url and try again, let me know if it works.

Related

How to investigate errors in Firebase Remote Config API?

I see errors for the Firebase Remote Config API in the Google Cloud Console > API/Service Details metrics.
Looking at "Traffic by response code" I see that a specific API key is causing HTTP code 400 responses from the API for the method:
google.firebase.remoteconfig.v1.RemoteConfigService.FetchRemoteConfig
I'm not able to reproduce this issue locally so how can I find out more about these errors in the Google Cloud Console?
What I've checked so far:
The credential that is causing the errors is restricted to the correct package name and SHA-1 hash (hash taken from Google Play Console > App Integrity)
It's apparently not hitting a quota limit from looking at the quote graph
From the client side logs I only see the exception:
com.google.firebase.remoteconfig.g: The client had an error while calling the backend!
This is a standard error message used in the Remote Config SDK for a client error (ex: a connection timeout, SSL issue, etc.). I suggest that you double check your implementation. You could also use the Android network debugger to simulate the network calls, so it could create a handling mechanism to ensure that the actual device has a proper connectivity on doing the fetch.
You may also refer to the Stackoverflow post and the GitHub Link.
Google Developer Support pointed me to a known bug in the Firebase Remote Config library which has been fixed recently. Upgrading the library indeed fixed the issue.

Get rid of annoying logs by Firebase function "this may be a production service" & "External network resource requested"

When running a Firebase function, my logs are very noisy mostly because of those 2 messages
Be careful, this may be a production service.
⚠ External network resource requested!
I know I am running a production service, and yes I am requesting an external ressource 😅 can I disable them?
Thanks
Normally using --quiet would silence this message, however because there are so many emulators, the Firebase team couldn't reach a consensus on whether to allow this to be silenced when used with firebase emulators:start (see firebase-tools Issue #2859).
The official stance on this is to set the logs filter to only show "user" logs using the Emulator Suite UI's Logs Viewer and let the regular log feed log everything.

Error: Failed to get Firebase project project-name. Please make sure the project exists and your account has permission to access it

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.

Streaming Firebase Function logs to a local terminal

Streaming Firebase Function logs to a local terminal would be very helpful since the Firebase Console web interface for logs is pretty sluggish to work with.
Does any one know a way to achieve this?
Using the Firebase CLI, according to the documentation, run the command:
firebase functions:log
This gives you a dump of recent logs, but it doesn't "stream" them to your terminal. Unfortunately, this is the best you can do.
If you're a gcloud user, there are equivalent commands, as described in its documentation. There is also no option to stream the logs live with gcloud.
If you want a "live" view of logs of your deployed functions, you're going to have to use the Firebase or Google Cloud console.
If you're doing active development and need the logs for code you've just written, it might be easier to use the Firebase emulator suite to run functions locally, so you can see logs appear live in the terminal where the emulator is running.

Google Auth giving "Request had insufficient authentication scopes" error while trying to run Google Script

I am trying to run my Google Script from within a cloud function from Firebase. When I run it, Google Auth is return an error saying Request had insufficient authentication scopes. I'm using the example from Google Quickstart found here: Google Apps Script Quickstart. My scope found in my token.json file is https://www.googleapis.com/auth/script.projects Is there something else I need to include just to run my simple script? Thanks in advance.

Resources