GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — No jobReference when timeout · Issue #432 · googleapis/google-cloud-node

No jobReference when timeout #432

New issue
Copy link
New issue
Copy link
Closed
Closed
No jobReference when timeout#432
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: bigqueryIssues related to the BigQuery API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@sunnychow
sunnychow
opened on Mar 6, 2015
Issue body actions

I got the following error when I run a heavy load job which cause a TIMEOUT. Such that the jobComplete is false. And the jobReference is undefined in this case.
https://cloud.google.com/bigquery/querying-data

TypeError: Cannot read property 'jobId' of undefined at responseHandler (.........../node_modules/gcloud/lib/bigquery/index.js:394:43) 

Activity

Next
  1. ryanseys
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: bigqueryIssues related to the BigQuery API.
    on Mar 10, 2015
  2. stephenplusplus commented on Mar 11, 2015

    @stephenplusplus
    stephenplusplus
    on Mar 11, 2015
    Contributor
    More actions

    Is this fixed in #431?

  3. sunnychow commented on Mar 12, 2015

    @sunnychow
    sunnychow
    on Mar 12, 2015
    Author
    More actions

    It's another issues. it's not fixed in #431
    I want to ask the response from google bigquery, according to https://cloud.google.com/bigquery/querying-data

    If the query timeout expires before the query has finished, the method will return jobComplete=false, and you must call jobs.getQueryResults as described next. The query job will continue to run even after the timeout period until it finishes, either successfully or because an error has occurred.

    I have tested on it before, the response does not return the jobReference.jobId. So it cause undefined error in this line https://github.com/GoogleCloudPlatform/gcloud-node/blob/v0.12.0/lib/bigquery/index.js#L394

  4. stephenplusplus commented on Apr 21, 2015

    @stephenplusplus
    stephenplusplus
    on Apr 21, 2015
    Contributor
    More actions

    Okay, thanks for explaining, and sorry for the delay. I'll take a look at this asap.

  5. stephenplusplus commented on Apr 21, 2015

    @stephenplusplus
    stephenplusplus
    on Apr 21, 2015
    Contributor
    More actions

    I can't reproduce so far. I ran a query and specified timeoutMs: 0 to force a jobComplete = false. The response from the API returned, as expected, jobComplete = false, but jobReference was always present.

    According to the API docs (Search "jobReference": https://cloud.google.com/bigquery/docs/reference/v2/jobs/query):

    jobReference: Reference to the Job that was created to run the query. This field will be present even if the original request timed out...

    I'm not sure how the response could have come back without that to cause that error. Can you try to reproduce the error using our master branch (npm install --save googlecloudplatform/gcloud-node), and let me know if you still get the error?

  6. jdcc commented on Apr 21, 2015

    @jdcc
    jdcc
    on Apr 21, 2015
    More actions

    Update: Sorry, I see now that this is a different issue with the same symptoms. Move if desired.
    I can reproduce on master (b094aa2) with this query:

    SELECT
              test_id,
              log_time,
              connection_spec.client_ip,
              connection_spec.server_ip,
              paris_traceroute_hop.src_ip,
              paris_traceroute_hop.dest_ip,
              paris_traceroute_hop.src_hostname,
              paris_traceroute_hop.dest_hostname
            FROM [measurement-lab:m_lab.2014_10]
            WHERE 
              project = 3
              AND connection_spec.client_ip = "62.210.74.143" 
              AND connection_spec.server_ip LIKE '217.163.1.%'
            ORDER BY test_id DESC;

    and this code:

    bigquery.query(query, function(err, rows, nextQuery) {
      if (nextQuery) {
        bigquery.query(nextQuery, function(err, rows, nextQuery) {});
      }
    });

    The first query will succeed, and the second will hit this:

    TypeError: Cannot read property 'jobId' of undefined at responseHandler (.../gcloud/lib/bigquery/index.js:399:43)
    
  7. jdcc commented on Apr 21, 2015

    @jdcc
    jdcc
    on Apr 21, 2015
    More actions

    This is what the response object looks like for the second query:

    {
    kind: 'bigquery#getQueryResultsResponse',
    etag: '"uT9StUUc54UCg_Qc3k6xlS99DVE/s-JNbnKyojd-gIIcRpOEggyGqe4"',
    jobComplete: false
    }
    
  8. stephenplusplus
    self-assigned this
    on Jun 8, 2015
  9. stephenplusplus commented on Jun 8, 2015

    @stephenplusplus
    stephenplusplus
    on Jun 8, 2015
    Contributor
    More actions

    Sorry for the slow attention to this issue, @jdcc. I'll be taking another look today to try to get to the bottom of this.

  10. stephenplusplus commented on Jun 8, 2015

    @stephenplusplus
    stephenplusplus
    on Jun 8, 2015
    Contributor
    More actions

    I'm unfortunately still unable to reproduce. According to the docs and in my experience, a jobReference is always returned. @jdcc or @sunnychow would one of you be able to provide a consistently reproducible query I can run from a query on public data? As an example, something like SELECT url FROM [publicdata:samples.github_nested]. Until then, I'm unfortunately unsure how to resolve.

  11. gquinones commented on Jun 10, 2015

    @gquinones
    gquinones
    on Jun 10, 2015
    More actions

    I'm seeing it consistently on my system. With my data, of course. I'll see if I can generate an example with public data. Meantime, could you put a guard in the code to check when this situation occurs and output to the console? At is is, we can't even tell which of the queries is the one that is timing out.

    If as you say, this situation has not happened in your experience, then that message will never trigger. No harm, no foul. If, on the other hand, the message does trigger, then we can provide you with more details to help resolve the issue.

    The error message I am seeing is:

    TypeError: Cannot read property 'jobId' of undefined
        at responseHandler (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/lib/bigquery/index.js:384:43)
        at /usr/local/brightcove/bigquery-metrics/node_modules/gcloud/lib/common/util.js:672:11
        at Object.handleResp (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/lib/common/util.js:193:3)
        at Request._callback (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/lib/common/util.js:667:12)
        at Request.self.callback (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:354:22)
        at Request.EventEmitter.emit (events.js:98:17)
        at Request.<anonymous> (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:1207:14)
        at Request.EventEmitter.emit (events.js:117:20)
        at IncomingMessage.<anonymous> (/usr/local/brightcove/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:1153:12)
        at IncomingMessage.EventEmitter.emit (events.js:117:20)
    
  12. stephenplusplus commented on Jun 10, 2015

    @stephenplusplus
    stephenplusplus
    on Jun 10, 2015
    Contributor
    More actions

    @gquinones I've put up a repo for debugging: stephenplusplus/gcloud-node-bigquery-debug. You can install this with npm in your project to debug:

    $ npm install --save stephenplusplus/gcloud-node-bigquery-debug

    A new error should come through when this issue appears. You can log and paste the error.response property here to help us see what the API returns.

    @jgeewax do you know someone who can help us with this issue? In summary, when calling BigQuery#query, there is evidently sometimes a response from the API (either Jobs.query or Jobs.getQueryResults) that doesn't include jobReference.

    According to the JSON API docs, jobReference is guaranteed to exist, but as seen here, it's not coming back.

  13. gquinones commented on Jun 10, 2015

    @gquinones
    gquinones
    on Jun 10, 2015
    More actions

    @stephenplusplus Will do.

  14. gquinones commented on Jun 10, 2015

    @gquinones
    gquinones
    on Jun 10, 2015
    More actions

    @stephenplusplus Bad news, I'm afraid:

    TypeError: undefined is not a function
    at responseHandler (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/lib/bigquery/index.js:389:15)
    at /Users/gquinones/work/bigquery-metrics/node_modules/gcloud/lib/common/util.js:684:11
    at Object.handleResp (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/lib/common/util.js:205:3)
    at Request._callback (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/lib/common/util.js:679:12)
    at Request.self.callback (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:354:22)
    at Request.emit (events.js:98:17)
    at Request. (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:1207:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage. (/Users/gquinones/work/bigquery-metrics/node_modules/gcloud/node_modules/request/request.js:1153:12)
    at IncomingMessage.emit (events.js:117:20)

  15. 38 remaining items

  16. sofisl
    added 2 commits that reference this issue on Feb 4, 2026

    test: retry tests that intermittently timeout (#432)

    86368a1

    docs: update return type in jsdoc for Buffers (#432)

    692fbf3
  17. GautamSharda
    added a commit that references this issue on Feb 5, 2026

    chore: regenerate synth.metadata (#432)

    e0ce73d
  18. sofisl
    added a commit that references this issue on Feb 17, 2026

    docs: update return type in jsdoc for Buffers (#432)

    98cec9f
  19. GautamSharda
    added a commit that references this issue on Feb 23, 2026

    chore: regenerate synth.metadata (#432)

    e34510f
  20. sofisl
    added a commit that references this issue on Feb 24, 2026

    Update Conformance Tests (#432)

    e6188de
  21. GautamSharda
    added a commit that references this issue on Feb 26, 2026

    chore: regenerate synth.metadata (#432)

    2454caa
  22. sofisl
    added a commit that references this issue on Mar 5, 2026

    chore: migrate code from googleapis/gcp-metadata (#53)

    fa9a454
  23. GautamSharda
    added 2 commits that reference this issue on Mar 11, 2026

    Release @google-cloud/pubsub v0.23.0 (#432)

    7ac4f21

    build: remove verbose logging from test scripts (#432)

    bcb78f8
  24. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    build: Add docuploader credentials to node publish jobs (#432)

    ce0b113

    build: Add docuploader credentials to node publish jobs (#432)

    37efc7f
  25. feywind
    added a commit that references this issue on Mar 27, 2026

    Release @google-cloud/pubsub v0.23.0 (#432)

    7768433
  26. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    build: Add docuploader credentials to node publish jobs (#432)

    c2727a0
  27. thiyaguk09
    added a commit that references this issue on May 5, 2026

    build: Add docuploader credentials to node publish jobs (googleapis#432)

    51ce7e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: bigqueryIssues related to the BigQuery API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.