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

156
Views
What's wrong with my code? My React Native App crashes on calling firestore without any log

Here's my implementation, I'm storing the baseURL on my firestore database. I used to sign in anonymously in order to get the url. But on calling the firestore, my app crashes without any error, warning, etc.

import {create} from 'apisauce';
import auth from '@react-native-firebase/auth';
import firestore, {firebase} from '@react-native-firebase/firestore';

const apiClient = create({
  method: 'POST',
});

apiClient.addAsyncRequestTransform(async request => {
  await auth()
    .signInAnonymously()
    .then(() => {
      console.log('success');
    })
    .catch(error => {
      console.log(error);
    });
  const url = await firestore()
    .collection('service_url')
    .doc('service_url')
    .get()
    .then(document => console.log(document.data))
    .catch(error => console.log(error));
  console.log(url);
  request.baseURL = url;
  auth().signOut();
});

export default apiClient;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The problem I faced was the okHTTP. It was not working with Android API 30. So, after so much workaround, I added the okhttp dependency to my project. That solved my error.

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!