[GH-ISSUE #3997] [Issue]: Update snapshot fails with ERR_INVALID_URL_SCHEME on staging #2157

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

Originally created by @SpicyMarinara on GitHub (Jul 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3997

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Restarting Marinara Engine on the staging branch consistently fails to create an update snapshot because protect-launcher-data.mjs passes a non-file URL to fileURLToPath.

Expected behavior

Marinara Engine should create the update snapshot, check for updates, and start normally.

Actual behavior

The update snapshot process throws ERR_INVALID_URL_SCHEME and skips auto-update to protect existing data. Node.js and pnpm initialization continue successfully.

Steps to reproduce

  1. Use the staging branch at release v2.3.4, build 2d23b0b.
  2. Restart the Marinara Engine server with a fresh staging branch.
  3. Wait for the launcher to align pnpm and check for updates.
  4. Observe the ERR_INVALID_URL_SCHEME exception from protect-launcher-data.mjs.

Environment

  • Marinara Engine version: Staging branch, release v2.3.4, build 2d23b0b
  • Install type: Not provided
  • OS + version: Windows, version not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

[..] Aligning pnpm to 10.33.2 via Corepack...
[..] Checking for updates...
node:internal/url:1608
throw new ERR_INVALID_URL_SCHEME('file');
^

TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
at fileURLToPath (node:internal/url:1608:11)
at file:///D:/Users/AgentX/AppData/Local/MarinaraEngine/scripts/protect-launcher-data.mjs:161:59
at ModuleJob.run (node:internal/modules/esm/module_job:437:25)
at async node:internal/modules/esm/loader:639:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
code: 'ERR_INVALID_URL_SCHEME'
}

Node.js v24.15.0
[WARN] Could not create an update snapshot. Skipping auto-update to protect your data.
[OK] Node.js found: v24.15.0
[OK] pnpm 10.33.2 ready

Additional context

The error occurs consistently after several restarts. Marinara Engine was working before the restart performed to obtain a fresh staging branch. It is unclear whether the issue is staging-specific or caused by the local system.

Discord message: Discord message from AgentX
Discord message link: https://discord.com/channels/1417099416812392641/1528844323011956847/1529909435122847795
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord message transcript (1 message)
[2026-07-23T17:53:53.676Z] AgentX: I'm on Staging branch
Release: v2.3.4
Build: 2d23b0b

I just restarted my ME server so I can test the new staging changes, I'm getting the below error. I've restarted a few times and it's constant error. Not sure if it's related to staging or if something broke on my local system (ME was working fine before I restarted to get a fresh staging branch)
` ` `
 [..] Aligning pnpm to 10.33.2 via Corepack...
 [..] Checking for updates...
node:internal/url:1608
    throw new ERR_INVALID_URL_SCHEME('file');
          ^

TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
    at fileURLToPath (node:internal/url:1608:11)
    at file:///D:/Users/AgentX/AppData/Local/MarinaraEngine/scripts/protect-launcher-data.mjs:161:59
    at ModuleJob.run (node:internal/modules/esm/module_job:437:25)
    at async node:internal/modules/esm/loader:639:26
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
  code: 'ERR_INVALID_URL_SCHEME'
}

Node.js v24.15.0
 [WARN] Could not create an update snapshot. Skipping auto-update to protect your data.
 [OK] Node.js found:
v24.15.0
 [OK] pnpm 10.33.2 ready
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1528844323011956847/1529909435122847795]

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 @SpicyMarinara on GitHub (Jul 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3997 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Restarting Marinara Engine on the staging branch consistently fails to create an update snapshot because protect-launcher-data.mjs passes a non-file URL to fileURLToPath. ## Expected behavior Marinara Engine should create the update snapshot, check for updates, and start normally. ## Actual behavior The update snapshot process throws ERR_INVALID_URL_SCHEME and skips auto-update to protect existing data. Node.js and pnpm initialization continue successfully. ## Steps to reproduce 1. Use the staging branch at release v2.3.4, build 2d23b0b. 2. Restart the Marinara Engine server with a fresh staging branch. 3. Wait for the launcher to align pnpm and check for updates. 4. Observe the ERR_INVALID_URL_SCHEME exception from protect-launcher-data.mjs. ## Environment - Marinara Engine version: Staging branch, release v2.3.4, build 2d23b0b - Install type: Not provided - OS + version: Windows, version not provided - Browser or app shell: Not provided ## Logs, screenshots, or video [..] Aligning pnpm to 10.33.2 via Corepack... [..] Checking for updates... node:internal/url:1608 throw new ERR_INVALID_URL_SCHEME('file'); ^ TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file at fileURLToPath (node:internal/url:1608:11) at file:///D:/Users/AgentX/AppData/Local/MarinaraEngine/scripts/protect-launcher-data.mjs:161:59 at ModuleJob.run (node:internal/modules/esm/module_job:437:25) at async node:internal/modules/esm/loader:639:26 at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) { code: 'ERR_INVALID_URL_SCHEME' } Node.js v24.15.0 [WARN] Could not create an update snapshot. Skipping auto-update to protect your data. [OK] Node.js found: v24.15.0 [OK] pnpm 10.33.2 ready ## Additional context The error occurs consistently after several restarts. Marinara Engine was working before the restart performed to obtain a fresh staging branch. It is unclear whether the issue is staging-specific or caused by the local system. Discord message: Discord message from AgentX Discord message link: https://discord.com/channels/1417099416812392641/1528844323011956847/1529909435122847795 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord message transcript (1 message)</summary> ```text [2026-07-23T17:53:53.676Z] AgentX: I'm on Staging branch Release: v2.3.4 Build: 2d23b0b I just restarted my ME server so I can test the new staging changes, I'm getting the below error. I've restarted a few times and it's constant error. Not sure if it's related to staging or if something broke on my local system (ME was working fine before I restarted to get a fresh staging branch) ` ` ` [..] Aligning pnpm to 10.33.2 via Corepack... [..] Checking for updates... node:internal/url:1608 throw new ERR_INVALID_URL_SCHEME('file'); ^ TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file at fileURLToPath (node:internal/url:1608:11) at file:///D:/Users/AgentX/AppData/Local/MarinaraEngine/scripts/protect-launcher-data.mjs:161:59 at ModuleJob.run (node:internal/modules/esm/module_job:437:25) at async node:internal/modules/esm/loader:639:26 at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) { code: 'ERR_INVALID_URL_SCHEME' } Node.js v24.15.0 [WARN] Could not create an update snapshot. Skipping auto-update to protect your data. [OK] Node.js found: v24.15.0 [OK] pnpm 10.33.2 ready ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1528844323011956847/1529909435122847795] ``` </details> ## 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:45:51 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 23, 2026):

Taking this one: SpicyMarinara (with Claude) is preparing a fix. Root cause: the run-directly guard in protect-launcher-data.mjs (and read-launcher-env.mjs) builds new URL(process.argv[1], "file:") — on Windows the D: drive prefix parses as the URL scheme, so fileURLToPath throws ERR_INVALID_URL_SCHEME at module load and the launcher skips the update snapshot. PR against staging incoming.

<!-- gh-comment-id:5061847409 --> @SpicyMarinara commented on GitHub (Jul 23, 2026): Taking this one: SpicyMarinara (with Claude) is preparing a fix. Root cause: the run-directly guard in protect-launcher-data.mjs (and read-launcher-env.mjs) builds `new URL(process.argv[1], "file:")` — on Windows the `D:` drive prefix parses as the URL scheme, so `fileURLToPath` throws ERR_INVALID_URL_SCHEME at module load and the launcher skips the update snapshot. PR against staging incoming.
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#2157
No description provided.