Picolab / pico-engine

An implementation of the pico-engine hosted on node.js
http://picolabs.io/
MIT License
43 stars 8 forks source link

developer UI becomes useless for unknown reasons #493

Open b1conrad opened 3 years ago

b1conrad commented 3 years ago

The pico-engine seems to degrade (at least in the developer UI) when ctx:query has been used.

Workaround is to avoid its use until this is diagnosed and fixed. It’s possible that wrangler:skyQuery could be used as a replacement (although its implementation is slated to use ctx:query when possible (currently it uses http:get)).

I haven't been able to produce a small triggering bit of code, but do have a snapshot of the PICO_ENGINE_HOME folder after it has occurred. Starting the pico-engine from this point shows the defects in the UI. These are picos with no rulesets and no channels (even though they had some of both before the incident).

b1conrad commented 3 years ago

No, it's likely not ctx:query; that's just what I had been working with when the incident occurred. It has happened since. Restarting the engine and waiting and then starting it again and the rulesets and channels are back.

Seems to be a UI failure. Next time it happens, I will check the browser console.

b1conrad commented 3 years ago

enginebug

b1conrad commented 3 years ago

Noticed this: when visiting a tab that displays in this way (i.e. "no rulesets" or "no channels" etc.) the pico-engine console displays no messages at all. No error message. No entries that indicate that the pico-engine received a query from the UI.

How does the UI, running in the browser, get the information it needs? It must be from the engine. Yet no query is logged. How does it reach the engine? Does it use localhost:3000 or does it use an IP address? Perhaps this happens when localhost is assigned a different IP address?

b1conrad commented 3 years ago

Screen Shot 2020-12-26 at 6 05 44 AM

b1conrad commented 3 years ago

Doing one of the queries manually in the browser, .../sky/cloud/ckj212eyb0007gn2rd0tq2u4h/io.picolabs.pico-engine-ui/box, it just spins. It's like the engine isn't running any more