hyperfiddle

Dustin Getz (Hyperfiddle) 2025-03-16T15:37:06.080989Z

Published new Electric snapshot, no known breaking changes • fixed a regression where dom/On can throw "uninitialized flow"

👍 5
oλv 2025-03-19T12:10:46.139069Z

Hello I’m not sure if it’s related, but I’m getting “uninitialized flow” errors today 🤔

(e/defn Node [node]
  (e/client 
    (assoc node :question
           #_(dom/text (:question node)) ;; Works as expected
           #_(Input* (:question node)) ;; Error: Uninitialized flow.
           #_(Input (:question node))  ;; Error: Uninitialized flow.
           (dom/input                ;; Error: Uninitialized flow.
             (:value (dom/props
                      {:value
                       (dom/On "change"
                               #(-> % .-target .-value)
                               (:question node))})))
           )))
(reset! !graph (Node (e/watch !graph)))

👀 1
Dustin Getz (Hyperfiddle) 2025-03-19T12:15:57.967619Z

That's concerning, are you able to provide a minimal repro?

oλv 2025-03-19T12:16:21.503169Z

Let me try :^)

Dustin Getz (Hyperfiddle) 2025-03-19T12:16:29.300669Z

ty

Dustin Getz (Hyperfiddle) 2025-03-19T12:58:14.039329Z

thanks

Dustin Getz (Hyperfiddle) 2025-03-19T21:45:01.175709Z

i shared your minimal repro with the team and they accept the issue, im a little fuzzy on the details, will share more tomorrow

👍 1
Dustin Getz (Hyperfiddle) 2025-03-19T23:51:29.992459Z

In your minimal repro, the initial value of node is (e/amb) i.e. Pending (the client atom is not even constructed yet, because the initial value is on the server and must transfer). This is the root cause of the issue, and you can use this knowledge to construct a workaround. However, it shouldn't crash, we are considering how to change dom/On to prevent this crash

oλv 2025-03-19T23:52:29.601709Z

Thanks!