Skip to content

@aws-sdk/client-s3 ListObjectsV2Command hangs forever when listing many files (>800) #8947

Open
@moreirathomas

Description

@moreirathomas

What version of Bun is running?

1.0.26+c75e768a6

What platform is your computer?

Darwin 23.3.0 arm64 arm

What steps can reproduce the bug?

Sending ListObjectsCommand (or ListObjectsV2Command) via S3Client.send hangs forever at runtime.

const client = new S3Client({
  region,
  credentials: { accessKeyId, secretAccessKey },
});

const command = new ListObjectsCommand({
  Bucket: bucket,
  Prefix: prefix,
  Delimiter: "/",
});

const res = await client.send(command); // <- hangs forever

What is the expected behavior?

Do not hang forever. At least fail and return an error or throw an exception.

What do you see instead?

When testing: the test fail due to timeout.

At runtime as an http handler and called via curl: the request hangs forever (until ctrl+c).

Additional information

I have two reproduction repositories available: one running on Bun (where the bug occurs), on running on Deno (no bug reproduced).

Tested with @aws-sdk/client-s3 at 3.449.0 and 3.511.0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds investigateNeeds to be investigated to find the root cause

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions