Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoenix 1.7 compatibility issue #22

Open
Hkalani opened this issue Oct 9, 2024 · 0 comments
Open

Phoenix 1.7 compatibility issue #22

Hkalani opened this issue Oct 9, 2024 · 0 comments

Comments

@Hkalani
Copy link

Hkalani commented Oct 9, 2024

due to a compatibility issue between the version of Permit_phoenix (0.2.0) and Phoenix 1.7. The :phoenix_action key is no longer available in Phoenix 1.7, which is causing the error.

[error] ** (KeyError) key :phoenix_action not found in: %{
  :phoenix_live_view => {AppWeb.StudioLive.Index,
   [action: :index, router: AppWeb.Router],
   %{
     extra: %{
       on_mount: [
         %{
           function: &AppWeb.UserAuth.on_mount/4,
           id: {AppWeb.UserAuth, :ensure_authenticated},
           stage: :mount
         }
       ]
     },
     name: :require_authenticated_user,
     vsn: 1728429292001682231
   }},
  AppWeb.Router => [],
  :phoenix_endpoint => AppWeb.Endpoint,
  :plug_session_fetch => :done,
  :plug_session => %{
    "live_socket_id" => "users_sessions:zjPBxEeTqHcaLcsmwPFuC0lXv4XCnSbY3hToIQGkDWg=",
    "user_token" => <<206, 51, 193, 196, 71, 147, 168, 119, 26, 45, 203, 38,
      192, 241, 110, 11, 73, 87, 191, 133, 194, 157, 38, 216, 222, 20, 232, 33,
      1, 164, 13, 104>>
  },
  :before_send => [#Function<0.98198498/1 in Plug.CSRFProtection.call/2>,
   #Function<4.18939158/1 in Phoenix.Controller.fetch_flash/2>,
   #Function<0.9035112/1 in Plug.Session.before_send/2>,
   #Function<0.106864063/1 in Plug.Telemetry.call/2>,
   #Function<1.66608267/1 in Phoenix.LiveReloader.before_send_inject_reloader/3>],
  :phoenix_request_logger => {"request_logger", "request_logger"},
  :phoenix_router => AppWeb.Router,
  :phoenix_format => "html",
  :phoenix_root_layout => %{"html" => {AppWeb.Layouts, :root}}
}
    (phoenix 1.7.14) lib/phoenix/controller.ex:322: Phoenix.Controller.action_name/1
    (permit_phoenix 0.2.0) lib/permit_phoenix/plug.ex:102: Permit.Phoenix.Plug.call/2
    (app 0.1.0) AppWeb.Router.authorize/2
    (app 0.1.0) lib/app_web/router.ex:1: AppWeb.Router.__pipe_through2__/1
    (phoenix 1.7.14) lib/phoenix/router.ex:475: Phoenix.Router.__call__/5
    (app 0.1.0) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.plug_builder_call/2
    (app 0.1.0) deps/plug/lib/plug/debugger.ex:136: AppWeb.Endpoint."call (overridable 3)"/2
    (app 0.1.0) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.call/2
    (phoenix 1.7.14) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
    (bandit 1.5.7) lib/bandit/pipeline.ex:124: Bandit.Pipeline.call_plug!/2
    (bandit 1.5.7) lib/bandit/pipeline.ex:36: Bandit.Pipeline.run/4
    (bandit 1.5.7) lib/bandit/http1/handler.ex:12: Bandit.HTTP1.Handler.handle_data/3
    (bandit 1.5.7) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
    (bandit 1.5.7) /home/tes/elixir/app/deps/thousand_island/lib/thousand_island/handler.ex:411: Bandit.DelegatingHandler.handle_continue/2
    (stdlib 6.0.1) gen_server.erl:2163: :gen_server.try_handle_continue/3
    (stdlib 6.0.1) gen_server.erl:2072: :gen_server.loop/7
    (stdlib 6.0.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant