crawly icon indicating copy to clipboard operation
crawly copied to clipboard

mix project crawly prevent `iex -S mix` to give me the interactive console

Open xward opened this issue 1 year ago • 1 comments

Hello !

Right after installation, I loose the interactive console when starting a mix project:

> iex -S mix       
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

21:45:13.764 [debug] Opening/checking dynamic spiders storage

21:45:13.779 [debug] Using the following folder to load extra spiders: ./spiders

21:45:13.789 [info] No spiders found to auto-load: %MatchError{term: {:error, :enoent}}


[ last forever ]

before crawly installation:

? iex -S mix 
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 

Is there any obvious configuration or anything that I am missing ?

have a nice day !

xward avatar Jun 19 '24 19:06 xward

I'm having the same problem with an existing project, and I wonder if it is an issue with the latest Elixir?

% elixir --version
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace]

Elixir 1.17.1 (compiled with Erlang/OTP 26)

I hadn't run my crawler in a week or so, but had updated Elixir in the meantime. I've tried updating other deps to see if something got out of sync, but didn't help.

defndaines avatar Jun 22 '24 14:06 defndaines

Plus one here. This is the error I get. I'm on elixir 1.17

[debug] Opening/checking dynamic spiders storage
[debug] Using the following folder to load extra spiders: ./spiders
[info] No spiders found to auto-load: %MatchError{term: {:error, :enoent}}

briankariuki avatar Jul 02 '24 06:07 briankariuki

Hi people. I have made the fix for the problem in #299

oltarasenko avatar Jul 03 '24 06:07 oltarasenko

Thanks. Progress for me, though I have a new error. (I probably won't have time to diagnose it today, but I'll get back if I can narrow down the issue.)

09:10:40.418 line=144 pid=<0.782.0> file=lib/crawly.ex domain=elixir application=crawly mfa=Crawly.load_spiders/0 [info] No spiders found to auto-load: %MatchError{term: {:error, :enoent}}

09:10:40.421 line=52 pid=<0.787.0> file=lib/crawly/data_storage/data_storage.ex domain=elixir application=crawly mfa=Crawly.DataStorage.start_link/1 [debug] Starting data storage
Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)

09:10:45.514 line=1391 pid=<0.940.0> file=gen_server.erl domain=otp mfa=:gen_server.error_info/8 [error] GenServer #PID<0.940.0> terminating
** (stop) exited in: GenServer.call(Crawly.Engine, {:start_spider, MySpider.Spider, "cadaa246-3956-11ef-ba43-265b3976fd17", [crawl_id: "cadaa246-3956-11ef-ba43-265b3976fd17"]}, 5000)
    ** (EXIT) time out
    (elixir 1.17.1) lib/gen_server.ex:1128: GenServer.call/3
    (my_spider 0.1.0) lib/my_spider/cron.ex:18: MySpider.Cron.handle_info/2
    (stdlib 5.2.3) gen_server.erl:1095: :gen_server.try_handle_info/3
    (stdlib 5.2.3) gen_server.erl:1183: :gen_server.handle_msg/6
    (stdlib 5.2.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: :spider
State: %{}

defndaines avatar Jul 03 '24 16:07 defndaines

o_O. Sorry, I believe I see the problem. Will think how to solve it.

oltarasenko avatar Jul 03 '24 20:07 oltarasenko

Could you try this branch?

https://github.com/elixir-crawly/crawly/compare/fixing_list_sliders2

oltarasenko avatar Jul 03 '24 20:07 oltarasenko

Awesome, that fixes it for me. My crawler just ran to completion.

defndaines avatar Jul 03 '24 20:07 defndaines

I am going to merge and release it soon!

oltarasenko avatar Jul 04 '24 06:07 oltarasenko