-
Notifications
You must be signed in to change notification settings - Fork 152
Cloud function - Cannot read property 'Symbol(Symbol.iterator)' of undefined at convertValue #103
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
Comments
@udox-cameron Do you know if your Firestore document may contain an empty array? If you can reproduce this, do you mind grabbing the contents of the And just to verify, the Firestore dependency you are using is 0.10.x? If you have a package-lock.json or yarn.lock, you might see an older version. |
@schmidt-sebastian I am getting the exact same error. The document that triggers the function that fails with the error looks as follows:
Firestore version used is |
I was just able to reproduce this. It looks like for empty arrays, ProtobufJS doesn't always return the array type. Thanks for your patience. |
@schmidt-sebastian Great! Do you have a rough idea of the time it will take to see a public release that fixes the issue? |
Hey, I can't print out the error because I just get the error above. Here is the data it is working with.
|
The releases for 0.10.2 and 0.11.1 contain fixes for this issue. Note that the cache on Google Cloud Functions currently still resolves firebase-admin's Firestore dependency to 0.10.1. I will notify this thread when that is no longer the case. |
If you redeploy your Functions, you should now be able to get the newest copy from the cache and no longer see this error. |
Fantastic. Thank you!
Le lun. 15 janv. 2018 à 03:58, Sebastian Schmidt <[email protected]>
a écrit :
… Note that if you redeploy your Functions, you should now be able to get
the newest copy from the cache and no longer see this error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH3gnkvCiCIMSRJgc1iDmLmwhaw9Basks5tKr7HgaJpZM4RanOa>
.
|
@schmidt-sebastian Erf, I have updated the dependencies as follows:
It seems that GRPC 1.8.0 is fetched. As a consequence, a lot of functions fail with the famous |
@schmidt-sebastian Reverting to firebase-admin 5.5.1 and firebase-functions 0.7.5 still fetches the new dependency! Is there a way to force the old dependency so that GRPC is not fetched? that's a big issue since it breaks all our functions at this time. |
Do you see this locally or on functions? These are the results I get:
|
@schmidt-sebastian Ah sorry, the issue seems due to firebase 4.8.2 that is also used in my setup:
I will try to downgrade to an older version. Do you know a compatible one? |
The dependency tree is from my local setup. The error is with deployed functions :S |
Using firebase @schmidt-sebastian Do you think it's worth opening an issue on firebase-js-sdk? |
I will get this resolved internally. |
Hey guys,
My cloud firestone function are getting the following error whenever they are triggered, I have seen some people are getting similar error on here and the fix was to upgrade the cloud function library. Unfortunately I have upgraded to version 0.8.0 and still get the following error.
package.json
TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at convertValue (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/convert.js:182:44) at convertDocument (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/convert.js:226:22) at Firestore.snapshot_ (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/index.js:376:11) at dataConstructor (/user_code/node_modules/firebase-functions/lib/providers/firestore.js:100:38) at Object. (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:57:31) at next (native) at /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71 at __awaiter (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:24:12) at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:53:36) at /var/tmp/worker/worker.js:695:26
Thanks,
Cameron
The text was updated successfully, but these errors were encountered: