mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-19 08:33:56 -06:00
`if serverEnabled then` demands a genuine Boolean in BrightScript. ServerEnabled()
was declared As Boolean but branched on type() over ParseJSON output - "Boolean",
"Integer", "roInt", "String" - and none of those reliably produced one for a JSON 1.
The device took the whole file down with it:
Script runtime error: Type Mismatch. (runtime error &h18) in SSD:/autorun.brs(63)
Load or runtime error in autorun. Forcing recovery.
...and then looped through recovery, re-fetching autorun.zip - which contained the
same broken file, so recovery could not recover.
ServerEnabledFlag() returns 0 or 1 and the call sites compare explicitly. It finds
the setting by substring rather than by parsing, which is cruder and can be fooled
by a "server" key inside another string, but cannot mismatch a type. There is no
BrightScript interpreter on the machine this is written on, so every type guess
costs a boot cycle plus a recovery loop; a config file we write ourselves does not
justify that risk. Anything short of a clear yes stays a player.
Verified on XT245 URD3C6000823: clean boot, no runtime error, server up on :8181
45s after reboot, diagnostics screen showing the setup address.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014kfhrUPit5MCqxeTQyqr56
|
||
|---|---|---|
| .. | ||
| autorun.brs | ||
| bs-payload-install.js | ||
| bs-server-boot.js | ||
| node-server.html | ||
| server.env.example | ||
| st-config.example.json | ||