firebase / firebase-js-sdk

Firebase Javascript SDK
https://firebase.google.com/docs/web/setup
Other
4.85k stars 893 forks source link

TypeError:undefined is not an object(evaluating app.options[DATABASE_URL_OPTION]) #3103

Closed Utkarsh0911 closed 4 years ago

Utkarsh0911 commented 4 years ago

import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { TextInput } from 'react-native-paper';

import { Button } from 'react-native-paper';

import * as firebase from 'firebase'

if(!firebase.apps.length) { firebase.initializeApp({

apiKey: "AIzaSyBhubAskVqctSJBd75pwZ4u0F7RDfgHro8",
authDomain: "fir-rn-b2fe7.firebaseapp.com",
databaseURL: "https://fir-rn-b2fe7.firebaseio.com",
projectId: "fir-rn-b2fe7",
storageBucket: "fir-rn-b2fe7.appspot.com",
messagingSenderId: "170277258199",
appId: "1:170277258199:web:cfa91284465dd9772d4192",
measurementId: "G-KP2Z2ZC9ZW"

}) } export default function App() {

console.log("hello") state={ text:'' } return (

this.setState({ text })} />

); }

const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });

google-oss-bot commented 4 years ago

I found a few problems with this issue:

Feiyang1 commented 4 years ago

Your initialization code and the config file look fine to me, but I'm not sure if that is the problem you are referring to because you just pasted code without any instruction. For us to help you debug, can you please provides more detail, e.g. where the error occurs in your code, what you are trying to do before the error occurs ,etc..

google-oss-bot commented 4 years ago

Hey @utkarsh0911. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 years ago

Hey @utkarsh0911. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@utkarsh0911 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.