Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condor isn't registering the method handler #49

Open
aleffsouza opened this issue Nov 20, 2017 · 0 comments
Open

Condor isn't registering the method handler #49

aleffsouza opened this issue Nov 20, 2017 · 0 comments

Comments

@aleffsouza
Copy link

aleffsouza commented Nov 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant