Comments (15)
@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 event
object via JSON.stringify(event)
? Thanks.
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.
from nodejs-firestore.
@schmidt-sebastian I am getting the exact same error. The document that triggers the function that fails with the error looks as follows:
{
"attachments": [
],
"author": {
"email": "x@y",
"fullName": "z",
"jobTitle": "w"
},
"content": {
"html": "<p>Simple post content<\/p>\n",
"htmlEscaped": "<p>Simple post content<\/p>\n",
"markdown": "Simple post content",
"plaintext": "Simple post content"
},
"createdAt": "2018-01-12T14:53:27.097Z",
"draft": false,
"draftLabels": {
"lR7KSMZPgznVJRsd8F0z": 1515768805616
},
"excerpt": "Simple post content",
"forwardToWebhooks": false,
"labels": {
"lR7KSMZPgznVJRsd8F0z": true
},
"orderedLabels": [
"lR7KSMZPgznVJRsd8F0z"
],
"publicationTime": "2018-01-12T14:53:00.001Z",
"slug": "my-title",
"title": "My title",
"tstate": false,
"updatedAt": "2018-01-12T14:53:34.180Z"
}
Firestore version used is 0.10.1
.
from nodejs-firestore.
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.
from nodejs-firestore.
@schmidt-sebastian Great! Do you have a rough idea of the time it will take to see a public release that fixes the issue?
from nodejs-firestore.
Hey,
I can't print out the error because I just get the error above. Here is the data it is working with.
{ "beaconfunctionsgroups":[], beacons":["2fUU4F8"], "campaign":"POS", "gid":"orgkey", "status":"updated", "url":"http://bfred-it.github.io/iphone-inline-video/demo/threejs.html", "visibleTime":"2018-01-12T13:49:00.000Z" }
from nodejs-firestore.
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.
from nodejs-firestore.
If you redeploy your Functions, you should now be able to get the newest copy from the cache and no longer see this error.
from nodejs-firestore.
from nodejs-firestore.
@schmidt-sebastian Erf, I have updated the dependencies as follows:
"firebase-admin": "5.6.0",
"firebase-functions": "^0.8.0",
It seems that GRPC 1.8.0 is fetched. As a consequence, a lot of functions fail with the famous Error: Stream removed
:(
from nodejs-firestore.
@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.
from nodejs-firestore.
Do you see this locally or on functions?
These are the results I get:
functions $ rm package-lock.json
functions $ rm -rf node_modules/
functions $ npm install --save [email protected]
> [email protected] install /Users/mrschmidt/Desktop/node-review-with-fix/functions/node_modules/google-gax/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
[grpc] Success: "/Users/mrschmidt/Desktop/node-review-with-fix/functions/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node" is installed via remote
> [email protected] install /Users/mrschmidt/Desktop/node-review-with-fix/functions/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
[grpc] Success: "/Users/mrschmidt/Desktop/node-review-with-fix/functions/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64/grpc_node.node" is installed via remote
> [email protected] postinstall /Users/mrschmidt/Desktop/node-review-with-fix/functions/node_modules/google-gax/node_modules/protobufjs
> node scripts/postinstall
npm notice created a lockfile as package-lock.json. You should commit this file.
+ [email protected]
added 435 packages in 18.378s
functions $ npm install --save firebase-functions@^0.8.0
+ [email protected]
added 57 packages in 5.373s
functions $ npm list | grep grpc
│ │ ├─┬ @google-cloud/[email protected]
│ │ │ ├── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ ├─┬ [email protected]
from nodejs-firestore.
@schmidt-sebastian Ah sorry, the issue seems due to firebase 4.8.2 that is also used in my setup:
├─┬ [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ └── [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ ├── @firebase/[email protected]
│ │ └─┬ [email protected]
I will try to downgrade to an older version. Do you know a compatible one?
from nodejs-firestore.
The dependency tree is from my local setup. The error is with deployed functions :S
from nodejs-firestore.
Using firebase 4.6.1
is fetching a compatible version of GRPC.
@schmidt-sebastian Do you think it's worth opening an issue on firebase-js-sdk?
from nodejs-firestore.
@schmidt-sebastian Do you think it's worth opening an issue on firebase-js-sdk?
I will get this resolved internally.
from nodejs-firestore.
Related Issues (20)
- Block exposing private keys HOT 3
- Firestore class: getAll() supports field mask failed HOT 1
- Query class: can order by FieldPath.documentId() failed HOT 1
- Aggregation queries: "after each" hook for "no filter, explicit orderBy, document reference cursor" failed
- count queries: "after each" hook for "counts 1 document" failed
- Improve read performance by using stale reads HOT 8
- Setting Firestore databaseId HOT 2
- Client initialization: succeeds for DocumentReference.set() failed HOT 1
- count queries using aggregate api: "after each" hook for "counts with startAt, endAt and offset with DocumentReference cursor" failed
- count queries using aggregate api: "after each" hook for "counts multiple documents with filter" failed
- Aggregation queries: "after each" hook for "performs sum that is negative" failed
- Using document set function, got Error: 5 NOT_FOUND HOT 1
- Improve network latency of `runTransaction()` routine HOT 4
- Aggregation queries: "after each" hook for "performs sum only on numeric fields" failed
- FieldPath only escapes the first `\` and '`', resulting in INVALID_ARGUMENT response HOT 1
- [Firestore] `where` should use a "type safe" approach HOT 1
- Query class: can query by FieldPath.documentId() failed HOT 1
- Firestore Timestamp toMills() not working HOT 1
- Improve TS HOT 1
- When support for range and inequality filters on multiple fields in a single query and support for query explain will be added to the library? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-firestore.