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

239
Views
firestore/permission-denied error with Firestore query immediately after signInAnonymously completes successfully

i'm trying to get/write and update data in firestore in react native (0.66.3), Showing error

[Error: [firestore/permission-denied] The caller does not have permission to execute the specified operation.]

DB

i update rules also

rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
 match /{document=**} {
  allow read, write: if request.auth != null;
  }
 }
}

App code

import React from 'react';
import { Text, View, TouchableOpacity } from 'react-native';

import firestore from '@react-native-firebase/firestore';
import auth from '@react-native-firebase/auth';


export default function App() {
  async function addTodo() {
    await auth().signInAnonymously().then((res)=> {
      console.log(auth().currentUser.uid);
      return firestore().collection('document').get();
    }).catch((err)=>{
      console.log(err);
    }); 
  }
 
  return (
    <View>
      <TouchableOpacity onPress={() => addTodo()} style={{padding:50}}>
        <Text>Test </Text>
      </TouchableOpacity>
    </View>
  );
}

Output enter image description here

about 4 years ago · Juan Pablo Isaza
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!