-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] 🔥 Unable to Create Document - this._firestore.native.documentSet is not a function (it is undefined) #8196
Comments
I have since created a simple button to test this issue within my protected routes. This is getting the same error message:
|
looks like the sort of error I would expect if I added the firestore module in package.json but didn't properly build it in to the app that was actually running on the device under test |
I won't argue with you. However, how is that supposed to happen? There's no expo plugin included for firestore.... therefore no build process for an expo development build. I have ran all typical expo build steps by running |
firestore doesn't need a plugin, if you've added it in package.json and done the prebuild magic that should work. If you just make a vanilla react-native project with (not saying "hey avoid Expo", just saying "let's localize the problem to something about the Expo build by proving it can work somehow / some way) |
@mikehardy I agree that it should work but you also stated there's a potential build step causing this issue. I've looked over the docs 5x and I don't see anything missed here. Also, have you seen the RN-CLI react-native-firebase getting started steps? It's not a trivial task to setup just to make sure it's possible. I'm also not sure that would help in any way other than "proving that it can work." Any other more targeted ideas? Especially considering even react-native no longer recommends using their CLI version?? |
No |
Alright so there are some build steps that expo performs depending on how each platform is ran. The needed build steps for this library to work will not work if running After a development build is specified/created in order for Apologies for the confusion, it seems expo does not fully run a development build when running |
Interesting - if there is any spot in the docs where this info would be useful there is an edit link at the top right of every page on rnfirebase.io and the web UI on github for docs PRs only takes a couple minutes. I'd be happy to merge any guidance that gets people through the process in a painless way - acquiring this knowledge sounds like unneeded suffering to me, but it's pretty subtle |
Thanks Mike! I will definitely submit something when I get back from vacation. I appreciate your help. |
Issue
I have a fresh Expo project and have gone through all development steps listed in the getting started guide.
I'm trying to create a user document as soon as a user account is created via the
auth
module. However, when I do so I'm getting an error stating:undefined this._firestore.native.documentSet is not a function (it is undefined)
I'm simply calling the
add
method on theCollectionReference
returned and submitting user data. I'm able to successfully create the user account, but the firestore method to create a doc is failing.app.json snippet
Describe your issue here
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:21.6.1
Firebase
module(s) you're using that has the issue:firestore
TypeScript
?Y 5.3.3
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: