Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

0 should be a supported port #3805

Open
sewinter opened this issue Oct 15, 2022 · 4 comments
Open

0 should be a supported port #3805

sewinter opened this issue Oct 15, 2022 · 4 comments

Comments

@sewinter
Copy link

sewinter commented Oct 15, 2022

  1. 0 should be a supported port.
  2. Yikes to this error message:
Error: Port should be >= 0 and < 65536. Received 0.
    at Server.listen (webpack://Ganache/../core/lib/src/server.js:157:25)
    at ForkManager.createNewServer (/Users/samuelwinter/src/backrun/src/fork/ForkManager.ts:60:12)
    at ForkManager.simulateTx (/Users/samuelwinter/src/backrun/src/fork/ForkManager.ts:26:35)
    at handleMempoolTx (/Users/samuelwinter/src/backrun/src/backrun/mempool.ts:54:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
@davidmurdoch
Copy link
Member

Hey, can you provide reproduction steps? Also, what version are you using?

@sewinter
Copy link
Author

sewinter commented Oct 15, 2022

Hi David, I'm on 7.4.4. Repro:

 const server = ganache.server({
      fork: {
        url: FORK_URL,
      },
      server: {
        ws: true,
      },
    });
    server.listen(0);

@davidmurdoch
Copy link
Member

Looks like a duplicate of #2643. I'll try to get the priority bumped up on this for you. I suspect it will be an easy fix. Thanks for reporting!

@sewinter
Copy link
Author

Thank you! I ended up writing a utility to find a free port, so it's not super urgent for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants