Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
Firestore offline cache data not fully synced to cloud

I'm doing around 100 writes to Firestore offline. But after connecting to the internet I see some of my data is missing in the cloud. There are no errors in the writing process though. If I do the same thing online, all the data is synced to the cloud.

Below is the code I'm trying in offline mode. Each function has around 10 iterates. There are 10 functions running one after the other.

const updateCities = async (cities) => {
  for (const city of cities) {
    try {
      const firebaseCity = await firestore().collection('cities').doc(city.id).get();
      await firebaseCity.update(city);
    } catch (error) {
      console.log(error);    
    }
  }
}

const updateUsers = async (users) => {
  for (const user of users) {
    try {
      const firebaseUser = await firestore().collection('users').doc(user.id).get();
      await firebaseUser.update(user);
    } catch (error) {
      console.log(error);    
    }
  }
}

Are there any limitations in the firebase functionalities or I'm doing something wrong?

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda