using "topic.exists()" raises "TypeError: Channel's second argument must be a ChannelCredentials"
See original GitHub issueEnvironment details
- OS: Ubuntu 16.04
- Node.js version: 9.3.0
- npm version: 5.5.1
- @google-cloud/pubsub version: 0.16.1
Steps to reproduce
- Setup PubSub emulator and set PUBSUB_EMULATOR_HOST
- run topic.exists()
This issue does not happen with PubSub version 0.15.0, when upgrading to 0.16.* and calling topic.exists() the following error occur:
[0] (node:48) UnhandledPromiseRejectionWarning: TypeError: Channel's second argument must be a ChannelCredentials
[0] at ServiceClient.Client (/usr/src/app/node_modules/google-gax/node_modules/grpc/src/client.js:472:19)
[0] at new ServiceClient (/usr/src/app/node_modules/google-gax/node_modules/grpc/src/client.js:884:12)
[0] at /usr/src/app/node_modules/google-gax/lib/grpc.js:245:12
[0] at <anonymous>
[0] at process._tickCallback (internal/process/next_tick.js:160:7)
[0] at Function.Module.runMain (module.js:703:11)
[0] at startup (bootstrap_node.js:194:16)
[0] at bootstrap_node.js:618:3
[0] (node:48) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[0] (node:48) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Channel's second argument must be a ChannelCredentials
I can use it perfectly without setting the credentials for gRPC. But I do not know if that would be a problem.
Read more >gRPC Python 1.46.2 documentation
Creates a ChannelCredentials for use with an SSL-enabled Channel. ... Typically, this object is an argument to add_secure_port() method during server setup.
Read more >UnhandledPromiseRejectionWar...
UnhandledPromiseRejectionWarning: TypeError: Channel credentials must be a ChannelCredentials object in GCP Batch publishing · Ask Question.
Read more >google-auth Documentation - Read the Docs
Use application default credentials. default() will automatically detect if ... ment should not be set; otherwise ValueError will be raised.
Read more >2 Server Error Message Reference - MySQL :: Developer Zone
Message: Key column '%s' doesn't exist in table ... Message: You must have privileges to update tables in the mysql database to be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This sounds like a problem with multiple versions of gRPC loading. I believe I’ve found the issue, and will be sending a PR soon.
I’m seeing this issue as well; an
npm cache clean --force
did not change the behavior, nor did whacking thepackage-lock.json
and regenerating it from annpm install
unfortunately.Let me know if i can provide any additional information.
Edit: the installation of pubsub was into a project that hasn’t previously had any google cloud libraries intalled in it; it was installed with an
npm install @google-cloud/pubsub
which got me version0.16.1
; for the sake of getting things rolling, I tried an older version by specifying0.15.0
and that version is working fine against the emulator.