Skip to content

[Bug] Protobuf Payload Converter is broken after upgrading to protobufjs 7.5.2 #1717

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

Open
mjameswh opened this issue May 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mjameswh
Copy link
Contributor

mjameswh commented May 16, 2025

Describe the bug

After upgrading protobufjs to 7.5.2, our feature tests using Protobuf Payload converters have started failing with the following error message:

Feature data_converter/binary_protobuf failed with TypeError: Cannot read properties of undefined (reading '_fullyQualifiedObjects') TypeError: Cannot read properties of undefined (reading '_fullyQualifiedObjects')
    at Object.lookup (/home/runner/work/sdk-typescript/sdk-typescript/features/program-3122623612/node_modules/protobufjs/src/namespace.js:411:27)
    at Object.lookupType (/home/runner/work/sdk-typescript/sdk-typescript/features/program-3122623612/node_modules/protobufjs/src/namespace.js:491:22)
    at ProtobufBinaryPayloadConverter.validatePayload (/home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/converter/protobuf-payload-converters.js:58:37)
    at ProtobufBinaryPayloadConverter.fromPayload (/home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/converter/protobuf-payload-converters.js:99:44)
    at PayloadConverterWithProtobufs.fromPayload (/home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/converter/payload-converter.js:113:26)
    at /home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/converter/payload-converter.js:60:48
    at Array.map (<anonymous>)
    at arrayFromPayloads (/home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/converter/payload-converter.js:60:21)
    at decodeArrayFromPayloads (/home/runner/work/sdk-typescript/sdk-typescript/sdk-ts/packages/common/lib/internal-non-workflow/codec-helpers.js:89:54)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Minimal Reproduction

The following feature tests demonstrate this issue:

  • data_converter/binary_protobuf
  • json_protobuf

All SDK integration tests still pass, including those testing the Protobuf Payload Converter feature. Our protobufs sample also execute without problem against 1.11.8 + protobufjs 7.5.2 (didn't test other combinations). Given that the latter are more representative of how users would normally use this feature, it seems reasonable to expect that this issue might not have any user visible impact.

Misc

  • The _fullyQualifiedObjects property was introduced in protobufjs yesterday.
  • It seems likely that this upstream change may conflict with our "Patch Protobuf Root" logic.
  • Due to technical constraints of our feature test harness, our feature tests reuse some protobuf message definitions of the SDK itself, rather than defining and compiling their own protobuf messages as one would normally do.
@mjameswh mjameswh added the bug Something isn't working label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant