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

View crashing on history page #2026

Closed
taylordowns2000 opened this issue Apr 24, 2024 · 1 comment · Fixed by #2039
Closed

View crashing on history page #2026

taylordowns2000 opened this issue Apr 24, 2024 · 1 comment · Fixed by #2039
Assignees
Labels
bug Newly identified bug

Comments

@taylordowns2000
Copy link
Member

taylordowns2000 commented Apr 24, 2024

[error] GenServer #PID<0.1956.0> terminating
** (KeyError) key :name not found in: #Ecto.Association.NotLoaded<association :snapshot is not loaded>
    (lightning 2.4.2) lib/lightning_web/live/run_live/workorder_component.ex:42: LightningWeb.RunLive.WorkOrderComponent.set_details/2
    (lightning 2.4.2) lib/lightning_web/live/run_live/workorder_component.ex:23: LightningWeb.RunLive.WorkOrderComponent.update/2
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/utils.ex:498: Phoenix.LiveView.Utils.maybe_call_update!/3
    (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/diff.ex:681: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6
    (telemetry 1.2.1) /Users/taylor/build/lightning/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/diff.ex:676: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6
    (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/diff.ex:635: Phoenix.LiveView.Diff.render_pending_components/6
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/diff.ex:143: Phoenix.LiveView.Diff.render/3
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/channel.ex:953: anonymous fn/4 in Phoenix.LiveView.Channel.render_diff/3
    (telemetry 1.2.1) /Users/taylor/build/lightning/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/channel.ex:948: Phoenix.LiveView.Channel.render_diff/3
    (phoenix_live_view 0.20.5) lib/phoenix_live_view/channel.ex:795: Phoenix.LiveView.Channel.handle_changed/4
    (stdlib 5.0.2) gen_server.erl:1077: :gen_server.try_handle_info/3
    (stdlib 5.0.2) gen_server.erl:1165: :gen_server.handle_msg/6
    (stdlib 5.0.2) proc_lib.erl:251: :proc_lib.wake_up/3
Last message: %Lightning.WorkOrders.Events.WorkOrderUpdated{work_order: %Lightning.WorkOrder{__meta__: #Ecto.Schema.Metadata<:loaded, "work_orders">, id: "5e47e86e-db18-4082-90ab-54c3ddd8fbb7", state: :pending, last_activity: ~U[2024-04-24 16:33:27.161431Z], workflow_id: "6d5baa21-024b-4e87-af0c-b5efdf68084f", workflow: %Lightning.Workflows.Workflow{__meta__: #Ecto.Schema.Metadata<:loaded, "workflows">, id: "6d5baa21-024b-4e87-af0c-b5efdf68084f", name: "OpenHIE Workflow", edges: #Ecto.Association.NotLoaded<association :edges is not loaded>, jobs: #Ecto.Association.NotLoaded<association :jobs is not loaded>, triggers: #Ecto.Association.NotLoaded<association :triggers is not loaded>, work_orders: #Ecto.Association.NotLoaded<association :work_orders is not loaded>, runs: #Ecto.Association.NotLoaded<association :runs is not loaded>, project_id: "4adf2644-ed4e-4f97-a24c-ab35b3cb1efa", project: #Ecto.Association.NotLoaded<association :project is not loaded>, snapshots: #Ecto.Association.NotLoaded<association :snapshots is not loaded>, lock_version: 9, deleted_at: nil, delete: nil, inserted_at: ~U[2024-04-24 16:32:35Z], updated_at: ~U[2024-04-24 16:32:35Z]}, snapshot_id: "6e417348-cf32-400c-83dd-c240f6d249d0", snapshot: #Ecto.Association.NotLoaded<association :snapshot is not loaded>, trigger_id: "cae544ab-03dc-4ccc-a09c-fb4edb255d7a", trigger: #Ecto.Association.NotLoaded<association :trigger is not loaded>, dataclip_id: "3a63777a-8156-4355-bf71-c0bfdae007ee", dataclip: #Ecto.Association.NotLoaded<association :dataclip is not loaded>, runs: #Ecto.Association.NotLoaded<association :runs is not loaded>, jobs: #Ecto.Association.NotLoaded<association :jobs is not loaded>, inserted_at: ~U[2024-04-24 16:33:25.306708Z], updated_at: ~U[2024-04-24 16:33:25.306708Z]}}
State: %{socket: #Phoenix.LiveView.Socket<id: "phx-F8lEbUr511PQ3BoC", endpoint: LightningWeb.Endpoint, view: LightningWeb.RunLive.Index, parent_pid: nil, root_pid: #PID<0.1956.0>, router: LightningWeb.Router, assigns: %{filters: %{"date_after" => "2024-03-25T16:32", "log" => "true"}, step: %Lightning.Invocation.Step{__meta__: #Ecto.Schema.Metadata<:built, "steps">, id: nil, exit_reason: nil, error_type: nil, finished_at: nil, started_at: nil, job_id: nil, job: #Ecto.Association.NotLoaded<association :job is not loaded>, snapshot_id: nil, snapshot: #Ecto.Association.NotLoaded<association :snapshot is not loaded>, credential_id: nil, credential: #Ecto.Association.NotLoaded<association :credential is not loaded>, input_dataclip_id: nil, input_dataclip: #Ecto.Association.NotLoaded<association :input_dataclip is not loaded>, output_dataclip_id: nil, output_dataclip: #Ecto.Association.NotLoaded<association :output_dataclip is not loaded>, log_lines: #Ecto.Association.NotLoaded<association :log_lines is not loaded>, runs: #Ecto.Association.NotLoaded<association :runs is not loaded>, inserted_at: nil, updated_at: nil}, project: %Lightning.Projects.Project{__meta__: #Ecto.Schema.Metadata<:loaded, "projects">, id: "4adf2644-ed4e-4f97-a24c-ab35b3cb1efa", name: "openhie-project", description: nil, scheduled_deletion: nil, requires_mfa: false, retention_policy: :retain_all, history_retention_period: nil, dataclip_retention_period: nil, project_users: #Ecto.Association.NotLoaded<association :project_users is not loaded>, users: #Ecto.Association.NotLoaded<association :users is not loaded>, project_credentials: #Ecto.Association.NotLoaded<association :project_credentials is not loaded>, credentials: #Ecto.Association.NotLoaded<association :credentials is not loaded>, workflows: #Ecto.Association.NotLoaded<association :workflows is not loaded>, jobs: #Ecto.Association.NotLoaded<association :jobs is not loaded>, inserted_at: ~N[2024-04-24 16:32:35], updated_at: ~N[2024-04-24 16:32:35]}, statuses: [%{id: :pending, label: "Enqueued"}, %{id: :running, label: "Running"}, %{id: :success, label: "Success"}, %{id: :failed, label: "Failed"}, %{id: :crashed, label: "Crashed"}, %{id: :cancelled, label: "Cancelled"}, %{id: :killed, label: "Killed"}, %{id: :exception, label: "Exception"}, %{id: :lost, label: "Lost"}, %{id: :rejected, label: "Rejected"}], __changed__: %{}, active_menu_item: :runs, projects: [%Lightning.Projects.Project{__meta__: #Ecto.Schema.Metadata<:loaded, "projects">, id: "58d03090-bdc6-4b44-83bb-bcc8768d5e17", name: "dhis2-project", description: nil, scheduled_deletion: nil, requires_mfa: false, retention_policy: :retain_all, history_retention_period: nil, dataclip_retention_period: nil, project_users: #Ecto.Association.NotLoaded<association :project_users is not loaded>, users: #Ecto.Association.NotLoaded<association :users is not loaded>, project_credentials: #Ecto.Association.NotLoaded<association :project_credentials is not loaded>, credentials: #Ecto.Association.NotLoaded<association :credentials is not loaded>, workflows: #Ecto.Association.NotLoaded<association :workflows is not loaded>, jobs: #Ecto.Association.NotLoaded<association :jobs is not loaded>, inserted_at: ~N[2024-04-24 16:32:35], updated_at: ~N[2024-04-24 16:32:35]}, %Lightning.Projects.Project{__meta__: #Ecto.Schema.Metadata<:loaded, "projects">, id: "4adf2644-ed4e-4f97-a24c-ab35b3cb1efa", name: "openhie-project", description: nil, scheduled_deletion: nil, requires_mfa: false, retention_policy: :retain_all, history_retention_period: nil, dataclip_retention_period: nil, project_users: #Ecto.Association.NotLoaded<association :project_users is not loaded>, users: #Ecto.Association.NotLoaded<association :users is not loaded>, project_credentials: #Ecto.Association.NotLoaded<association :project_credentials is not loaded>, credentials: #Ecto.Association.NotLoaded<association :credentials is not loaded>, workflows: #Ecto.Association.NotLoaded<association :workflows is not loaded>, jobs: #Ecto.Association.NotLoaded<association :jobs is not loaded>, inserted_at: ~N[2024-04-24 16:32:35], updated_at: ~N[2024-04-24 16:32:35]}], flash: %{}, page_title: "History", current_user: #Lightning.Accounts.User<__meta__: #Ecto.Schema.Metadata<:loaded, "users">, id: "49a40396-bb96-42a0-a8b3-b59a3b4426a5", first_name: "Amy", last_name: "Admin", email: "demo@openfn.org", confirmed_at: nil, role: :user, disabled: false, mfa_enabl (truncated)

To repro:

  • Navigate to history page
  • Curl to webhook URL
  • Watch view crash and reload repeatedly

This happens on 5a76c0cb01ff94cac2d4e18785164e2913b1283a (latest from main)

https://www.loom.com/share/a98f0aa289af4da59aa7c76782cf1ff0

@taylordowns2000 taylordowns2000 added the bug Newly identified bug label Apr 24, 2024
Copy link

sentry-io bot commented Apr 25, 2024

Sentry Issue: LIGHTNING-BN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Newly identified bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants