KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.84k stars 153 forks source link

GenServer IntelliJElixir.Debugger.Server terminating at debugger/server.ex:493: IntelliJElixir.Debugger.Server.source/1 #1857

Open mjsommer opened 3 years ago

mjsommer commented 3 years ago

During a debugging session, the debugger randomly crashed with the following error:

[error] GenServer IntelliJElixir.Debugger.Server terminating
** (FunctionClauseError) no function clause matching in Code.ensure_loaded?/1
    (elixir) lib/code.ex:869: Code.ensure_loaded?({%Phoenix.Router.NoRouteError{conn: %Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, 
    assigns: %{}, before_send: [#Function<1.44798538/1 in Plug.Logger.call/2>, #Function<0.832222/1 in Phoenix.LiveReloader.before_send_inject_reloader/2>], body_params: %{}, 
    cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "localhost", method: "GET", owner: #PID<0.11960.0>, params: %{}, path_info: ["css", "app.css"], 
    path_params: %{}, port: 4000, private: %{MyAppWeb.Router => {[], %{}}, :phoenix_endpoint => MyAppWeb.Endpoint, :phoenix_pipelines => [], :phoenix_router => MyAppWeb.Router, 
    :plug_session_fetch => #Function<1.45862765/1 in Plug.Session.fetch_session/1>}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, 
    req_headers: [{"host", "localhost:4000"}, {"connection", "keep-alive"}, {"sec-ch-ua", "\"Google Chrome\";v=\"87\", \" Not;A Brand\";v=\"99\", \"Chromium\";v=\"87\""}, {"sec-ch-ua-mobile", "?0"}, 
    {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"}, {"accept", "text/css,*/*;q=0.1"}, {"sec-fetch-site", 
    "same-origin"}, {"sec-fetch-mode", "no-cors"}, {"sec-fetch-dest", "style"}, {"referer", "http://localhost:4000/org-requests"}, {"accept-encoding", "gzip, deflate, br"}, {"accept-language", 
    "en-US,en;q=0.9"}], request_path: "/css/app.css", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", 
    "FlD1K8EOQsrNQh4AAAaB"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: nil}, message: "no route found for GET /css/app.css (MyAppWeb.Router)", 
    plug_status: 404, router: MyAppWeb.Router}, [{MyAppWeb.Router, :__match_route__, 4, [file: 'lib/my_app_web/router.ex', line: 1]}, {MyAppWeb.Router, :"call (overridable 2)", 2, 
    [file: 'lib/phoenix/router.ex', line: 303]}, {MyAppWeb.Router, :call, 2, [file: 'lib/plug/error_handler.ex', line: 64]}, {MyAppWeb.Endpoint, :plug_builder_call, 2, 
    [file: 'lib/my_app_web/endpoint.ex', line: 1]}, {MyAppWeb.Endpoint, :"call (overridable 3)", 2, [file: 'lib/plug/debugger.ex', line: 122]}, {MyAppWeb.Endpoint, :call, 2, 
    [file: 'lib/my_app_web/endpoint.ex', line: 1]}, {Plug.Adapters.Cowboy.Handler, :upgrade, 4, [file: 'lib/plug/cowboy/handler.ex', line: 18]}, {:cowboy_protocol, :execute, 4, 
    [file: '/Users/Projects/my-app/deps/cowboy/src/cowboy_protocol.erl', line: 442]}]})
    /private/var/folders/tv/62sj7tlx3478xqzb9pl7cwb00000gp/T/intellij_elixir2/debugger/lib/intellij_elixir/debugger/server.ex:493: IntelliJElixir.Debugger.Server.source/1
    /private/var/folders/tv/62sj7tlx3478xqzb9pl7cwb00000gp/T/intellij_elixir2/debugger/lib/intellij_elixir/debugger/server.ex:484: anonymous fn/2 in IntelliJElixir.Debugger.Server.snapshot_with_stacks/0
    (elixir) lib/enum.ex:1899: Enum."-reduce/3-lists^foldl/2-0-"/3
    /private/var/folders/tv/62sj7tlx3478xqzb9pl7cwb00000gp/T/intellij_elixir2/debugger/lib/intellij_elixir/debugger/server.ex:481: IntelliJElixir.Debugger.Server.snapshot_with_stacks/0
    /private/var/folders/tv/62sj7tlx3478xqzb9pl7cwb00000gp/T/intellij_elixir2/debugger/lib/intellij_elixir/debugger/server.ex:304: IntelliJElixir.Debugger.Server.handle_cast/2
    (stdlib) gen_server.erl:616: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:686: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:breakpoint_reached, #PID<0.11988.0>}}

Please let me know, what additional info you might need.

mjsommer commented 3 years ago

Luke, the [error] GenServer IntelliJElixir.Debugger.Server terminating error, is making the debugger unusable. After one hit on break points, the IntelliJElixir.Debugger.Server is done!