Undefined Oban.Web.DashboardLive.handle_event/3

Hey all, I just installed {:oban_web, "~> 2.10", repo: "oban"}, and authenticated with the license key.

I enabled helpers

  def router do
    quote do
      use Phoenix.Router, helpers: true

Configured my router

defmodule MyAppWeb.Router do
  use MyAppWeb, :router

  import MyAppWeb.UserAuth
  import Oban.Web.Router

  scope "/", MyAppWeb do
    pipe_through [:browser, :require_authenticated_user]

    oban_dashboard("/oban")

I can access the dashboard after signing in, The dashboard is also displaying available jobs, and everything.

There is a bug though where clicking on some tabs (that change the url) to navigate between views makes the app throw the following error:

function Oban.Web.DashboardLive.handle_event/3 is undefined or private

(oban_web 2.10.2) Oban.Web.DashboardLive.handle_event("pause-refresh", %{}, #Phoenix.LiveView.Socket<id: "phx-F8RNLeOZ-5AkhAjF", endpoint: PdexWeb.Endpoint, view: Oban.Web.DashboardLive, parent_pid: nil, root_pid: #PID<0.1349.0>, router: PdexWeb.Router, assigns: %{access: :all, nodes: [%{count: 0, name: "Systems-MBP-5", limit: 80}], user: nil, timer: #Reference<0.198486644.1920991236.194615>, selected: MapSet.new([]), init_state: %{"oban:chart-group" => "state", "oban:chart-series" => "exec_count"}, states: [%{count: 0, name: "executing"}, %{count: 0, name: "available"}, %{count: 0, name: "scheduled"}, %{count: 900, name: "retryable"}, %{count: 0, name: "cancelled"}, %{count: 0, name: "discarded"}, %{count: 0, name: "completed"}], conf: %Oban.Config{dispatch_cooldown: 5, engine: Oban.Engines.Basic, get_dynamic_repo: nil, insert_trigger: true, log: false, name: Oban, node: "Systems-MBP-5", notifier: {Oban.Notifiers.Postgres, []}, peer: {Oban.Peers.Postgres, []}, plugins: [{Oban.Plugins.Pruner, [max_age: 345600]}], prefix: "public", queues: [default: [limit: 10], order_requests: [limit: 10], customer_import: [limit: 10], xentral_orders: [limit: 10], image_migration: [limit: 10], product_import: [limit: 10], collection_import: [limit: 10], bundle_import: [limit: 10]], repo: Pdex.Repo, shutdown_grace_period: 15000, stage_interval: 1000, testing: :disabled}, resolver: Oban.Web.Resolver, params: %{state: "retryable", limit: 20, sort_by: "time", sort_dir: "asc"}, os_time: 1712578637, queues: [%{name: "bundle_import", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "collection_import", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "customer_import", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "default", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "image_migration", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "order_requests", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "product_import", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}, %{name: "xentral_orders", limit: 10, avail: 0, execu: 0, global?: false, paused?: false, rate_limited?: false}]

There is also an error thrown for the “resume-refresh” message.

Which essentially breaks the navigation.

Any help would be much appreciated. Thanks!

That’s from an incompatibility with an older version of LiveView. Upgrade to a newer version and that error will go away.

1 Like

Thanks! for whoever needs this, it works with {:phoenix_live_view, "~> 0.20.12"}