crawly icon indicating copy to clipboard operation
crawly copied to clipboard

`Could not start application crawly` when trying to enter IEx

Open thiagomajesk opened this issue 4 years ago • 1 comments

Having crawly as a dev dependency on mix gives an error if I try to run iex -S mix in my phoenix project:

** (Mix) Could not start application crawly: Crawly.Application.start(:normal, []) returned an error: shutdown: failed to start child: {:ranch_listener_sup, Crawly.API.Router.HTTP}
    ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
        ** (EXIT) {:listen_error, Crawly.API.Router.HTTP, :eaddrinuse}

The error :eaddrinuse only happens because I'm already running phoenix in localhost:3000. Why is crawly trying to reserve port 3000? Also: could we improve the error message to be more clear?

thiagomajesk avatar Jul 24 '21 15:07 thiagomajesk

Crawly automatically starts a cowboy http endpoint to allow remote controlling of the Crawly service.

It is probably a good idea to let this as an opt-in feature, to avoid unexpected scenarios like this.

Ziinc avatar Sep 07 '21 17:09 Ziinc

It would be nice to be able to disable this. We found this to be an issue when running tests while also running a dev environment. It can be solved by setting different port in the test environment from what is used in dev, but it seems more appropriate to simply disable remote control.

bjunc avatar Jan 09 '23 13:01 bjunc