dillonoconnor
How do I log something to inspect? (And getting a (Phoenix.Router.NoRouteError) error)
Playing around with hologram for the first time and I have 2 initial questions / concerns:
(1) How do I log something to inspect? Do I need the ceremony of creating an action to do so?
Edit: it looks like IO.inspect works directly. I’m not exactly sure why my session data is empty, though.
(2) Pages are working but my logs are constantly emitting the following warning. How to address?
(Phoenix.Router.NoRouteError) no route found for GET /deps/hologram/assets/node_modules/snabbdom/src/vnode.ts
and sometimes:
(Phoenix.Router.NoRouteError) no route found for GET /hologram/runtime-d374f1e10420e534ae083f70d04d55da.js
Thank you in advance!
Marked As Solved
bartblast
You just do IO.inspect("something") and check the output in the browser console.
You can safely ignore this. More details here:
https://github.com/bartblast/hologram/issues/275
The problem will be resolved once Snabbdom is vendored (which is planned to eliminate the Node/npm dependencies).
Also Liked
dillonoconnor
Thanks @bartblast. Is my session supposed to be prepopulated? I saw that Server.from(conn) appears to extract it, but I’m not having success finding my authenticated ”user”. Only some CSRF tokens in there.
dillonoconnor
I figured it out (again
). I’m using ash_authentication which apparently works by injecting ephemeral data into the session value within an ash_authentication_live_session, i.e. it doesn’t actually store the values in the cookie–see the source code for generate_session. I inspected the session on a route outside of the live session and only saw the user_token as we observed on the Hologram page. Apologies, I am new-ish to Ash and am still learning a lot about the ecosystem.
As Hologram pages define their own routes, I’m not so sure if it’s possible to take advantage of the generated session data from Ash. More to look into ![]()







