google-cloudI am able to fetch the records but those values are displaying as "undefined".
Example code:
const datastore = require('@google-cloud/datastore')({
projectId: '<project_id>',
keyFilename: '<json_credentials_path>'
});
var query = datastore.createQuery('Tasks');
datastore.runQuery(query, function(err, entities) {
console.log(entities)
});
Output:
[ { name: undefined }, { name: undefined, some: undefined } ]
Can you try a full insert and query routine?
@stephenplusplus I didn't get you?
Sorry! I mean can you write some code that inserts one entity and then you query for it directly after to verify it inserts and reads successfully?
Data insertion works perfectly.
I am having the same problem. This was working last night and now this morning it does not work. There was no code change.
@pcostell @lukesneeringer aware of any service changes or outages?
I'm having the same problem. I tried running the same simple test query using the python client library and it worked correctly. I also tried making a cloud function (using the Node.js library of course) and I got the same problem, values returned undefined.
Interestingly - I get the correct number of entities. If three should be returned, three are returned, but in all cases, the actual values are undefined. The property names are there, but not the values.
I can see the correct data in the web console, and the fact that the python library works shows that it's not a service outage.
I'll look through the repo to see if anything changed with the Node.js client library recently.
I ran into this this morning also. Reverting to an old version of the umbrella package fixed things ("google-cloud": "^0.45.2",)
Early debugging indicates grpc @ 1.3.0 (released last night) is the issue. I will release a quick fix that downgrades it to the last known working version while we figure out the underlying cause. I'll update when that's ready.
Okay, if you do a fresh npm cache clean && npm install --save @google-cloud/datastore, things should work properly.
Confirmed, working for me now, thanks for the help.
I've opened #2267 to address the issues with upgrading to the new gRPC release. This issue can be considered resolved for now, as all new installations of modules that use gRPC will get the last-known working version. Sorry for the trouble everyone, and thanks (from me and the other users who never had to discover this bug on their own) for reporting quickly.
Thanks @stephenplusplus
Most helpful comment
Confirmed, working for me now, thanks for the help.