-
Notifications
You must be signed in to change notification settings - Fork 598
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
Importing file to BigQuery fails when apiResponse is undefined #1812
Comments
We recently changed some internal code and must have let this slip. I'll take a look at it now and try to release a fix asap. |
Oh, just realized you're running google-cloud-node 0.37.0. Can you try upgrading to the latest, 0.44.0? Note, the module is now called Here are each release's release notes so you can watch for any breaking changes your app might need to account for. I've included the changes which affect the core module & BigQuery: 0.38.3 (renamed to - require('gcloud')
+ require('google-cloud') 0.39.0: https://github.com/GoogleCloudPlatform/google-cloud-node/releases/tag/v0.39.0 - bigquery.getDatasets()
+ bigquery.getDatasetsStream()
.on('data', function(dataset) {})
- bigquery.getJobs()
+ bigquery.getJobsStream()
.on('data', function(job) {})
- bigquery.query('SELECT ...')
+ bigquery.createQueryStream('SELECT ...')
.on('data', function(row) {}) var dataset = bigquery.dataset('my-dataset-name');
- dataset.getTables()
+ dataset.getTablesStream()
.on('data', function(table) {})
- dataset.query('SELECT ...')
+ dataset.createQueryStream('SELECT ...')
.on('data', function(row) {}) var table = dataset.table('my-table-name');
- table.getRows()
+ table.createReadStream()
.on('data', function(row) {})
- table.query('SELECT ...')
+ table.createQueryStream('SELECT ...')
.on('data', function(row) {}) 0.43.0: https://github.com/GoogleCloudPlatform/google-cloud-node/releases/tag/v0.43.0 - table.insert([row1, row2, row3], function(err, insertErrors, apiResponse) {})
+ table.insert([row1, row2, row3], function(err, apiResponse) {}) // `err` contains the insertErrors See the example section on the docs for table.insert() for the new way to handle these errors. |
Thanks, we upgraded, will reopen if anything happens. Note: |
deprecating in npm means |
Hi @stephenplusplus , We got the same error message using google-cloud version 0.44.0 (all the other settings are the same, also the same project). The stack trace points to this location (@google-cloud/bigquery/src/job.js:320): I think, it should check also the Stack trace:
Thanks! |
Would you mind placing another --- node_modules/@google-cloud/common/src/service-object.js
+++ node_modules/@google-cloud/common/src/service-object.js
@@ -246,6 +246,7 @@ ServiceObject.prototype.getMetadata = function(callback) {
// Ensure we call the original `request` method.
ServiceObject.prototype.request.call(this, reqOpts, function(err, resp) {
+ console.log(resp)
if (err) {
callback(err, null, resp);
return;
} It must be undefined, but I would like to make sure. Thank you! |
The error happened on deployed code. I can not reproduced it on local, and it happens only sometimes (2 times in the last 8 days). |
Sorry about that, PR sent in #1853. |
Thanks! |
Environment details
Steps to reproduce
Uploaded a file to Google Cloud Storage
Started an import job to a BigQuery table with truncate (
importAsync
)Got the following error:
Most of the time it works, we have been using it for weeks, now it is the first time it happened.
The text was updated successfully, but these errors were encountered: