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.

MethodDescriptor Introduced in #567 is broken

See original GitHub issue

/cc @stanley-cheung I’m running with --grpc-web_out=import_style=commonjs+dts,mode=grpcweb

Here’s a generated MethodDescriptor: note optin_pb.OptInRequest instead of proto.x.protobuf.v1alpha2.OptInRequest

/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.x.protobuf.v1alpha2.OptInRequest,
 *   !proto.google.protobuf.Empty>}
 */
const methodDescriptor_OptInService_OptIn = new grpc.web.MethodDescriptor(
  '/x.protobuf.v1alpha2.OptInService/OptIn',
  grpc.web.MethodType.UNARY,
  optin_pb.OptInRequest,
  google_protobuf_empty_pb.Empty,
  /** @param {!proto.x.protobuf.v1alpha2.OptInRequest} request */
  function(request) {
    return request.serializeBinary();
  },
  google_protobuf_empty_pb.Empty.deserializeBinary
);

I’m unable to compile grpc-web anymore (no build instructions either…), however the problem seems around these lines

https://github.com/grpc/grpc-web/pull/567/files#diff-2e729f9088e537bfeb6fefc318963a96R1078 https://github.com/grpc/grpc-web/pull/567/files#diff-2e729f9088e537bfeb6fefc318963a96R1389

This line could use a comment to explain what’s the goal of method->output_type()->file() != file

if (import_style == ImportStyle::COMMONJS &&
            method->output_type()->file() != file) {

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
stanley-cheungcommented, Aug 2, 2019

Fixed in version 1.0.6 now.

1reaction
stanley-cheungcommented, Aug 1, 2019

@travikk Working on it

Read more comments on GitHub >

github_iconTop Results From Across the Web

MethodUtils xref - Apache Commons
58 * <p> 59 * Note that this is broken when this class is deployed via a shared ... classloader because it is...
Read more >
Mockito cannot mock this class - java - Stack Overflow
Save this question. Show activity on this post. I am attempting to mock a public class, however when doing so, Mockito throws an...
Read more >
reflect/protoreflect/type.go · cx/protoc-gen-go - Gitee.com
This can occur if a descriptor type is created dynamically, or multiple. // versions of the same proto type are accidentally linked into...
Read more >
Cannot find source for Java JDK on Mac OS/X while debugging
When trying to debug a simple Web application (literally created by the wizard and no added code) on the Mac using the internal...
Read more >
descriptor.h source code [ClickHouse/contrib/protobuf/src ...
90, class MethodDescriptor; ... 567, friend class DescriptorPool; ... If a new descriptor is created, this is done in a thread-safe way,.
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