You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using google datastore API and if I run my application from my local computer then the application connects to the datastore, but if I deploy the application it cannot connect to the datastore.
Environment details
OS: Debian GNU/Linux 8
Node.js version: 6.9.4
npm version: shipped with Node.js 6.9.4
@google-cloud/datastore: 0.6.1
Steps to reproduce
I ran the following example on AppEngine instance:
@jmdobry I'm spinning my wheels a bit trying to get an app running on GAE-- are you able to try deploying a sample Datastore app to GAE to see if you can reproduce these errors?
Error 1: GCLOUD_PROJECT not being set by GAE
Error 2: Hanging after an API request as described above (a runQuery or a get)
Note when running on Google App Engine flexible environment you should instantiate the Cloud Datastore client library without passing in projectId or keyFilename (with the exception of some advanced use cases).
We suspect that this is due to a recent change in [email protected] not dealing properly with the lack of /etc/services. We are working on an updated version of the Node.js docker image with a work-around that should be available in a few hours.
Could folks try deploying again (in a few hours) with the latest runtime image to see if the problem gets resolved?
I added the "netbase" patch to my package.json as a workaround to regain access to datastore from express server. The workaround was suggested here (#1946)
Activity
just1689 commentedon Feb 2, 2017
+1
stephenplusplus commentedon Feb 2, 2017
Please try upgrading to the latest version of
google-cloudor@google-cloud/datastore.goshoo commentedon Feb 2, 2017
Hi stephenplusplus,
I use the latest version of @google-cloud/datastore - 0.6.1
just1689 commentedon Feb 2, 2017
+1 again
stephenplusplus commentedon Feb 2, 2017
Sorry, I forgot to publish to npm. Please try
@google-cloud/[email protected].Muesly commentedon Feb 2, 2017
I'm getting the same issue, and I've tried 0.7.0 too. Any idea how to resolve this, or the last working version?
stephenplusplus commentedon Feb 2, 2017
To everybody: Do you get an error? How are you authenticating?
Muesly commentedon Feb 3, 2017
Hi,
Hope this helps
It doesn't return with an err or result. I don't authenticate at any point. As this is server code I wasn't expecting to need to?
Muesly commentedon Feb 3, 2017
I'm running this through App Engine. I tried to remove the projectId as advised if running inside Google Cloud. https://www.npmjs.com/package/@google-cloud/datastore
However, then it did call the callback with the error "Error: Sorry, we cannot connect to Google Cloud Services without a project ID. You may specify one with an environment variable named "GCLOUD_PROJECT". See https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/authentication for a detailed guide on creating an authenticated connectio..."
I then added the GCLOUD_PROJECT variable and I have the same problem as before.
stephenplusplus commentedon Feb 3, 2017
@jmdobry I'm spinning my wheels a bit trying to get an app running on GAE-- are you able to try deploying a sample Datastore app to GAE to see if you can reproduce these errors?
Error 1:
GCLOUD_PROJECTnot being set by GAEError 2: Hanging after an API request as described above (a
runQueryor aget)jmdobry commentedon Feb 3, 2017
To debug I need from y'all:
app.yamlfilegcloud --versionNote when running on Google App Engine flexible environment you should instantiate the Cloud Datastore client library without passing in
projectIdorkeyFilename(with the exception of some advanced use cases).jmdobry commentedon Feb 3, 2017
Also need to know if you have a
yarn.lockfile or not.Muesly commentedon Feb 3, 2017
Output of gcloud --version:
Google Cloud SDK 141.0.0
app-engine-python 1.9.49
app-engine-python-extras 1.9.49
beta 2016.01.12
bq 2.0.24
bq-nix 2.0.24
core 2017.01.20
core-nix 2016.11.07
gcloud
gsutil 4.22
gsutil-nix 4.18
7 remaining items
LeoIsCoding commentedon Feb 6, 2017
My node server (that exhibits the same issue) is running in the Flexible Environment (GCE based).
Muesly commentedon Feb 6, 2017
I've tried updating to Node 6.9.5 but it made no difference unfortunately
one20 commentedon Feb 6, 2017
I ran into this issue, was using app engine (flex+nodejs). Problem seems to be the google nodejs docker file, I created my own custom docker (https://nodejs.org/en/docs/guides/nodejs-docker-webapp/) and my app was able to connect to datastore from app engine.
EDIT:
I was running Node 7.4.0, google-cloud 0.46.1. Combo had the same symptoms as mentioned by others, until I decided to use a custom runtime.
ofrobots commentedon Feb 7, 2017
We suspect that this is due to a recent change in
[email protected]not dealing properly with the lack of/etc/services. We are working on an updated version of the Node.js docker image with a work-around that should be available in a few hours.Could folks try deploying again (in a few hours) with the latest runtime image to see if the problem gets resolved?
just1689 commentedon Feb 7, 2017
LeoIsCoding commentedon Feb 7, 2017
I added the "netbase" patch to my package.json as a workaround to regain access to datastore from express server. The workaround was suggested here (#1946)
murgatroid99 commentedon Feb 8, 2017
[email protected] has been published, and it should not have this failure.
stephenplusplus commentedon Feb 8, 2017
Just released
google-cloudversion0.46.2-- anyone willing to test, please update and let us know how it went.just1689 commentedon Feb 9, 2017
It's working! It's alive!
Thanks everyone!
Muesly commentedon Feb 9, 2017
I'd be happy to test, but I only import the datastore specifically so would need to wait until you released 0.7.1 of @google-cloud/datastore
stephenplusplus commentedon Feb 9, 2017
The sub-modules will automatically include the fix if you un- and re-install them.
Muesly commentedon Feb 9, 2017
Thanks - looks to work now :)
stephenplusplus commentedon Feb 9, 2017
Great, thanks for the patience and the help, everyone! If anyone is still having issues after a hard upgrade, let us know.