Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readUint64String is not a function #313

Closed
SFVII opened this issue Oct 10, 2022 · 4 comments
Closed

readUint64String is not a function #313

SFVII opened this issue Oct 10, 2022 · 4 comments
Assignees
Labels
dependencies Pull requests that update a dependency file grpc kind/bug Issues which are a software defect

Comments

@SFVII
Copy link

SFVII commented Oct 10, 2022

Hi everyone,

I got this issue since this morning, i tried to upgrade eventstore, try to install manually protobuffer and also downgrade node 16 to 14 and 12 and still got the same error :


 UnknownError: 13 INTERNAL: Response message parsing error: reader.readUint64String is not a function
    at convertToCommandError (/app/node_modules/@eventstore/db-client/dist/utils/CommandError.js:357:12)
    at ClientDuplexStreamImpl.<anonymous> (/app/node_modules/@eventstore/db-client/dist/persistentSubscription/utils/PersistentSubscriptionImpl.js:31:69)
    at ClientDuplexStreamImpl.emit (node:events:539:35)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:422:28)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:325:181)
    at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  code: 13,
  _raw: Error: 13 INTERNAL: Response message parsing error: reader.readUint64String is not a function
      at Object.callErrorFromStatus (/app/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
      at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:422:49)
      at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:325:181)
      at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78
      at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
  for call at
      at ServiceClientImpl.makeBidiStreamRequest (/app/node_modules/@grpc/grpc-js/build/src/client.js:406:34)
      at ServiceClientImpl.read (/app/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
      at /app/node_modules/@eventstore/db-client/dist/persistentSubscription/subscribeToPersistentSubscriptionToStream.js:30:31
      at /app/node_modules/@eventstore/db-client/dist/Client/index.js:60:34
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PersistentSubscriptionImpl.initialize (/app/node_modules/@eventstore/db-client/dist/persistentSubscription/utils/PersistentSubscriptionImpl.js:27:18) {
    code: 13,
    details: 'Response message parsing error: reader.readUint64String is not a function',
    metadata: Metadata { internalRepr: Map(0) {}, options: {} }
  },
  type: 'unknown'
}

@George-Payne George-Payne added kind/bug Issues which are a software defect dependencies Pull requests that update a dependency file grpc labels Oct 10, 2022
@George-Payne George-Payne self-assigned this Oct 10, 2022
@George-Payne
Copy link
Member

Hi Brice,

There seems to have been a breaking change in a patch version (or a broken release?) for google-protobuf.

3.21.0 works
3.21.1 is broken

I'm going to have to investigate a bit more and open an issue over there.


For the time being, if you can lock google-protobuf to the last working version:

yarn:

"resolutions": {
  "google-protobuf": "3.21.0"
}

npm:

"overrides": {
  "google-protobuf": "3.21.0"
}

@SFVII
Copy link
Author

SFVII commented Oct 10, 2022

Thank you bro this is perfect, and really short delay to answer. That is a really good point for eventstore.

I think you should lock package version, to prevent this kind of bug on the future.

I'm glad that was not happened on production. :)

@SFVII SFVII closed this as completed Oct 10, 2022
@George-Payne
Copy link
Member

I found an existing upstream issue here: protocolbuffers/protobuf-javascript#141

It seems like a lot of the methods were removed by an attempt to reduce the bundle size.

In the mean time, I'm going to reopen this issue and pin it until the upstream is fixed, as others are likely to have the same problem.


I think you should lock package version, to prevent this kind of bug on the future.

The problem with pinning dependencies in a library is that it causes duplication if two libraries depend on compatible versions, and we would have to release a new version of the library if a dependency had a bug fix or a vulnerability fix. (and everyone would have to update to that version of this lib to make use of that fix, possibly between major versions).

I'm glad that was not happened on production. :)

In an application, using a lock file to pin your entire dependency tree would prevent this from happening in production.

@George-Payne George-Payne reopened this Oct 10, 2022
@George-Payne George-Payne pinned this issue Oct 10, 2022
@George-Payne
Copy link
Member

google-protobuf released 3.21.2, and I tested that it resolves the issue. So I think this can now be safely closed.

@George-Payne George-Payne unpinned this issue Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file grpc kind/bug Issues which are a software defect
Projects
None yet
Development

No branches or pull requests

2 participants