condor-framework icon indicating copy to clipboard operation
condor-framework copied to clipboard

Condor isn't registering the method handler

Open aleffsouza opened this issue 8 years ago • 0 comments

I'm getting this error when server starts:

Method handler placeOrder for /order.OrderService/placeOrder expected but not provided

I've put some logs in the builder.js line 13 (add method) and I got all output I was expecting, I even could call the implementation

syntax = "proto3";

package order;

message OrderItem {
    required string name = 1;
    required float price = 2;
}

message User {
    required string name = 1;
    required string address = 2;
}

message Order {
    required User user = 1;
    repeated OrderItem items = 2;
}

message Empty {}

service OrderService {
    rpc placeOrder(Order) returns (Empty);
}

OrderServices server:

const Condor = require('condor-framework')

class OrderService {
	placeOrder(ctx) {
		// ...
	}
}

const options = {
	'listen': '0.0.0.0:50052',
	'rootProtoPath': '../protos',
}

const OrderServiceImpl = new OrderService()

const app = new Condor(options)
	.add('order_service.proto', 'OrderService', OrderServiceImpl)
	.start()

Futhermore I implemented this same server using malijs and it had worked perfectly.

npm 5.5.1 node 9.1.0

aleffsouza avatar Nov 20 '17 04:11 aleffsouza