Skip to content
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

Got error with updateDocument #139

Open
thuctien opened this issue Aug 24, 2022 · 1 comment
Open

Got error with updateDocument #139

thuctien opened this issue Aug 24, 2022 · 1 comment
Labels
non-library Issues not related to the library. question

Comments

@thuctien
Copy link

Assume that I have an object myObj= {'#1':'value'}
I get no matter when create document with data is myObj: firestore.createDocument('testDocument', myObject)
But it will thrown an error when update document (testDocument is already exist): firestore.updateDocument('testDocument', myObj, true).
I think the error come from letter '#'. I tried to replace '#' with other like '$', ?'... and there is no more error.
The error is:
Error: Invalid property path "". Unquoted property paths must match regex ([a-zA-Z_][a-zA-Z_0-9]*), and quoted property paths must match regex ((?:[^\]|(?:\.))+) checkForError @ Request.gs:135 method_ @ Request.gs:50 patch @ Request.gs:108 updateDocument_ @ FirestoreWrite.gs:47 updateDocument @ Firestore.gs:95

@thuctien thuctien added the bug label Aug 24, 2022
@LaughDonor LaughDonor added question non-library Issues not related to the library. and removed bug labels Aug 24, 2022
@LaughDonor
Copy link
Collaborator

@thuctien, that error is coming from Firestore API, not from this library. You can check Firestore Documentation here: https://firebase.google.com/docs/firestore/quotas.

If you scroll down, you'll see the constraints on field names (such as #1 you have in your example)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-library Issues not related to the library. question
Projects
None yet
Development

No branches or pull requests

2 participants