bug: create event rule from log is broken #767

Closed
opened 2026-03-28 04:28:19 +00:00 by mfreeman451 · 0 comments
Owner

Imported from GitHub.

Original GitHub issue: #2343
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2343
Original created: 2026-01-18T08:59:55Z


Describe the bug

warning: a map with atom keys was given to a form. Maps are always considered parameters and therefore must have string keys, got: %{name: "", attribute_value: "", service_name: "", severity_text: "", attribute_enabled: false, attribute_key: "", auto_alert: false, body_contains: "", body_contains_enabled: false, parsed_attributes: %{}, service_name_enabled: false, severity_enabled: false}                                                                                                                                                                            (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:106: Phoenix.HTML.FormData.Map.name_params_and_opts/2                                                                                   (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:82: Phoenix.HTML.FormData.Map.to_form/2                                                                                                 (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:30: ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.mount/1                              (phoenix_live_view 1.1.19) lib/phoenix_live_view/utils.ex:379: Phoenix.LiveView.Utils.maybe_call_live_component_mount!/2                                                                   (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:835: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6                                                          (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3                                                                                                                                                                                                                                                                                                               warning: a map with atom keys was given to a form. Maps are always considered parameters and therefore must have string keys, got: %{name: "-info-101", attribute_value: "", service_name: "", severity_text: "INFO", attribute_enabled: false, attribute_key: "", auto_alert: false, body_contains: "ProcessBatch called", body_contains_enabled: true, parsed_attributes: %{"attributes" => %{"message_count" => "1"}, "resource" => %{"service.name" => "serviceradar-db-event-writer", "service.version" => "1.0.0"}, "scope" => "db-writer-service"}, service_name_enabled: true, severity_enabled: true}                                                                                                                                                                (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:106: Phoenix.HTML.FormData.Map.name_params_and_opts/2                                                                                   (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:82: Phoenix.HTML.FormData.Map.to_form/2                                                                                                 (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:80: ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.update/2                             (phoenix_live_view 1.1.19) lib/phoenix_live_view/utils.ex:502: Phoenix.LiveView.Utils.maybe_call_update!/3                                                                                 (elixir 1.19.4) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2                                                                                                                           (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:859: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6
                                                                                                                                                                                           08:58:19.058 [error] GenServer #PID<0.6933.0> terminating                                                                                                                                  ** (ArgumentError) argument error                                                                                                                                                              :erlang.not(nil)                                                                                                                                                                           (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:213: anonymous fn/3 in ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.render/1          (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:420: Phoenix.LiveView.Diff.traverse/6                                                                                             (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6                                                                   (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3                                                                                                                      (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:419: Phoenix.LiveView.Diff.traverse/6                                                                                             (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6                                                                   (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3                                                                                                                  Process Label: {Phoenix.LiveView, ServiceRadarWebNGWeb.LogLive.Show, "lv:phx-GIvHitmP7Alu1KEB"}                                                                                            Last message: %Phoenix.Socket.Message{topic: "lv:phx-GIvHitmP7Alu1KEB", event: "event", payload: %{"event" => "open_rule_builder", "type" => "click", "value" => %{"value" => ""}}, ref: "1
3", join_ref: "12"}
08:58:23.071 [info] Plug.SSL is redirecting GET / to https://staging.serviceradar.cloud with status 301

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Imported from GitHub. Original GitHub issue: #2343 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/2343 Original created: 2026-01-18T08:59:55Z --- **Describe the bug** ``` warning: a map with atom keys was given to a form. Maps are always considered parameters and therefore must have string keys, got: %{name: "", attribute_value: "", service_name: "", severity_text: "", attribute_enabled: false, attribute_key: "", auto_alert: false, body_contains: "", body_contains_enabled: false, parsed_attributes: %{}, service_name_enabled: false, severity_enabled: false} (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:106: Phoenix.HTML.FormData.Map.name_params_and_opts/2 (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:82: Phoenix.HTML.FormData.Map.to_form/2 (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:30: ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.mount/1 (phoenix_live_view 1.1.19) lib/phoenix_live_view/utils.ex:379: Phoenix.LiveView.Utils.maybe_call_live_component_mount!/2 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:835: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6 (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 warning: a map with atom keys was given to a form. Maps are always considered parameters and therefore must have string keys, got: %{name: "-info-101", attribute_value: "", service_name: "", severity_text: "INFO", attribute_enabled: false, attribute_key: "", auto_alert: false, body_contains: "ProcessBatch called", body_contains_enabled: true, parsed_attributes: %{"attributes" => %{"message_count" => "1"}, "resource" => %{"service.name" => "serviceradar-db-event-writer", "service.version" => "1.0.0"}, "scope" => "db-writer-service"}, service_name_enabled: true, severity_enabled: true} (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:106: Phoenix.HTML.FormData.Map.name_params_and_opts/2 (phoenix_html 4.3.0) lib/phoenix_html/form_data.ex:82: Phoenix.HTML.FormData.Map.to_form/2 (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:80: ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.update/2 (phoenix_live_view 1.1.19) lib/phoenix_live_view/utils.ex:502: Phoenix.LiveView.Utils.maybe_call_update!/3 (elixir 1.19.4) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:859: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6 08:58:19.058 [error] GenServer #PID<0.6933.0> terminating ** (ArgumentError) argument error :erlang.not(nil) (serviceradar_web_ng 0.1.0) lib/serviceradar_web_ng_web/components/promotion_rule_builder.ex:213: anonymous fn/3 in ServiceRadarWebNGWeb.Components.PromotionRuleBuilder.render/1 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:420: Phoenix.LiveView.Diff.traverse/6 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6 (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:419: Phoenix.LiveView.Diff.traverse/6 (phoenix_live_view 1.1.19) lib/phoenix_live_view/diff.ex:609: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_dynamic/6 (elixir 1.19.4) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 Process Label: {Phoenix.LiveView, ServiceRadarWebNGWeb.LogLive.Show, "lv:phx-GIvHitmP7Alu1KEB"} Last message: %Phoenix.Socket.Message{topic: "lv:phx-GIvHitmP7Alu1KEB", event: "event", payload: %{"event" => "open_rule_builder", "type" => "click", "value" => %{"value" => ""}}, ref: "1 3", join_ref: "12"} 08:58:23.071 [info] Plug.SSL is redirecting GET / to https://staging.serviceradar.cloud with status 301 ``` **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar#767
No description provided.