mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #892] [MERGED] Fix startup port collision handling #4825
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#4825
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/892
Author: @cha1latte
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @cha1latte
Base:
staging← Head:fix/issue-890-port-collision📝 Commits (1)
0908af5fix startup port collision handling📊 Changes
4 files changed (+67 additions, -1 deletions)
View changed files
📝
packages/server/src/index.ts(+13 -1)➕
scripts/check-port-available.mjs(+44 -0)📝
start.bat(+6 -0)📝
start.sh(+4 -0)📄 Description
Linked issue
Closes #890
Why this change
7860, which is also a common local image-generation port. When that port is already occupied, startup previously fell through to a rawEADDRINUSEpath, and the launch scripts could still schedule the browser open before confirming Marinara had bound the port.What changed
PORTis available before the browser-open step runs.start.shandstart.batso occupied ports print a clear recovery message instead of opening the browser to another local service.EADDRINUSElog message for users who bypass the launch scripts.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
scratch/issue-890-port-repro.mjs --expect=before, which binds7860first and then starts the Marinara server path. Before the fix, startup exited with rawEADDRINUSEand no recovery hint.scratch/issue-890-port-repro.mjs --expect=after --out=scratch/issue-890-after-server.txt; it now prints a clear "Port 7860 is already in use" recovery message.scratch/issue-890-port-repro.mjs --expect=after --target=preflight --out=scratch/issue-890-after-preflight.txt; it exits before the banner/browser-open step and tells the user how to choose another port.7869gets the same recovery message, and invalidPORTexits with a numeric range error.pnpm checkpassed locally in the issue worktree.Docs and release impact
No docs or version files changed. This PR intentionally does not change Marinara's canonical default port; it only makes occupied-port startup truthful and recoverable.
UI evidence (if applicable)
Not applicable; this is command/startup behavior. Codex captured visual proof of the command output locally at
scratch/issue-890-after-preflight.png.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.