Skip to content

pubsub error - Cannot read property 'onAuthorized' of undefined #466

Description

@leibale
Cannot read property 'onAuthorized' of undefined,

TypeError: Cannot read property 'onAuthorized' of undefined
    at onAuthorizedRequest (/home/leibale/workspace/images-processor/node_modules/gcloud/lib/common/util.js:397:19)
    at /home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/google-service-account/connection.js:56:5
    at Connection.<anonymous> (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/google-service-account/connection.js:116:5)
    at processImmediate [as _immediateCallback] (timers.js:354:15)

Activity

  1. stephenplusplus commented on Mar 26, 2015

    @stephenplusplus
    Contributor

    What version of gcloud are you using? If not master, would you mind testing against that, as we have made significant changes since 0.12.0 was released back in December.

  2. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: pubsubIssues related to the Pub/Sub API.
    on Mar 26, 2015
  3. leibale commented on Mar 26, 2015

    @leibale
    ContributorAuthor

    i download from github and it's working.
    thanks.

  4. stephenplusplus commented on Mar 26, 2015

    @stephenplusplus
    Contributor

    Phew!

  5. leibale commented on Mar 29, 2015

    @leibale
    ContributorAuthor

    @stephenplusplus I got this error again

    Cannot read property 'onAuthorized' of undefined,
    
    TypeError: Cannot read property 'onAuthorized' of undefined
        at onAuthorizedRequest (/home/leibale/workspace/images-processor/node_modules/gcloud/lib/common/util.js:478:19)
        at /home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/google-service-account/connection.js:56:5
        at Connection.<anonymous> (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/google-service-account/connection.js:116:5)
        at processImmediate [as _immediateCallback] (timers.js:354:15)
    
  6. ryanseys commented on Mar 29, 2015

    @ryanseys
    Contributor

    Is there some method you are calling where you aren't specifying a callback?

  7. leibale commented on Mar 29, 2015

    @leibale
    ContributorAuthor

    only file.createReadStream() and file.createWriteStream(), but i listen to err and finish events

  8. ryanseys commented on Mar 29, 2015

    @ryanseys
    Contributor

    Ok! If you have a small snippet we could run to reproduce this it would greatly speed up tracking down the bug. That line throwing the error is used by every api request.

  9. leibale commented on Mar 29, 2015

    @leibale
    ContributorAuthor

    i using file.createWriteStream(), file.createReadStream(), subscription.pull().
    i think it's from subscription.pull(), but.

    edit:
    please reopen the issue

  10. leibale commented on Mar 30, 2015

    @leibale
    ContributorAuthor

    it's happening on subscription.ack(result.ackId);

  11. 32 remaining items

  12. added a commit that references this issue on Feb 24, 2026
    bdaf328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub 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