[GH-ISSUE #5052] [Issue]: Windows launcher skips auto-update when snapshot copies capability-package junction #2795

Closed
opened 2026-10-21 05:55:38 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mro1229 on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5052

Originally assigned to: @SpicyMarinara on GitHub.

Summary

On Windows, the launcher cannot create its pre-update data snapshot when DATA_DIR/capability-packages/node_modules is a junction. The snapshot fails with EPERM, causing every pending automatic update to be skipped.

Expected behavior

The launcher should successfully protect the user data and continue with the automatic update.

Generated runtime links such as capability-packages/node_modules should either be excluded from the snapshot or copied in a way that does not require elevated symbolic-link privileges on Windows.

Actual behavior

When an update is available, scripts/protect-launcher-data.mjs snapshot recursively copies the default data directory. It encounters the generated junction:

packages/server/data/capability-packages/node_modules
→ packages/server/node_modules

Node attempts to recreate this link inside .marinara-engine-update-backups, but a normally launched, non-elevated process receives EPERM. The launcher then skips the update to protect the user data.

Marinara still starts, but it remains on the old commit and repeats the same error on every launch while an update is pending.

Steps to reproduce

  1. Use an installer-based Windows checkout with at least one capability package that causes packages/server/data/capability-packages/node_modules to be created as a junction.
  2. Ensure that a newer commit is available on the selected update channel.
  3. Start Marinara normally through MarinaraLauncher.exe, without elevation.
  4. Observe that snapshot creation fails and the automatic update is skipped.

The snapshot failure can also be reproduced directly from the repository root in a non-elevated terminal:

node scripts/protect-launcher-data.mjs snapshot

Environment

  • Marinara Engine version: 2.4.0 staging, commit 2f75eeed9
  • Pending staging target when reproduced: a1043b57b
  • Install type: Windows installer-created Git checkout
  • Windows Installed Apps entry: 2.1.1
  • OS + version: Windows 11 Pro 25H2, build 26200.9168, x64
  • Node.js: 24.18.0
  • pnpm: 10.33.2 through Corepack
  • Browser or app shell: MarinaraLauncher.exe; Firefox is the default browser, but the failure occurs before the browser is relevant

Logs, screenshots, or video

[..] Aligning pnpm to 10.33.2 via Corepack...
[..] Checking for updates...
[ERROR] Could not protect launcher data: EPERM: operation not permitted, symlink 'C:\Users\Max_8\AppData\Local\Marinara-Engine\packages\server\node_modules' -> 'C:\Users\Max_8\AppData\Local\.marinara-engine-update-backups\.incomplete-update-2026-08-15T08-52-03-132Z-37148\data\capability-packages\node_modules'
[WARN] Could not create an update snapshot. Skipping auto-update to protect your data.
[OK] Node.js found:
v24.18.0
[OK] pnpm 10.33.2 ready

Additional context

The application itself continues to start, and no user-data loss was observed. However, automatic Engine updates remain blocked.
Running the launcher as Administrator or enabling Windows Developer Mode may allow link creation and serves as a temporary workaround. Permanently running the server elevated is not desirable.
pnpm check passes successfully on the affected checkout using the pinned pnpm 10.33.2, including localization checks, TypeScript, ESLint, and the complete client/server build.
The likely fix is to exclude the generated capability-packages/node_modules junction from launcher data snapshots. It contains runtime dependencies rather than unique user data and is recreated by the capability-module runtime.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • [] I DID NOT read this template and provide the requested details.
Originally created by @mro1229 on GitHub (Aug 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5052 Originally assigned to: @SpicyMarinara on GitHub. ## Summary On Windows, the launcher cannot create its pre-update data snapshot when `DATA_DIR/capability-packages/node_modules` is a junction. The snapshot fails with `EPERM`, causing every pending automatic update to be skipped. ## Expected behavior The launcher should successfully protect the user data and continue with the automatic update. Generated runtime links such as `capability-packages/node_modules` should either be excluded from the snapshot or copied in a way that does not require elevated symbolic-link privileges on Windows. ## Actual behavior When an update is available, `scripts/protect-launcher-data.mjs snapshot` recursively copies the default data directory. It encounters the generated junction: `packages/server/data/capability-packages/node_modules` → `packages/server/node_modules` Node attempts to recreate this link inside `.marinara-engine-update-backups`, but a normally launched, non-elevated process receives `EPERM`. The launcher then skips the update to protect the user data. Marinara still starts, but it remains on the old commit and repeats the same error on every launch while an update is pending. ## Steps to reproduce 1. Use an installer-based Windows checkout with at least one capability package that causes `packages/server/data/capability-packages/node_modules` to be created as a junction. 2. Ensure that a newer commit is available on the selected update channel. 3. Start Marinara normally through `MarinaraLauncher.exe`, without elevation. 4. Observe that snapshot creation fails and the automatic update is skipped. The snapshot failure can also be reproduced directly from the repository root in a non-elevated terminal: `node scripts/protect-launcher-data.mjs snapshot` ## Environment - Marinara Engine version: 2.4.0 staging, commit `2f75eeed9` - Pending staging target when reproduced: `a1043b57b` - Install type: Windows installer-created Git checkout - Windows Installed Apps entry: 2.1.1 - OS + version: Windows 11 Pro 25H2, build 26200.9168, x64 - Node.js: 24.18.0 - pnpm: 10.33.2 through Corepack - Browser or app shell: `MarinaraLauncher.exe`; Firefox is the default browser, but the failure occurs before the browser is relevant ## Logs, screenshots, or video ```text [..] Aligning pnpm to 10.33.2 via Corepack... [..] Checking for updates... [ERROR] Could not protect launcher data: EPERM: operation not permitted, symlink 'C:\Users\Max_8\AppData\Local\Marinara-Engine\packages\server\node_modules' -> 'C:\Users\Max_8\AppData\Local\.marinara-engine-update-backups\.incomplete-update-2026-08-15T08-52-03-132Z-37148\data\capability-packages\node_modules' [WARN] Could not create an update snapshot. Skipping auto-update to protect your data. [OK] Node.js found: v24.18.0 [OK] pnpm 10.33.2 ready ``` ## Additional context The application itself continues to start, and no user-data loss was observed. However, automatic Engine updates remain blocked. Running the launcher as Administrator or enabling Windows Developer Mode may allow link creation and serves as a temporary workaround. Permanently running the server elevated is not desirable. pnpm check passes successfully on the affected checkout using the pinned pnpm 10.33.2, including localization checks, TypeScript, ESLint, and the complete client/server build. The likely fix is to exclude the generated capability-packages/node_modules junction from launcher data snapshots. It contains runtime dependencies rather than unique user data and is recreated by the capability-module runtime. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:55:38 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 15, 2026):

I’m taking this one. I’ll keep the launcher snapshot fix focused on excluding the generated capability-package runtime junction, add a regression for the Windows failure mode, and submit it against staging.

<!-- gh-comment-id:5302574653 --> @SpicyMarinara commented on GitHub (Aug 15, 2026): I’m taking this one. I’ll keep the launcher snapshot fix focused on excluding the generated capability-package runtime junction, add a regression for the Windows failure mode, and submit it against staging.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2795
No description provided.