question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Argument of type 'GrpcWebFetchTransport' is not assignable to parameter of type 'RpcTransport'

See original GitHub issue

protobuf-ts: 2.6.0

export function selectProvisionClient(state: RootState): ProvisionServiceClient {
  return new ProvisionServiceClient(new GrpcWebFetchTransport({ baseUrl: selectGateEndpoint(state) }));
}

Gives error Argument of type 'GrpcWebFetchTransport' is not assignable to parameter of type 'RpcTransport'

NB: Forcing install of 2.5.0 doesn’t work

yarn.lock

"@protobuf-ts/grpcweb-transport@2.5.0":
  version "2.5.0"
  resolved "https://registry.yarnpkg.com/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.5.0.tgz#a571862f763aa59cd0d184d9f0f9fa6f0b0d920a"
  integrity sha512-8NRvhcwkKyLFrV9j6C3aYtlCLvRvlCgQ0957i63NUgvteZQCP0BGwbTVEQT2n43Wh3xO/Xhb+G1nFe04S3RYSA==
  dependencies:
    "@protobuf-ts/runtime" "^2.5.0"
    "@protobuf-ts/runtime-rpc" "^2.5.0"

"@protobuf-ts/runtime-rpc@2.5.0":
  version "2.5.0"
  resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.5.0.tgz#6c05c99c4b21dd7fbf1fe8398cec0515fc91f6a4"
  integrity sha512-zO5W1/66Ok68muvmjG0+ucTWTfzhCUurnqyspqcWGF9DDgGKSmrtR8V1MRV051UoTonOxm7NZZvM6VTbBv9DcA==
  dependencies:
    "@protobuf-ts/runtime" "^2.5.0"

"@protobuf-ts/runtime-rpc@^2.5.0":
  version "2.6.0"
  resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.6.0.tgz#66fbcf6d9b0ad0d5b892d86ef4e1fbd17516a26e"
  integrity sha512-PUAUUI4NJgg/3i0mfyxzrBsIs+V3/B+ybG2sDSf6mZhPYRZkUFBQqmnaFGx3UHOAU0JORqAIFC1dac6bUjaauw==
  dependencies:
    "@protobuf-ts/runtime" "^2.6.0"

"@protobuf-ts/runtime@2.5.0":
  version "2.5.0"
  resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime/-/runtime-2.5.0.tgz#5264efa9b509cb1f6d9ccad7cbb3182430149cbe"
  integrity sha512-ClfuZQ3iPVABJ0CXLGI044eox1PtmrIbbXZaHYczdFJjaxxn8U7vnwb1dPBM9JZ2I6H1VLZu8A9Z5nRv7zydsg==

"@protobuf-ts/runtime@^2.5.0", "@protobuf-ts/runtime@^2.6.0":
  version "2.6.0"
  resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime/-/runtime-2.6.0.tgz#d823470768383c0657cdc87a745c19af5ef63550"
  integrity sha512-ZXQxypattRL87U9Ki+unh2en+REp8m+VZDTCHHHt1gqTZpjbUn2zzELkSEmli+4WKWPEZRExIhzfAUz0xRskJQ==

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timostammcommented, Oct 10, 2022

I spy v2.8.1 and v2.7.0 in the yarn.lock. You can either update to latest with all, or ensure the lower version with “resolutions”, see the yarn docs.

0reactions
jacksonblankenshipcommented, Oct 13, 2022

I spy v2.8.1 and v2.7.0 in the yarn.lock. You can either update to latest with all, or ensure the lower version with “resolutions”, see the yarn docs.

Yep, turns out that was the issue! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Argument of type 'Handler' is not assignable to parameter of ...
And here's the error I get on the .addService line: TS2345: Argument of type 'ArticleServer' is not assignable to parameter of type ' ......
Read more >
Argument of type is not assignable to parameter of type
The problem is that Typescript is very limited in the math it can do on mapped and conditional types that contain unbound type...
Read more >
Help needed with error 'Argument of type 'any' is not ... - Reddit
Hi! I've been stuck on this error all day: Argument of type 'any' is not assignable to parameter of type 'never'.
Read more >
twirpscript - npm
TwirpScript autogenerates Javascript or TypeScript clients and servers from protocol buffers. The generated clients can be used in browser or ...
Read more >
Protocol Buffer Basics: C# - Google Developers
This tutorial provides a basic C# programmer's introduction to working with protocol buffers, ... Use the C# protocol buffer API to write and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found