-
Notifications
You must be signed in to change notification settings - Fork 53
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
TypeError: Channel credentials must be a ChannelCredentials object when creating CloudTasksClient #92
Comments
@vrayco I came across the same error TypeError: Channel credentials must be a ChannelCredentials object
at new ChannelImplementation (node_modules\google-gax\node_modules\@grpc\grpc-js\build\src\channel.js:29:19)
at new Client (node_modules\google-gax\node_modules\@grpc\grpc-js\build\src\client.js:65:36)
at new ServiceClientImpl (node_modules\google-gax\node_modules\@grpc\grpc-js\build\src\make-client.js:58:5)
at GrpcClient.createStub (node_modules\google-gax\build\src\grpc.js:345:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) The root cause is that in However, in the README of this repository, the import { credentials } from '@grpc/grpc-js';
const client = new CloudTasksClient({
port: 8123,
servicePath: 'localhost',
sslCreds: credentials.createInsecure(),
}); Thus, the check in I fixed it by using import { ChannelCredentials } from 'google-gax';
const client = new CloudTasksClient({
port: 8123,
servicePath: 'localhost',
sslCreds: ChannelCredentials.createInsecure(),
}); I am using |
Here's a PR that updates the README #96 |
@stfsy It compiles but i still get build error UPDATE: new version of cloud tasks available "@google-cloud/tasks": "^5.1.0", works after update |
I'm encountering the same problem as detailed in this GitHub issue: #77. Despite attempting the suggested workaround of aligning the @grpc/grpc-js version, the issue persists.
The error message I'm receiving is:
This error arises when executing the following code:
The versions I'm using are:
The text was updated successfully, but these errors were encountered: