-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.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
Issue
I went from @google-cloud-node/pubsub 0.14.2 to 0.14.4 (&5) and none of the pubsub methods seem to work with the emulator anymore. They all produce the following error.
TypeError: Channel's second argument must be a ChannelCredentials
at ServiceClient.Client (node_modules/grpc/src/node/src/client.js:472:19)
at new ServiceClient (node_modules/grpc/src/node/src/client.js:881:12)
at node_modules/google-gax/lib/grpc.js:229:12
at tryCatcher (node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromiseCtx (node_modules/bluebird/js/release/promise.js:606:10)
at Async._drainQueue (node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (node_modules/bluebird/js/release/async.js:17:14)
Environment details
- OS: OSX 10.12.6
- Node.js version: 8.5
- npm version: 5.3.0
- yarn version: 1.2.0
- google-cloud-node version: pubsub v0.14.5
- gcloud version: Google Cloud SDK [175.0.0]
- gcloud components:
Installed Components:
core: [2017.10.09]
app-engine-python: [1.9.61]
pubsub-emulator: [2017.09.15]
gcloud: []
beta: [2017.09.15]
gsutil: [4.27]
bq: [2.0.27]
Steps to reproduce
gcloud beta emulators pubsub start
$(gcloud beta emulators pubsub init-env)
const pubsub = Pubsub({
projectId: process.env.GCLOUD_PROJECT,
promise: require('bluebird')
});
async function getTopic (topicName) {
try {
const topic = await pubsub.createTopic(topicName);
return topic[0];
} catch (err) {
// topic already exists.
if (err && (err.code === 409 || err.code === 6))
return pubsub.topic(topicName);
throw err;
}
}
getTopic('unit-tests');Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.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.