Owens

Owens

Hello all,

I’m getting this error in LiveView, even when the referenced html.leex file in the error is empty!

There was a call to RocketshipWeb.Router.Helpers.chat_show_path/3 but then I changed it to RocketshipWeb.Router.Helpers.chat_show_path/4 and the error message stayed. Then I deleted everything in the html.leex file and still the same error message.

Thanks for any help.

[error] #PID<0.609.0> running RocketshipWeb.Endpoint (connection #PID<0.579.0>, stream id 6) terminated
Server: localhost:4000 (http)
Request: GET /programs/62/chats/14
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function RocketshipWeb.Router.Helpers.chat_show_path/3 is undefined or private
        (rocketship 0.1.0) RocketshipWeb.Router.Helpers.chat_show_path(#Phoenix.LiveView.Socket<assigns: #Phoenix.LiveView.Socket.AssignsNotInSocket<>, changed: %{chat: true, page_title: true}, endpoint: RocketshipWeb.Endpoint, id: "phx-Fke9HKBk7TDsPwLh", parent_pid: nil, root_pid: nil, router: RocketshipWeb.Router, view: RocketshipWeb.ChatLive.Show, ...>, :edit, %Rocketship.Chats.Chat{__meta__: #Ecto.Schema.Metadata<:loaded, "chats">, chats_users: #Ecto.Association.NotLoaded<association :chats_users is not loaded>, cohort: #Ecto.Association.NotLoaded<association :cohort is not loaded>, cohort_id: 2, id: 14, inserted_at: ~N[2020-11-14 15:00:00], is_pinned: false, last_message: nil, name: "Encubay Cohort 1", organization: #Ecto.Association.NotLoaded<association :organization is not loaded>, organization_id: 2, parent_organization: #Ecto.Association.NotLoaded<association :parent_organization is not loaded>, parent_organization_id: 1, team: #Ecto.Association.NotLoaded<association :team is not loaded>, team_id: nil, type: "Cohort", updated_at: ~N[2020-11-14 15:00:00], users: #Ecto.Association.NotLoaded<association :users is not loaded>})
        (rocketship 0.1.0) lib/rocketship_web/live/chat_live/show.html.leex:36: anonymous fn/2 in RocketshipWeb.ChatLive.Show.render/1
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/diff.ex:303: Phoenix.LiveView.Diff.traverse/6
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/diff.ex:377: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/6
        (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/diff.ex:303: Phoenix.LiveView.Diff.traverse/6
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/diff.ex:111: Phoenix.LiveView.Diff.render/3
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/static.ex:284: Phoenix.LiveView.Static.to_rendered_content_tag/4
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/static.ex:144: Phoenix.LiveView.Static.render/3
        (phoenix_live_view 0.14.8) lib/phoenix_live_view/controller.ex:35: Phoenix.LiveView.Controller.live_render/3
        (phoenix 1.5.6) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2
        (rocketship 0.1.0) lib/rocketship_web/endpoint.ex:1: RocketshipWeb.Endpoint.plug_builder_call/2
        (rocketship 0.1.0) lib/plug/debugger.ex:132: RocketshipWeb.Endpoint."call (overridable 3)"/2
        (rocketship 0.1.0) lib/rocketship_web/endpoint.ex:1: RocketshipWeb.Endpoint.call/2
        (phoenix 1.5.6) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4
        (cowboy 2.8.0) /Users/Owens/Code/Elixir/rocketship/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.8.0) /Users/Owens/Code/Elixir/rocketship/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
        (cowboy 2.8.0) /Users/Owens/Code/Elixir/rocketship/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3
        (stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

UPDATE: The issue was I renamed the html.leex to html.slimleex to use the slime engine before deleting the contents. Somehow it appears the contents from the html.leex template was stuck in memory? Because when I renamed it back to html.leex with no contents the problem went away (the page loaded without error and was empty). But now I can’t get anything to save when the file type is html.slimleex, even though I have another file in the directory with html.slimleex that updates fine…

Any help or thoughts here greatly appreciated.

Showing Posts 1 to 4

Owens

Owens OP

Strangely. Closing Chrome and everything, as well as restarting my computer fixed this.

axelson

axelson

Scenic Core Team

If I recall correctly I’ve fixed a similar error in the past by restarting the phoenix server (or maybe I had to run mix clean also).

LostKobrakai

LostKobrakai

Template changes are tracked with the ˋ@external_resourceˋ module attribute, which uses paths to reference the external file.

Owens

Owens OP

Restarting the phoenix server didn’t fix it for me. Only going back to the leex extension instead of slimleex or staying with the slimleex extension and completely restarting my computer and Chrome browser.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews