Closed phaistonian closed 1 week ago
I have the same error
We are observing same issue
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
at proto.utf8Write (node:internal/buffer:1066:13)
at Op.writeStringBuffer [as fn] (/app/node_modules/.pnpm/protobufjs@7.2.4/node_modules/protobufjs/src/writer_buffer.js:61:13)
at BufferWriter.finish (/app/node_modules/.pnpm/protobufjs@7.2.4/node_modules/protobufjs/src/writer.js:453:14)
at /app/node_modules/.pnpm/@grpc+proto-loader@0.7.6/node_modules/@grpc/proto-loader/build/src/index.js:152:109
at Array.map (<anonymous>)
at createPackageDefinition (/app/node_modules/.pnpm/@grpc+proto-loader@0.7.6/node_modules/@grpc/proto-loader/build/src/index.js:152:39)
at Object.fromJSON (/app/node_modules/.pnpm/@grpc+proto-loader@0.7.6/node_modules/@grpc/proto-loader/build/src/index.js:205:12)
at GrpcClient.loadProtoJSON (/app/node_modules/.pnpm/google-gax@4.0.3_encoding@0.1.13/node_modules/google-gax/build/src/grpc.js:228:51)
at new TranslationServiceClient (/app/node_modules/.pnpm/@google-cloud+translate@8.3.0_encoding@0.1.13/node_modules/@google-cloud/translate/build/src/v3/translation_service_client.js:146:38)
at new GoogleTranslationService (/app/apps/dist/lib/google-translation.js:55:32)
As a fix, we decided to downgrade node version (22.4.0 works fine).
Same issue, not necessary to protobufjs@7.4. The error thrown on my 7.3.3
This sounds like an upstream Node issue:
In case you are still experiencing that issues, try these LTS versions:
Everything above looks from my perspective broken and leads to these buffer errors.
Also fixed in the latest node (v22.8.0)
@mbrevda thanks, upgrading to v22.8.0 worked for me
protobuf.js version: 7.4.0
It appears that the latest nodejs version (22.7.0) triggers this error:
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
at