mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6153] Restart Server refuses to work when Marinara was started with start-local.bat #3426
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3426
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6153
Originally assigned to: @SpicyMarinara on GitHub.
Restarting the server from Settings does nothing when Marinara was launched with
start-local.bat, the "Local Build Launcher" that ships in the repo root. Instead of restarting, a red error appears saying restart is unavailable for an unmanaged server and telling you to use a platform launcher, even though you did use a launcher from the repo. Every other launcher in the tree (start.bat, start.sh, start-termux.sh) andpnpm startrestart normally.How to reproduce (try it yourself)
ac14dd704, runpnpm installthenpnpm build.start-local.batdoes at its line 186. On Windows, just double clickstart-local.batin the repo root and wait for it to build and print its ready banner. On any OS you can run the same thing by hand:cd packages/server, thenPORT=7906 HOST=127.0.0.1 DATA_DIR=/tmp/marinara-probe node dist/index.js(any free port and any throwaway data folder). The gate is not Windows specific, so this reproduces on Linux in under a minute.http://127.0.0.1:7906, go to Settings, Advanced, click Restart Server, and confirm.What you'll see: a red toast reading "Restart is unavailable for an unmanaged server. Start Marinara with its platform launcher or pnpm start; restart a development watcher from its terminal." The server keeps running with the same process ID and nothing restarts. The same thing happens over the API:
curl -X POST http://127.0.0.1:7906/api/admin/restart -H 'Content-Type: application/json' -d '{"confirm":true}'returns HTTP 409 with that message, and/api/healthstill answers 200 from the same process seconds later.What should happen: the server restarts, the same as it does under start.bat, start.sh, start-termux.sh or
pnpm start.node ../../scripts/run-server.mjs dist/index.jsfrompackages/server, which is whatstart.batline 406 runs. The identical restart request now returns HTTP 202{"status":"restarting"}, the process ID changes, and the app comes back.One note while testing: a second restart request in the same process returns a different 409 saying a restart is already scheduled, so read the error text and not just the status code.
Where it is
start-local.bat:185-186:cd packages\serverthennode dist/index.js.start.bat:406,start.sh:445,start-termux.sh:711, plus thestartscripts inpackage.json:25andpackages/server/package.json:13: all runscripts/run-server.mjs.packages/server/src/routes/admin.routes.ts:81-87: the restart handler's 409 gate.scripts/run-server.mjs:26: the only place that setsMARINARA_RESTART_SUPERVISOR.scripts/regressions/restart-supervisor.regression.ts:89-91: the launcher check, which lists onlystart.sh,start.bat,start-termux.sh.What's happening
The restart route only proceeds when
MARINARA_RESTART_SUPERVISORmatches the parent process ID, which proves a supervisor is watching and can bring the server back up. Onlyscripts/run-server.mjssets that variable.start-local.batstill launchesnode dist/index.jsdirectly, so the variable is absent and the route returns 409. The regression lane that pins launchers to the supervisor never listsstart-local.bat, so it passes and the gap stays invisible.Suggested fix
Either bring
start-local.batin line with its siblings by changing line 186 tonode ../../scripts/run-server.mjs dist/index.js, matchingstart.bat:406, and addstart-local.batto the launcher list inscripts/regressions/restart-supervisor.regression.ts:89so the lane covers it. Or settle the open question atdocs/development/code-cleanup-audit.md:242and delete the file, so no launcher in the tree sits behind the gate. Either way, the regression lane would be sturdier if it derived its launcher list from the launcher scripts present in the repo root instead of a hardcoded list of three, otherwise the next launcher added is exempt from the restart contract by default.Context
PR #5962, which closed issue #5934 (restart leaving orphaned servers), moved restart ownership to a supervisor and rewired every launcher except this one. Before that PR the route respawned itself, so Restart Server did work under
start-local.bat, which makes this a small behavior regression for source checkout users. PR #6137 touchedscripts/run-server.mjs, the restart supervisor regression anddocs/TROUBLESHOOTING.md, but neverstart-local.bator the admin route, so the behavior is unchanged. Unreleased on staging (latest release is v2.4.4). Worth noting thatdocs/TROUBLESHOOTING.md:243already says directnoderuns are not automatically replaced, so the rule itself is documented; this is a launcher consistency gap, not a hidden rule. Nothing shipped points users atstart-local.bat(the installer and its shortcuts all targetstart.bat), but the file is present in every source install next to the supported launcher.Found by an AI-assisted sweep and re-verified against staging
ac14dd704on 2026-09-13. Please verify before fixing.@SpicyMarinara commented on GitHub (Sep 13, 2026):
Codex is addressing this report on behalf of @SpicyMarinara in draft PR #6168 as part of the requested issue sweep. I will verify the reported path against staging and preserve existing behavior outside the narrow fix.