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

194
Views
Error: firebase.firestore().collection().doc(*) 'documentPath' must point to a document in React Native

When I am trying to update my document in firebase I got an error like my topic. After I upload my image to firebase storage and I need to update the download link to my Users collection.(I used Redux-Saga for this process)

export function* uploadProfile(action) {
    console.log(action);
    const filePath = action.data.filePath;
    const fileName = action.data.fileName;
    const userID = action.data.userID;
    try {
        const uploadProfile = yield call(uploadFileFireBase, filePath, fileName)
        if (uploadProfile) {
            try {
                const updateProfile = yield call(updateUserFirebase, userID, uploadProfile)
               
                if (updateProfile) {

                }
            } catch (error) {
                console.log(error)
            }
        }
    } catch (error) {
        console.log(error)
    }
}


async function uploadFileFireBase(filePath, fileName) {
    const reference = storage().ref(fileName);
    await reference.putFile(filePath.toString());
    // console.log("Download URL:" + url)
    return await storage().ref(fileName).getDownloadURL();
}


/*
Update User Data
*/

function updateUserFirebase(uploadProfile, userID) {
    return firestore()
        .collection('Users')
        .doc(userID)
        .update({
            profileImage: uploadProfile,
        })
        .then((data) => {
            console.log('User updated!');
            return data;
        });
}

I spent hours and hours trying to make this write and I couldn't. So I really really need your help with this university project. Thank you very much for your time.❤️❤️

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!