This repository was archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
This repository was archived by the owner on Jul 13, 2023. It is now read-only.
How to use insecure connection #462
Copy link
Copy link
Closed
Labels
api: cloudtasksIssues related to the googleapis/nodejs-tasks API.Issues related to the googleapis/nodejs-tasks API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Im trying to use a local emulator for Cloud Tasks that requires an insecure connection.
Im trying to construct a client like this:
"@google-cloud/tasks" is v2.1.0
"@grpc/grpc-js" is v1.1.6
import { CloudTasksClient } from '@google-cloud/tasks'
import { credentials } from '@grpc/grpc-js'
const client = new CloudTasksClient({
servicePath: 'localhost',
port: 8123,
sslCreds: credentials.createInsecure(),
})
But get the following error:
error TS2322: Type 'import("/Users/me/myproj/node_modules/@grpc/grpc-js/build/src/channel-credentials").ChannelCredentials' is not assignable to type 'import("/Users/me/myproj/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/channel-credentials").ChannelCredentials'.
Property 'callCredentials' is protected but type 'ChannelCredentials' is not a class derived from 'ChannelCredentials'.
20 sslCreds: credentials.createInsecure(),
~~~~~~~~
Found 1 error.
How can this be done?
Metadata
Metadata
Assignees
Labels
api: cloudtasksIssues related to the googleapis/nodejs-tasks API.Issues related to the googleapis/nodejs-tasks API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.