Open akoenig opened 4 years ago
@akoenig It is a known issue, and hence the note about the project being under development.
I've spent considerable time tracing the issue, and you can see the issues I've reported โ
tl;dr
protocolbuffers/protobuf-javascript#43 needs to be fixed before this library can work, but I've been unable to come up with a fix for it because - a) I'm unfamiliar with the protobuf
codebase and b) The maintainers haven't responded to the issue yet.
Btw we are planning to replace Protocol Buffers with Flatbuffers, so maybe this issue will go away with that. https://github.com/liftbridge-io/liftbridge-api/pull/8
@tylertreat Oh wow, thatโll be great! Although Flatbuffers is once again a Google project and support has been abysmal so far on even widely reported issues. Hopefully the situation is better for Flatbuffers; Iโll start looking at it.
In my experience Flatbuffers folks have generally been pretty responsive, esp compared to the larger projects like protobuf/bazel/TF/etc. If there's a real bug I think they'd be more than willing to work on solving it. That said, I don't know what the nodejs support looks like (I'm most familiar with the C++/Go interfaces).
@llchan Thanks for chiming in!
I don't know what the nodejs support looks like
This is exactly what Iโm worried about.
I get this one
Error: Unknown base64 encoding at char: { at c (.../nats/nodemodules/google-protobuf/google-protobuf.js:186:210) at Object.goog.crypt.base64.decodeStringInternal (.../nats/node_modules/google-protobuf/google-protobuf.js:186:312) at Object.goog.crypt.base64.decodeStringToUint8Array (.../nats/node_modules/google-protobuf/google-protobuf.js:185:385) at Function.jspb.Message.bytesAsU8 (.../nats/node_modules/google-protobuf/google-protobuf.js:200:385)
@paambaati Can you confirm that it runs correctly (npm run debug) if you manually add the final "" arg to the _pb.js file generated as in my example below? I think it is working but the debug app isn't exiting -- just hanging at the end?
proto.proto.Message.deserializeBinaryFromReader = function(msg, reader) {
// ..
case 7:
var value = msg.getHeadersMap();
reader.readMessage(value, function(message, reader) {
// NOTICE THE NUMBER OF ARGUMENTS HERE -->>
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", "");
});
break;
// ...
}
@zag2art @digitalsanity Hey Iโm terribly sorry folks, but I plan to resume work here only once https://github.com/liftbridge-io/liftbridge-api/pull/8 lands. It anyways requires changing a lot of the core stuff, so Iโd rather wait for it than spending more time with Protobuf errors.
@zag2art @digitalsanity https://github.com/protobufjs/protobuf.js/pull/1348 should hopefully fix this issue.
Also, I recently learnt that Liftbridge v1.0.0 (expected to ship in March) is sticking to gRPC for now.
Thanks for compiling this library ๐ ๐ I just tried to build a little prototype in order to get a feeling of how everything is like in Node.js land.
Started liftbridge as described in the quick start:
Created a stream, published a message and read via a subscription:
Creating the stream and publishing the message seems to work. Consuming the stream fails with a:
I also tried to generate a new gRPC binding, but this leads to the same result above ๐