mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7173] [Issue]: Marinara Engine server crashes when accessed remotely through a browser #4004
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#4004
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 @SpicyMarinara on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7173
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Accessing Marinara Engine through a browser on a PC causes the Termux-hosted server to crash, making remote use unavailable. The crash occurs while processing a background image thumbnail because the sharp dependency cannot load.
Expected behavior
Marinara Engine should remain running and be usable remotely through a browser on a PC.
Actual behavior
The Marinara Engine server exits with status 1 when a background image request is processed. Image processing fails because sharp cannot load, including a missing @emnapi/runtime module.
Steps to reproduce
Environment
Logs, screenshots, or video
Relevant errors:
TypeError: sharp.libvipsVersion is not a function;Image processing is unavailable on this platform (native 'sharp' module could not be loaded);Error: Cannot find module '@emnapi/runtime'from@img/sharp-wasm32;Marinara Engine server exited with status 1. No screenshots or video provided.Additional context
The user reports that the normal automatic installation/update process handled the dependencies and that they did not manually modify the installation. Support diagnostics showed the server became unreachable after the crash. Client OS: Android 16; GPU: Adreno (TM) 840; active connection: Mimo through openrouter.
Discord thread: ME Crashes when accessed through pc
Discord thread link: https://discord.com/channels/1417099416812392641/1557101289400442973
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)
Discord thread transcript (10 messages)
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Oct 6, 2026):
Claude is taking this issue for @SpicyMarinara. I checked for linked, open and draft PRs first; none exist. The fix will target
staging.Cause found so far (a v2.5.0 regression):
sharphas no native build, so it falls back to@img/sharp-wasm32, which loads@emnapi/runtimewhen it starts. v2.5.0 moved@img/sharp-wasm32fromoptionalDependenciestodependencies(#6885). pnpm does not link@emnapi/runtimeinto that package's ownnode_modules. On a desktop install it is still found through pnpm's hoisted copy, but on this device it is not, so the fallback fails.try/catcharoundimport("sharp")ingetSharp(). It becomes an unhandled rejection, andpackages/server/src/index.tsexits on those. The first image request (the background thumbnail the browser loads on open) therefore kills the whole server, when it should only disable image processing.Next: reproduce a Termux-style install on desktop, confirm the install fix, make a broken image library non-fatal, and add a regression that covers both.
@SpicyMarinara commented on GitHub (Oct 6, 2026):
Root cause confirmed by reproducing the Termux install on desktop with pnpm 10.34.5, forcing sharp's WebAssembly fallback:
@img/sharp-wasm32was optional, so pnpm recorded its helper@emnapi/runtimeas skipped innode_modules/.modules.yaml.pnpm install --frozen-lockfilewithout--force, which never clears that stale skipped entry, so@emnapi/runtimeis never installed.--force, which is why some users are not affected.getSharp()cannot catch, and the server exits on unhandled rejections.Workaround for affected Termux installs (verified on a copy of the broken state):
Deleting
.modules.yamldrops pnpm's stale skipped list. The install then adds only@emnapi/runtimefrom the local store, with no other downloads. Runningpnpm install --frozen-lockfilealone does not fix it.The fix PR makes
@emnapi/runtimea direct server dependency, which repairs fresh installs, updates from 2.4.6 and already-broken trees on the next update. It also makes a failed image-library start disable image processing instead of stopping the server.