Getting Error: Assertion failed in reactjs request #1436
-
I have been trying to create a client using the generated js from a proto file that i have. This is the proto file example
etc. etc. and this is my client
whenever i call the getRows function it gives me error
I already checked on what i pass and they are matching with the enum that was setup. and the debugging is a bit hard since it fails even before sending the request to the server. can Anyone help me? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
(Will convert this to be a discussion since this is not a bug with grpc-web itself but rather an error thrown from @rizdaputra Hi! It looks like from the error stack trace that the error was thrown from here: Where it's complaining the enum values are illegal: jspb.asserts.assert(
(value >= -jspb.BinaryConstants.TWO_TO_31) &&
(value < jspb.BinaryConstants.TWO_TO_31)); I see that you have 2 enums setter calls above, on Could you double check the value being set on those 2 fields? Maybe they are illegal in someway. Hope that helps! |
Beta Was this translation helpful? Give feedback.
(Will convert this to be a discussion since this is not a bug with grpc-web itself but rather an error thrown from
google-protobuf
.)@rizdaputra Hi!
It looks like from the error stack trace that the error was thrown from here:
https://github.com/protocolbuffers/protobuf-javascript/blob/5d939dbc8fd5245c4316d52c203a1bff24bac5c4/binary/writer.js#L802C29-L809
Where it's complaining the enum values are illegal:
I see that you have 2 enums setter calls above, on
setOperationType()
andsetType()
.Could you double check the value being set on those 2 fields? Maybe they are …