Skip to content
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

node:dgram Failed to bind socket #11881

Open
bene opened this issue Jun 14, 2024 · 1 comment
Open

node:dgram Failed to bind socket #11881

bene opened this issue Jun 14, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@bene
Copy link

bene commented Jun 14, 2024

What version of Bun is running?

1.1.13

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

I want to use Bun and matter.js to create a Matter accessory. Unfortunately there is an issue with the node:dgram package. The error isn't really saying much besides Failed to bind socket.

  1. Download example: curl -o main.ts https://raw.githubusercontent.com/project-chip/matter.js/main/packages/matter-node.js-examples/src/examples/BridgedDevicesNode.ts
  2. Run example: bun --bun main.ts

Running the example with node works flawlessly: npx tsx main.ts

What is the expected behavior?

Start the socket without throwing an error.

What do you see instead?

298 |     address = typeof address_ === "function" ? "" : address_, exclusive = !1;
299 |   if (!address)
300 |     if (this.type === "udp4")
301 |       address = "0.0.0.0";
302 |     else
303 |   return state.handle.lookup(address, (err, ip) => {
                                            ^
error: Failed to bind socket
      at node:dgram:303:39
      at node:dns:24:36

Additional information

No response

@bene bene added bug Something isn't working needs triage labels Jun 14, 2024
@jksjaz
Copy link

jksjaz commented Jun 18, 2024

Same issue while working with matter.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants