-
Notifications
You must be signed in to change notification settings - Fork 608
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
Project ID required even if running script from Compute Engine #1908
Comments
Thanks for reporting. Which version of @google-cloud/datastore are you running? |
I'm seeing this today on App Engine Flex.
But I have an environment variable set for Note that I'm still on I opened #1918 to fix the broken link in the error message. |
I was on gcloud
We're using https://github.com/motdotla/dotenv for our ENV variables and we use 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 :( |
This also happens on non app or compute engine environments with >= 0.45.1. Downgrading to 0.45.0 resolves the issue. const Gcloud = require('google-cloud')({
keyFilename: Config.GCLOUD.KEYFILE
}); @stephenplusplus any ideas? |
Looking into now, sorry for the delay! |
@HighNoonSolutions I haven't been able to reproduce on GCE. I set up a micro box, installed Node, and tried against both @michaelfreund Using 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 |
@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 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. |
Hey @michaelfreund, did you find a fix fox this? We're experiencing the same problem |
This may have been resolved with a recent change. Please try upgrading to google-cloud@0.47.0. |
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? |
@stephenplusplus Is this a release blocking issue? It looks like several users have encountered it. |
This is one where I have to think in environments it's not working, it's because of some stale dependencies. We have released 0.48.0-- could anyone still experiencing this please try @bjwatson If there are still problems, I will need someone to help test in GAE (@jmdobry maybe?) |
@stephenplusplus Will this be a problem with future updates? Or is this a one-time cost? |
What do you mean? |
Once users run |
I hope so! I was never able to pin down exactly what was causing this issue, so I have to hope that it was corrected by a related change that shipped in 0.47.0. If it does correct itself by a fresh upgrade, then no further work by the user is necessary. |
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. |
Getting this with 0.48.0 on App Engine nodejs runtime. Log error when trying to access gcs bucket:
EDIT: Reverting to:
resolves issue with no changes to code. EDIT 2: Also resolved by: var storage = require('@google-cloud/storage');
var gcs = storage({
projectId: 'my-project-id-here',
keyFilename: './keyfile.json'
}); |
Thanks @mixmatch. I'm about to kick off a publish-fest. At the end of it, we'll have |
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. |
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. var google_cloud = require('google-cloud')({
projectId: 'PROJECT',
keyFilename: 'KEYFILE.json'
});
var gcs = google_cloud.storage();
var bucket = gcs.bucket('SOURCE-BUCKET');
var dest_bucket = gcs.bucket('DESTINATION-BUCKET'); Strangely the error only occurs on the upload stage to |
What environment are you running in @xyk2? Also, could you show the code you're using to make the API request that fails? |
Apologies should have included that earlier - Node 6.10.0 on Mac OSX 10.11.6 using restify. var restify = require('restify');
var server = restify.createServer({
name: 'ffmpeg-runner'
});
var google_cloud = require('google-cloud')({
projectId: 'PROJECT-ID',
keyFilename: 'keys/KEYFILE.json'
});
var gcs = google_cloud.storage();
var dest_bucket = gcs.bucket('BUCKET_NAME');
server.get('/download', download);
server.get('/upload', upload);
function download(req, res, next) {
dest_bucket.file('sandbox/index.m3u8').download({destination: 'index.m3u8'}, function(err) {
if(err) return console.log(err);
res.send("Download successful");
console.log("Download successful");
});
}
function upload(req, res, next) {
dest_bucket.upload('index.m3u8', {destination: 'sandbox/index.m3u8'}, function(err, gFileObj) {
if(err) return console.log(err);
res.send('Upload successful');
console.log('Upload successful');
});
}
server.listen(8080, function() {
console.log('%s listening at %s', server.name, server.url);
}); The code where the error occurs is in the restify upload handler. When there is a GET request |
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 👍 |
PR sent in #2100. |
The line above used on compute engine (not app engine) will still throw the error below -
Yet in the documentation it says -
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.
The text was updated successfully, but these errors were encountered: