Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatabaseURL not present in firebase config for web app #4211

Closed
harshshinde07 opened this issue Dec 15, 2020 · 4 comments
Closed

DatabaseURL not present in firebase config for web app #4211

harshshinde07 opened this issue Dec 15, 2020 · 4 comments

Comments

@harshshinde07
Copy link

[REQUIRED] Describe your environment

  • Operating System version: Windows 10
  • Browser version: Google Chrome Version 87.0.4280.88
  • Firebase SDK version: _____
  • Firebase Product: database

[REQUIRED] Describe the problem

Database URL is not provided when creating a new Firebase project from console

Steps to reproduce:

Create a new Firebase project and Add Firebase to your web app.
The firebase config created does not have databaseUrl parameter

Screenshot:

firebase

@hsubox76
Copy link
Contributor

I believe you shouldn't need one: #3650 (comment)

But I tried creating a test project and although it didn't initially show up in the config, after I went to the Realtime Database tab and clicked to create a database, the databaseURL property showed up in my web app config in the console.

@davidstackio
Copy link

davidstackio commented Dec 15, 2020

I noticed this too today. This change doesn't seem to be documented anywhere except here on GitHub. This is a minor problem for me since I'm using CloudBuild environment variables, and my code expects a value for the databseURL. That said, I don't use the realtime database (only Firestore), so I just left the databseURL property as an empty string and that seems to work. I'll have to refactor my code to remove this value as expected since I'm not using it anyway.

EDIT: As @hsubox76 described, when I created a Realtime Database, the databseURL property showed up in my web app config in the console. So I think this is reasonable behavior.

@harshshinde07
Copy link
Author

harshshinde07 commented Dec 16, 2020

Hi, leaving the databaseUrl property empty doesn't work for me. I'm using 8.2.0 version of the firebase. Following is the error text:

@firebase/database: FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com 

EDIT:
As @hsubox76 suggested, I tried creating a realtime database and copying the URL from there. It seems to work but isn't able to retrieve previous data that is present in firestore.

Thanks.

@katowulf
Copy link

katowulf commented Dec 16, 2020

Realtime database is not Firestore. You can't retrieve data in Firestore using a Realtime Database URL.

This repo if for reporting SDK bugs related to the JavaScript SDK, not a support forum for topics outside of the SDK, such as usage of the console. Please reach out to support if you need help.

@firebase firebase locked as off-topic and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants