Skip to content

flaky / intermittent Response.clone: Body has already been consumed errors #1572

Description

@thescientist13

What happened?

As observed most impactfully in #1457 (comment) was this issue of getting this error in development (and even as recent during a greenwood build during v0.33.0-alpha.8 testing)

****************************************************************************
TypeError: Response.clone: Body has already been consumed.
    at webidl.errors.exception (node:internal/deps/undici/undici:3610:14)
    at _Response.clone (node:internal/deps/undici/undici:9192:31)
    at file:///C:/Users/owenbuckley/Workspace/greenwood/packages/cli/src/lifecycles/serve.js:70:45
    at async file:///C:/Users/owenbuckley/Workspace/greenwood/packages/cli/src/lifecycles/serve.js:49:5

It's flaky in the sense that if you ran it five times again, it will probably just work.

Steps to reproduce

It happens intermittently but was definitely consistent in #1457 but as mentioned, still seems to flake out every once in a while

Environment

Any recent versions of Greenwood across all OSs.

Additional Context

There was even #1565 trying to fix it that was a bit of an exercise. In general, I think we may need to rethink how we do response cloning in lifecycle/develop.js as well as other areas of the project


Will tag this in #970

Metadata

Metadata

Labels

Type

Projects

Status
✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions