Coder Social home page Coder Social logo

Comments (4)

murgatroid99 avatar murgatroid99 commented on September 23, 2024

I'm not entirely clear on what you're doing. When you say "we were passing a grpc.Metadata that was created by 1.8.0 to this client implementation using 1.7.3", do you mean that you are taking a Metadata object created from grpc 1.8.0, and passing it to a grpc 1.7.3 function? If so, that would cause the problem you are seeing. I am not really sure why you would be seeing the same error if you are using the same grpc library for both. Is it possible that you are loading two separate instances of grpc 1.8.0?

from grpc-node.

ntindall avatar ntindall commented on September 23, 2024

do you mean that you are taking a Metadata object created from grpc 1.8.0, and passing it to a grpc 1.7.3 function?

yes. that is what we were doing... it makes sense to me that this could cause problems, but I'm not sure this is the ideal world. It would be best if we had backwards compatibility here, right? to be clear:

     const metadata = new grpc.Metadata(); // grpc 1.8.0 metadata

     if (typeof context.requestId === 'string') {
       metadata.set('request_id', context.requestId);
     }
     
     // promisified grpc 1.7.3 function
     plaidGrpcService.client()
     .nameOfPromisifiedMethodAsync(requestObject, metadata, {
       deadline: plaidGrpcService.defaultDeadline(),
     })
     .then(res => {
       // business logic.
     })

Is it possible that you are loading two separate instances of grpc 1.8.0?

I think that could be possible. Let me try to reproduce it again with everything using 1.8.0.

In general @murgatroid99, is this a supported use case or should we be aiming to have everything using the same grpc version?


Edit: OK, I tried it again, this time ensuring there was no duplicate instance of grpc, and this is no longer a problem. Do you have any ideas about why this fixes it?

from grpc-node.

murgatroid99 avatar murgatroid99 commented on September 23, 2024

For the foreseeable future, you should not expect to be able to mix together objects from different instances of the gRPC library. It would make type checking a nightmare, and some types are implemented with underlying C structures and therefore simply would not be portable at all.

from grpc-node.

ntindall avatar ntindall commented on September 23, 2024

Ok, thanks for your help @murgatroid99. I am wondering if there is anything that could be done in order to make the root cause here more obvious to others who maybe encountering this... Assuming the bug in arguejs were fixed, do you think this is a good failure mode?

from grpc-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.