mtrudel / bandit

Bandit is a pure Elixir HTTP server for Plug & WebSock applications
MIT License
1.7k stars 86 forks source link

Unknown adapter Bandit.Adapter after update to Bandit 1.4.0 #334

Closed krns closed 8 months ago

krns commented 8 months ago

Hey, we updated Bandit to 1.4.0 yesterday and are getting the following error in one of our applications:

ArgumentError: Unknown adapter Bandit.Adapter
  File "lib/websock_adapter.ex", line 97, in WebSockAdapter.tuple_for/4
  File "lib/websock_adapter.ex", line 63, in WebSockAdapter.upgrade/4
  File "lib/phoenix/transports/websocket.ex", line 62, in Phoenix.Transports.WebSocket.call/2
  File "lib/my_app_web/endpoint.ex", line 1, in MyAppWeb.Endpoint.do_socket_dispatch/2
    defmodule MyAppWeb.Endpoint do
  File "lib/my_app_web/endpoint.ex", line 1, in MyAppWeb.Endpoint.plug_builder_call/2
    defmodule MyAppWeb.Endpoint do
  File "lib/my_app_web/endpoint.ex", line 1, in MyAppWeb.Endpoint."call (overridable 3)"/2
    defmodule MyAppWeb.Endpoint do
  File "lib/my_app_web/endpoint.ex", line 1, in MyAppWeb.Endpoint.call/2
    defmodule MyAppWeb.Endpoint do
  File "lib/bandit/pipeline.ex", line 102, in Bandit.Pipeline.call_plug/2

We are using Elixir 1.16.2, OTP 26.2.3 and Phoenix 1.7.11.

krns commented 8 months ago

@Flo0807 has pointed out to me that we need websock_adapter in version 0.5.6. I think a hint in the changelog would not be bad :-)

I just updated websock_adapter and everything works!

mtrudel commented 8 months ago

Ahhhhhhhhhhh I forgot to put that in the changelog. Forthcoming

mtrudel commented 8 months ago

Updated!