dapr / js-sdk

Dapr SDK for Javascript
Apache License 2.0
192 stars 80 forks source link

Unable to run pubsub sample normally #557

Closed MregXN closed 8 months ago

MregXN commented 8 months ago
  1. Report error with the following log
== APP == 2023-12-01T03:02:49.468Z INFO [HTTPServer, HTTPServerImpl] [Topic = my-topic] Registered Subscription with routes: default
== APP == Error: The topic 'my-topic' is already subscribed to PubSub 'my-pubsub-component', there can be only one topic registered.
== APP ==     at SubscriptionManager.registerSubscription (/home/hzk/js-sdk-fork/build/pubsub/subscriptionManager.js:75:19)
== APP ==     at HTTPServerImpl.registerPubsubSubscription (/home/hzk/js-sdk-fork/build/implementation/Server/HTTPServer/HTTPServerImpl.js:86:34)
== APP ==     at HTTPServerPubSub.<anonymous> (/home/hzk/js-sdk-fork/build/implementation/Server/HTTPServer/pubsub.js:84:18)
== APP ==     at Generator.next (<anonymous>)
== APP ==     at /home/hzk/js-sdk-fork/build/implementation/Server/HTTPServer/pubsub.js:20:71
== APP ==     at new Promise (<anonymous>)
== APP ==     at __awaiter (/home/hzk/js-sdk-fork/build/implementation/Server/HTTPServer/pubsub.js:16:12)
== APP ==     at HTTPServerPubSub.subscribeBulk (/home/hzk/js-sdk-fork/build/implementation/Server/HTTPServer/pubsub.js:71:16)
== APP ==     at /home/hzk/js-sdk-fork/examples/pubsub/dist/index.js:95:56
== APP ==     at step (/home/hzk/js-sdk-fork/examples/pubsub/dist/index.js:56:23)
  1. Failed to compile when switching to GRPC
const client = new DaprClient(daprHost, process.env.DAPR_GRPC_PORT, CommunicationProtocolEnum.GRPC);

will report Expected 0-1 arguments, but got 3.