Skip to content

[multivendor] Maximum call stack size exceeded upon setting shipping method #3355

Open
@twlite

Description

Describe the bug
Sometimes vendure throws call stack overflow error when setting a shipping method on multivendor plugin. The error seems to occur at

await this.entityHydrator.hydrate(ctx, shippingLine, { relations: ['shippingMethod.channels'] });
where the mergeDeep function invoked by EntityHydrator goes too deep.

To Reproduce
Steps to reproduce the behavior:
The issue does not occur 100% of the time. But when it does, it happens after setting shipping method on an order.

Expected behavior
It should not cause stack overflow error.

Environment (please complete the following information):

  • @vendure/core version: 3.1.2
  • Nodejs version: 22.12.0
  • Database (mysql/postgres etc): postgres

Additional context
This issue started appearing out of the blue. The related discord thread is #1336949445153263667

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      📦 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions