Firebase Storage Can't Connect, Retry again - firebase-storage

I imported an old project into Firebase when I joined.
On the https://console.firebase.google.com/project/project-name/overview page, when I try to grab the code snippet to initialize my Firebase, the storage bucket shows up with empty URL.
Today, I started a new project, this time, using the Firebase console. After creating the project, the StorageBucket URL showed up in the initialization code snippet automatically.
When I check both project's storage rules, I see the URL pointing to the right places, however, the imported project gives this error under the Storage > Files tab:
It has been like this since day one I imported the project.
When I went to https://console.cloud.google.com/storage/browser to see if the new project I created would show, it did.
Are there any extra steps on my part to get the storage bucket URL to show for the imported project?

Who's this answer for?
If you imported your project into Firebase and having the above issue specifically with your Firebase Storage.
After back and forth with Firebase Support, if you're facing similar problems as mine, here's the approach you can try. I'm trying to replay the conversation and steps given by the Firebase Support
Make sure that you are the owner of the project you are accessing.
If you have multiple Google accounts signed in, Firebase Database can't
seem to connect to the server. Sign into incognito mode
Check in your API Manager if the following are enabled
a) App Engine admin API
b) Firebase Rules API
c) Google Cloud Storage
Check if you have an App Engine app is enabled https://console.developers.google.com/project/_/appengine
Go to Firebase Storage AppManager tab
https://console.cloud.google.com/storage/
a) Add the service account firebase-storage#system.gserviceaccount.com as an owner on the storage bucket: .appspot.com.
b) Additionally, you need to edit the "object default permissions" to allow for similar access.
Now, if you have all the above in place, next step is this:
Add new Server Credentials
In credentials page, ( https://console.developers.google.com/apis/credentials ),
click Create credentials, select API key
Select server key
Put name as "Server key (auto created by Google Service)"
At the time of writing this, creating the Server Key was what got it to work.
A few words:
The issue of not able to use Firebase properly when two accounts are logged in the same browser doesn't plague me anymore. Logged into two accounts, and both Firebase projects are up and running without any issue.

I fixed mine by using the command to work on it using
firebase init storage
This would create the storage after that it would add a storage.rule in which you can update to your liking in your project .
Then you run this command
firebase deploy --only storage
This would initialize the Storage
If you are still having issues check out this link https://stackoverflow.com/a/74750337 which was also provided by firebase for me to fix the error
This is how i fixed mine

Related

Creating Google Cloud project loads indefinitely

I can't create a project at all.
I click Create Project and it loads indefinitely, never creating a project.
There is no error, there is nothing.
All I want is a Google Maps API Key for a college project.
I signed into my Google Account, went to https://console.cloud.google.com/ to try and generate an API Key.
In order to generate an API Key I need to create a project, which I can't do.
I have seen these issues: Unable to Create Google Cloud Console Project
How to Create a Project in Google Developers Console
So I went to https://admin.google.com and I signed in with my Google Account, which resulted in the following:
Here I click on Add account, I enter my Google Account credentials again and it gives me the same page asking me to Choose an account -> Add account. No matter how many times I log in with my Google Account I always end up in the same place.
How can I create a Google Console Cloud project ?

"DatastoreException: Missing or insufficient permissions" on superseded Cloud Datastore

We have an older application based on the AppEngine SDK (now deprecated) and the superseded Cloud Datastore.
In the process of migrating to Google Cloud SDK we also decided to move from JPA/Datanucleus to Objectify.
Given that the Cloud Datastore will be automatically upgraded to Cloud Firestore in Datastore mode sometime in the future, we decided to test our application as described at the bottom of this page:
https://cloud.google.com/datastore/docs/upgrade-to-firestore#testing_an_existing_application
1) Create a new project. In this project, create a Cloud Firestore in Datastore mode database.
2) Using the managed export service, export some of your application's data to Cloud Storage.
3) Using the managed import service, import your application's data to your new project.
4) Copy app logic you want to test to the new project or simulate app behaviour against the new project.
That's what we did and after some issues we could make a portion of our application run fine with the new datastore in a separate test project.
Now to the actual issue...
We wanted to test if the updated application could also run with the superseded Cloud Datastore, so we won't have to worry when the automatic upgrade occurs (as our app will be already ready).
So we deployed it as a new version of the existing AppEngine project (v2-dot-.....): unfortunately running the new version throws a permission error as soon as the app tries to read the datastore:
com.google.cloud.datastore.DatastoreException: Missing or insufficient permissions
So the questions are:
- could this be related to the Cloud Datastore not being upgraded to Cloud Firestore in Datastore mode for our project yet?
- is there anything we can do (add specific permissions maybe) to make it work anyway?
Our concern is that we need to have the new version of the app deployed before July 2020 (that's when the older AppEngine SDK will stop working), and we are worried that the automatic upgrade of the datastore will occur later.
Thank you for your help.
Turned out our project doesn't have the PROJECT_ID#appspot.gserviceaccount.com member in IAM.
It has a pletora of other members (for example: PROJECT_NUMBER-compute#developer.gserviceaccount.com, PROJECT_NUMBER#cloudservices.gserviceaccount.com, service-PROJECT_NUMBER#compute-system.iam.gserviceaccount.com, etc) which I guess are legacy members used in previous versions of Google App Engine.
Adding PROJECT_ID#appspot.gserviceaccount.com with the role Editor fixed the issue: now the new version can be deployed to the old projects and it works fine even if the datastore has not yet been converted to Cloud Firestore in Datastore Mode.
I just ran into this issue and spent way too much time troubleshooting it. Nine times out of ten if you're running into this issue it's because the default App Engine service account doesn't have permission to edit Cloud Datastore. The default App Engine service account is used by default if you're doing a simple gcloud app deploy and nothing else fancy. I solved the problem by giving the default App Engine service account the roles/datastore.owner role with the following:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:PROJECT_ID#appspot.gserviceaccount.com" \
--role="roles/datastore.owner"

Adding Existing SAPUI5 Applications in HANA Cloud Portal site

I am new to HANA Cloud portal. I have created a standalone SAPUI5 Application following the below steps:
SAP HANA Cloud Platform
I have not set any destinations since I am using dummy data for now. The app works fine standalone but when I add it to a site in the HANA cloud portal the application fails with the error "could not open App.Try again Later". I have followed the below steps. Please let me know if I have missed put anything:-
1) Created a site from the site directory screen with a blank site temppplate.
2) Next I selected the app I want to add into the site from the account apps section in the left navigation inside the flpportal service and added it[using the forward icon].
3) Then when I try to add it as a menu configuration it shows up in the list and gets added but when I publish the site I get the above error mentioned.
Am I missing any step or doing it wrong altogether? BTW I am using a HANA trial account for now.
Also, I would like to know whether this is the correct way to do it. Also, any documentation on the same will be helpful
Adding the error description. The name of the app is Kpidemo:

Error 403: Project blocked; abuse detected., accessNotConfigured

I have a golang program running on my local laptop. I had a previous Google Cloud account that I used to upload images to a bucket (using gcloud local context). It worked.
I created another company branded Google Cloud account and linked our company card to it.
Ever since then I get the error in the title.
I contacted support and got this:
Hi,
Unfortunately we are not able to identify any abuse related actions taken on your project. To resolve this issue, please reach out to the Google Cloud Platform community support.
Sincerely,
Google Cloud Platform/API Trust & Safety Team
Do you guys have any ideas? Any help would be much appreciated.
The problem turned out to be that the JWT json file being used by my project for authentication was out-of-date.
I had to re-download a new JWT json file from the cloud console and put it in the root of my project folder.

Can not create bucket "The account for the specified project has been disabled."

I have an old GAE application (in production since 2011) that use Cloud Storage service since it is available in beta. I have not touched this apps for almost 1 year now.
I have to do some administrative task and want to create new buckets in Cloud Storage.
I have activated
- the application in Google Cloud Console
- the billing for this application in Google Cloud Console
I see the Google Cloud Storage tab, when I click on it it is empty, and when I try to create a new bucket I see the error message:
The account for the specified project has been disabled.
How can I fix that?
Why I do not see my existing bucket? (created long time ago using the old Web interface)
Thanks!
This can happen when the Cloud Storage service isn't turned on for your project. Do the following:
Visit http://cloud.google.com/console
Select your project
Visit the APIs & Auth tab
Find Google Cloud Storage in the list of services
Turn on Google Cloud Storage
I was facing the same issue .While every API was enabled after deep diving i realized there is some problem relating to my billing.