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

Secret manager doesn't seem to be working with latest node version (22.7.0) #5637

Closed
7 tasks done
martinvaskoski opened this issue Aug 26, 2024 · 5 comments
Closed
7 tasks done

Comments

@martinvaskoski
Copy link

martinvaskoski commented Aug 26, 2024

Please make sure you have searched for information in the following guides.

A screenshot that you have tested with "Try this API".

.

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

.

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

.

A clear and concise description of what the bug is, and what you expected to happen.

[Nest] 1 - 08/26/2024, 7:26:39 AM ERROR [ExceptionHandler] "length" is outside of buffer bounds 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/protobufjs/src/writer_buffer.js:61:13)
at BufferWriter.finish (/app/node_modules/protobufjs/src/writer.js:453:14) at /app/node_modules/@grpc/proto-loader/build/src/index.js:177:109
at Array.map () at createPackageDefinition (/app/node_modules/@grpc/proto-loader/build/src/index.js:177:39)
at Object.fromJSON (/app/node_modules/@grpc/proto-loader/build/src/index.js:230:12) at GrpcClient.loadProtoJSON (/app/node_modules/google-gax/build/src/grpc.js:228:51)
at new LocationsClient (/app/node_modules/google-gax/build/src/locationService.js:118:32) at new SecretManagerServiceClient (/app/node_modules/@google-cloud/secret-manager/build/src/v1/secret_manager_service_client.js:134:32)
Stream closed EOF for default/service-deploy-bb8d9cf64-8p6qn

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

.

Copy link
Contributor

Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)

@mlitvinav
Copy link

This is a valid issue, no idea why its closed…
secret-manager is broken on node 22.7.

Here is how to fix it: Change your Dockerfile from...

FROM node:alpine as builder
...SNIP...
FROM node:alpine
...SNIP...

To...

FROM node:lts-alpine as builder
...SNIP...
FROM node:lts-alpine
...SNIP...

Locally downgrade node via nvm.

@jemilezzet
Copy link

Valid issue on my end too

@alisd23
Copy link

alisd23 commented Aug 31, 2024

For anyone else: I think it's an upstream issue in Node 22.7.
This is the library further down the stack trace which calls the node buffer stuff directly.
protobufjs/protobuf.js#2025

@Qwerios
Copy link

Qwerios commented Sep 9, 2024

Hit this issue with 22.7 today. Upgrading to 22.8 solved it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants
@Qwerios @alisd23 @jemilezzet @mlitvinav @martinvaskoski and others