Moleculerjs and moleculer-go compatibility issue
nnqq opened this issue · comments
Current Behavior
Call moleculerjs => moleculer-go throws error on moleculerjs side. But calling moleculer-go => moleculerjs works as expected
Console output
[2020-03-05T19:44:41.385Z] WARN imac-denis.local-9788/BROKER: Service 'goMath.add' is not available.
(node:9788) UnhandledPromiseRejectionWarning: ServiceNotAvailableError: Service 'goMath.add' is not available.
at ServiceBroker.findNextActionEndpoint (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:857:13)
at ServiceBroker.call (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:876:25)
at Timeout._onTimeout (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/server.js:21:37)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
Expected Behavior
Expected to get response from moleculer-go service
Console output
Response from Golang service => 3
Failure Information
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- clone https://github.com/nnqq/moleculer-go-and-js
- run
make bug
onmaster
branch - watch for console output (error)
Reproduce code snippet
Repository https://github.com/nnqq/moleculer-go-and-js
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Moleculerjs version: v0.13.13
- Moleculer-go version: v0.2.1
- NodeJS version: v12.13.1
- Golang version: v1.14
- Operating System: macOS v10.15.3
Failure Logs
[2020-03-05T19:44:41.385Z] WARN imac-denis.local-9788/BROKER: Service 'goMath.add' is not available.
(node:9788) UnhandledPromiseRejectionWarning: ServiceNotAvailableError: Service 'goMath.add' is not available.
at ServiceBroker.findNextActionEndpoint (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:857:13)
at ServiceBroker.call (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:876:25)
at Timeout._onTimeout (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/server.js:21:37)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
This bug does not reproduces on moleculer-go develop
branch, only on master
@nnqq thank you. will look into this.
Fixed with:
https://github.com/moleculer-go/moleculer/releases/tag/v0.2.2
@nnqq tested with your repo and works fine there also.
@nnqq release -> https://github.com/moleculer-go/moleculer/releases/tag/v0.2.3
another fix that improves moleculer JS compatibility. have a look.