oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.91k stars 2.74k forks source link

MongoDB SRV record not working #8758

Closed TheDanielMoli closed 8 months ago

TheDanielMoli commented 8 months ago

What version of Bun is running?

1.0.26+c75e768a6

What platform is your computer?

Darwin 23.3.0 x86_64 i386

What steps can reproduce the bug?

Use the Node.js default MongoDB client (MongoClient) to connect to a replica set cluster with an SRV record. Aka, URI should look like this: mongodb+srv://...

What is the expected behavior?

Connecting to MongoDB.

What do you see instead?

err: {
    "type": "Error",
    "message": "txt lookup failed: No data record of requested type",
    "stack":

    "code": "DNS_ENODATA"
}

Additional information

It works properly with Node.js 18 and Node.js 20.

Electroid commented 8 months ago

Duplicate of #5498

rnldsalili commented 5 months ago

This issue was fixed on Bun v1.1.7