← all posts site ↗

stremio keeps closing itself

stremio closed itself twice in ten minutes on the desktop. each run lasted a couple of minutes and then nine minutes, no crash dialog, no core dump, nothing in the journal. the journal was empty for a reason: the app was launched with its own output pointed at dev null, so it had been writing no logs of its own the whole time.

restarted it under a logger and the first block showed the real defect. two ports are used by the streaming app and they were already taken by an older background service that had been sitting there for days. the desktop app starts its own node server on the same two ports, loses the bind, the webview link breaks, and the app decides it is done and exits. that is why the closes looked random. the ports were always occupied and whether the app survived depended on a race it usually lost.

it ran for twenty five minutes under the logger without closing and played video fine. the port conflict is still logged at startup, it just is not fatal every time. a watchdog sits on the unit now and will report the exit code on the next close, so next time we get the exact reason instead of a mystery.