Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
firebase + next dont save data in realtime database

Hello i have big problem, the firebase realtime database dont save data for example

const createUserProfile = (email,user,username) => {
    console.log(email);
    console.log(user)
    const db = getDatabase();
    console.log(db)
    const dbRef = ref(db, 'users/' + user.uid);
    set(dbRef, {
      username,
      email,
      createDate: getDate()
    });
  };

In realtime conf i have write true and read true what i can do? its next js all data is okay, console.log(db) response is enter image description here

and realtime database dont update

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is probably because you are not passing the Firebase app instance to the getDatabase() method.

See here in the document you need to do

 import { initializeApp } from "firebase/app"; import { getDatabase } from "firebase/database"; // TODO: Replace the following with your app's Firebase project configuration // See: https://firebase.google.com/docs/web/learn-more#config-object const firebaseConfig = { // ... // The value of `databaseURL` depends on the location of the database databaseURL: "https://DATABASE_NAME.firebaseio.com", }; // Initialize Firebase const app = initializeApp(firebaseConfig); // Initialize Realtime Database and get a reference to the service const database = getDatabase(app);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!