-
Notifications
You must be signed in to change notification settings - Fork 399
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.size: lPull request size is large.Pull request size is large.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Hello team,
I'm encountering a failure when using the @google-cloud/pubsub package with Node.js versions v24.0.0-rc.3 and later. The issue appears to be related to a transitive dependency within the google-auth-library-nodejs package.
The following code, which works reliably on earlier Node.js versions, now fails starting from v24.0.0-rc.3:
const [topic] = await pubSubClient.topic(topicName);
Error:
/Users/abhi/instana/test-apps/pubsub/node_modules/buffer-equal-constant-time/index.js:37
var origSlowBufEqual = SlowBuffer.prototype.equal;
^
TypeError: Cannot read properties of undefined (reading 'prototype')
at Object.<anonymous> (/Users/abhi/instana/test-apps/pubsub/node_modules/buffer-equal-constant-time/index.js:37:35)
at Module._compile (node:internal/modules/cjs/loader:1734:14)
at Object..js (node:internal/modules/cjs/loader:1899:10)
at Module.load (node:internal/modules/cjs/loader:1469:32)
at Function._load (node:internal/modules/cjs/loader:1286:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1491:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/abhi/instana/test-apps/pubsub/node_modules/jwa/index.js:1:19)
Node.js v24.0.0-rc.3
The issue is with a dependency in googleapis/google-auth-library-nodejs
pkg.
- Works fine in: v24.0.0-rc.2 and earlier
- Fails in: v24.0.0-rc.3, v24.0.0-rc.4
🔍 Root Cause Investigation
After investigating the dependency tree, I’ve identified the root cause:
- google-cloud/pubsub depends on google-auth-library-nodejs → pubsub package.json
- google-auth-library-nodejs depends on jws → auth-library package.json
- jws uses jwa → jws package.json
- jwa depends on buffer-equal-constant-time → jwa package.json
The issue appears to stem from a problem in the jwa dependency chain.
📎 Related Issues & Discussions
- Migration request to drop jws from google-auth-library: refactor(deps): Migrate from
jws
library #1650 - Upstream issue in jwa: move from
buffer-equal-constant-time
totimingSafeEqual
auth0/node-jwa#46
Thanks In Advance
kirrg001, TonyRL, martenbjork, shrujalshah28, radarsu and 2 more
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.size: lPull request size is large.Pull request size is large.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.