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
{{ message }}
Repository navigation
Project ID required even if running script from Compute Engine #1908
If you are running your app on Google Compute Engine, you won't need to worry about supplying connection configuration options to @google-cloud/datastore— we figure that out for you.
That is not the case.
To reproduce create a google Compute engine instance and run a node.js script without a supplied project ID it will fail.
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 connection.
But I have an environment variable set for GCLOUD_PROJECT=myproject. This was working fine on January 3rd when I last deployed. But it is blocking me from deploying today.
Note that I'm still on "google-cloud": "0.41.2". Will upgrading to the latest solve this or is it a bug in App Engine Flex?
I opened #1918 to fix the broken link in the error message.
139.0.0 (2017/01/11)
Breaking Changes
- (Google App Engine) Flexible deployments now skip files matching `node_modules` and `.git` by default, but no longer skip other hidden files by default. Standard deployments are not changing.
We're using https://github.com/motdotla/dotenv for our ENV variables and we use .env and .env-prod files that were apparently being stripped out of our container by the builder service in 138.0.0.
I tried again with gcloud 139.0.0 and we're able to deploy our app again. Though this doesn't seem like it will resolve the OP's issue unfortunately :(
@HighNoonSolutions I haven't been able to reproduce on GCE. I set up a micro box, installed Node, and tried against both [email protected] and @google-cloud/[email protected].
I must be failing to mimic both of your environments in some way, so please share anything else I can do to reproduce. In general, be sure that you're starting from a clean node_modules directory and un- and then re-install google-cloud or any of the sub-modules you might be using, so you're getting the latest copies.
Getting this with 0.48.0 on App Engine nodejs runtime. var gcloud = require('google-cloud')({ projectId: 'my-project-id-here', keyFilename: './keyfile.json' });
The publish fest is over-- I believe everyone should be covered now if you un- and re-install the latest dependencies that you need. Let us know if there are still any issues.
The code where the error occurs is in the restify upload handler. When there is a GET request /download, the file downloads fine from GCS. The upload handler throws Error: Sorry, we cannot connect to Cloud Services without a project ID. The same upload code works when placed outside the Restify handler though, so I may be missing something very stupid...
Actually, I think that was exactly what I needed to see the problem. We have been iterating over a larger object than I believe we should be. I'm putting a fix through and I think we'll all be happier people after it thanks to you 👍
Activity
stephenplusplus commentedon Jan 8, 2017
Thanks for reporting. Which version of @google-cloud/datastore are you running?
Splaktar commentedon Jan 11, 2017
I'm seeing this today on App Engine Flex.
But I have an environment variable set for
GCLOUD_PROJECT=myproject. This was working fine on January 3rd when I last deployed. But it is blocking me from deploying today.Note that I'm still on
"google-cloud": "0.41.2". Will upgrading to the latest solve this or is it a bug in App Engine Flex?I opened #1918 to fix the broken link in the error message.
Splaktar commentedon Jan 11, 2017
I was on gcloud
138.0.0, but I found this:We're using https://github.com/motdotla/dotenv for our ENV variables and we use
.envand.env-prodfiles that were apparently being stripped out of our container by the builder service in 138.0.0.I tried again with gcloud 139.0.0 and we're able to deploy our app again. Though this doesn't seem like it will resolve the OP's issue unfortunately :(
michaelfreund commentedon Jan 25, 2017
This also happens on non app or compute engine environments with >= 0.45.1. Downgrading to 0.45.0 resolves the issue.
@stephenplusplus any ideas?
stephenplusplus commentedon Jan 25, 2017
Looking into now, sorry for the delay!
stephenplusplus commentedon Jan 25, 2017
@HighNoonSolutions I haven't been able to reproduce on GCE. I set up a micro box, installed Node, and tried against both
[email protected]and@google-cloud/[email protected].@michaelfreund Using
[email protected]locally (non-GAE or GCE) didn't throw for me.I must be failing to mimic both of your environments in some way, so please share anything else I can do to reproduce. In general, be sure that you're starting from a clean node_modules directory and un- and then re-install
google-cloudor any of the sub-modules you might be using, so you're getting the latest copies.michaelfreund commentedon Jan 27, 2017
@stephenplusplus completely removed and reinstalled node modules. I still get the same error. If I output the error message from https://github.com/GoogleCloudPlatform/google-cloud-node/blob/b1c6b210106bb064b0662173e2dbcd41ad211f89/packages/common/src/util.js#L355 I can see a
Maximum call stack size exceededrunning on node v6.9.2.Taking a look at https://github.com/GoogleCloudPlatform/google-cloud-node/blob/b1c6b210106bb064b0662173e2dbcd41ad211f89/packages/common/src/util.js#L519 I figured out that iteration is running 47933 times.
arbesfeld commentedon Feb 15, 2017
Hey @michaelfreund, did you find a fix fox this? We're experiencing the same problem
stephenplusplus commentedon Feb 16, 2017
This may have been resolved with a recent change. Please try upgrading to [email protected].
arbesfeld commentedon Feb 17, 2017
Unfortunately this didn't fix it. We are using projectID like this:
While we are also running in App Engine. Would this be expected to work?
12 remaining items
bjwatson commentedon Mar 7, 2017
Ok, thanks. I dropped this priority to P1. Let's close it in another week if we don't hear any other complaints about this.
dan-petty commentedon Mar 11, 2017
Getting this with 0.48.0 on App Engine nodejs runtime.
var gcloud = require('google-cloud')({ projectId: 'my-project-id-here', keyFilename: './keyfile.json' });Log error when trying to access gcs bucket:
EDIT: Reverting to:
resolves issue with no changes to code.
EDIT 2: Also resolved by:
stephenplusplus commentedon Mar 13, 2017
Thanks @mixmatch. I'm about to kick off a publish-fest. At the end of it, we'll have
[email protected], and hopefully you can test for us again.stephenplusplus commentedon Mar 14, 2017
The publish fest is over-- I believe everyone should be covered now if you un- and re-install the latest dependencies that you need. Let us know if there are still any issues.
xyk2 commentedon Mar 15, 2017
I am still having the same problems on 0.49.0 after doing a clean uninstall and reinstall. Downgrading back to 0.45.0 resolves this issue.
Strangely the error only occurs on the upload stage to
dest_bucket.stephenplusplus commentedon Mar 15, 2017
What environment are you running in @xyk2? Also, could you show the code you're using to make the API request that fails?
xyk2 commentedon Mar 16, 2017
Apologies should have included that earlier - Node 6.10.0 on Mac OSX 10.11.6 using restify.
The code where the error occurs is in the restify upload handler. When there is a GET request
/download, the file downloads fine from GCS. The upload handler throwsError: Sorry, we cannot connect to Cloud Services without a project ID. The same upload code works when placed outside the Restify handler though, so I may be missing something very stupid...stephenplusplus commentedon Mar 16, 2017
Actually, I think that was exactly what I needed to see the problem. We have been iterating over a larger object than I believe we should be. I'm putting a fix through and I think we'll all be happier people after it thanks to you 👍
stephenplusplus commentedon Mar 17, 2017
PR sent in #2100.
chore(main): release 7.0.0 (#1908)
fix: idwaiter with multiple requests (#1910)
chore(main): release 9.15.1 (#1908)