Rpc error: code = 13 desc = .coprocess.Object#domain is not a field: undefined

Hi,

While this issue gets fixed, I have been trying to use your grpc plugin implementation with nodejs, again, using your docker installation.
The server is ok, using your protos defined here I managed to create a nodejs grpc client and the communication works perfectly using protobuf for the service definition. Since javascript doesn’t need strong type, there is no need to go through all the bindings thing.
After that, I created a simple manifest.json and then built the plugin using tyk-cli, uploaded to my static server and configured my API to use it. This is my tyk.conf

The plugin is correctly stored in the gateway filesystem (middleware/bundles) and is correctly loaded by the system:

tyk_gateway_1    | time="May 22 15:01:54" level=info msg="----> Fetching Bundle: auth-bundle-grpc-545.zip" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="Loading API" api_name="Portal Assets" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="Checking security policy: Open" api_name="Portal Assets" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="Checking security policy: Open" api_name="Portal API" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="----> Loading bundle: auth-bundle-grpc-545.zip" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="----> Verifying bundle: auth-bundle-grpc-545.zip" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="----> Bundle is valid, adding to spec: auth-bundle-grpc-545.zip" 
tyk_gateway_1    | time="May 22 15:01:54" level=info msg="Checking security policy: CoProcess Plugin" api_name="My API" 
tyk_statics_1    | 172.18.0.4 - - [22/May/2017:15:01:54 +0000] "GET /auth-bundle-grpc-545.zip HTTP/1.1" 200 357 "-" "Go-http-client/1.1" "-"
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Processed and listening on: /portal-assets/{rest:.*}" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Processed and listening on: /portal-api/{rest:.*}" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Processed and listening on: /portal/{rest:.*}" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Processed and listening on: /my-api/{rest:.*}" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Loading uptime tests..." 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Initialised API Definitions" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="API reload complete" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Initiating coprocess reload" 
tyk_gateway_1    | time="May 22 15:01:55" level=info msg="Reloading middlewares" 

But when trying to access an API endpoint the error raises:

tyk_gateway_1    | time="May 22 15:02:29" level=error msg="rpc error: code = 13 desc = .coprocess.Object#domain is not a field: undefined" 
tyk_gateway_1    | time="May 22 15:02:29" level=error msg="request error: Key not authorised" api_id=9b050246d7d44f935f023430c8bcbf34 org_id=5922fce971774c000125b699 path="/my-test" server_name="http://httpbin.org/" user_id= user_ip=172.18.0.1 

Any clue?

It might be worth using the protos from the release branch instead of master:

https://github.com/TykTechnologies/tyk/tree/release-2.3/coprocess/proto

Not sure that’s the solution, but it will make sure all fields are aligned.

Since I checked out your master branch, there is no need for using the release branch protos. Anyway, they haven’t been modified since the version creation.

Hi, we don’t have a “domain” field for the coprocess object definition (and it wasn’t present in previous definitions).
It could be helpful to see some sample JS code.

Best.

I know, I did the code search.

The code