Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase code 400 "message": "CONFIGURATION_NOT_FOUND"

I am currently trying to create a DB on Firebase and I am getting the following error:

{"error":{"code":400,"message":"CONFIGURATION_NOT_FOUND","errors":[{"message":"CONFIGURATION_NOT_FOUND","domain":"global","reason":"invalid"}]}}

I know this is sensible but my code for setting up the database is the following:

<script src="https://www.gstatic.com/firebasejs/8.3.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.3.1/firebase-firestore.js"></script>

<script>
    // Your web app's Firebase configuration
    // For Firebase JS SDK v7.20.0 and later, measurementId is optional
    var firebaseConfig = {
        apiKey: "AIzaSyAI6HD2Fa35nSL3wqT1u98TgdykPoU1Vvc",
        authDomain: "todo-ca9f2.firebaseapp.com",
        databaseURL: "https://todo-ca9f2-default-rtdb.firebaseio.com/",
        projectId: "todo-ca9f2",
        storageBucket: "todo-ca9f2.appspot.com",
        messagingSenderId: "787961698428",
        appId: "1:787961698428:web:c2af07085cdd3c9ab491f9",
        measurementId: "G-SGPXZS4XET"
    };
    // Initialize Firebase
    firebase.initializeApp(firebaseConfig);
    
    
    const auth = firebase.auth();
    const db = firebase.firestore();

    //firebase.analytics();
</script>
    <script src="app.js"></script>

I am invoking Firebase in code on the image: enter image description here

like image 675
Emilio CA Avatar asked Dec 06 '22 08:12

Emilio CA


2 Answers

Error 400 is related to the client-side.

Your code should work correctly so most likely the issue is that you have not yet enabled the Sign-in method under Authentication in firebase console.

like image 152
Oush Avatar answered Dec 23 '22 08:12

Oush


Go to the firebase console, navigate to authentication and enable Email/Password. It should work just fine.

like image 29
Sonia Uduma Avatar answered Dec 23 '22 10:12

Sonia Uduma