[GH-ISSUE #8023] [Issue]: Browser opens before environment injection completes #7523

Closed
opened 2026-10-24 04:03:50 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

On startup, Marinara Engine opens the browser before it is ready to use. The page only works after the environment injection completes and the user manually refreshes it.

Expected behavior

The browser should open only after Marinara Engine is ready and the environment has been injected.

Actual behavior

The browser opens prematurely, requiring the user to wait for the environment injection to complete and then refresh the page.

Steps to reproduce

  1. Start Marinara Engine.
  2. Observe that the browser opens before the PowerShell window shows ◇ injected env (0) from ..\.env.
  3. Wait for the injection message to appear, then refresh the browser page.

Environment

  • Marinara Engine version: 2.5.1 (build 2.5.1+4d2932c05bf5, commit 4d2932c05b)
  • Install type: Not provided
  • OS + version: Windows 10.0.26200 (x64)
  • Browser or app shell: Firefox 158.0

Logs, screenshots, or video

Startup log observed: ◇ injected env (0) from ..\.env. No screenshots or video provided.

Additional context

Reported on the current staging version. The issue has reportedly occurred for several versions after previously seamless startups. After waiting for startup to finish and refreshing the page, everything works normally.

Discord thread: Browser window opening before .env is injected on startup
Discord thread link: https://discord.com/channels/1417099416812392641/1562512085370535987
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (3 messages)
[2026-10-21T17:05:11.223Z] FSEngine: This is not a huge issue, but it is a minor annoyance.

When I start up Marinara Engine, it triggers the browser window before Marinara Engine is actually ready to use. I end up having to watch the ME PowerShell instance for a couple seconds or so for the following line to show up:

`◇ injected env (0) from ..\.env`

And then I refresh the page and everything works fine.

I'm on the current staging version. This has actually been happening to me for a few versions after many versions of seamless startups and I had no idea why, but at some point (I believe somewhat recently) the `injected env` line was made visible during the process and just based on my regular, everyday usage, it seems connected to the issue.
[Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512085370535987]

[2026-10-21T17:05:11.998Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512088620990546]

[2026-10-21T17:07:48.639Z] FSEngine: Support diagnostic:

` ` `
Marinara Engine diagnostics
Version: 2.5.1
Build: 2.5.1+4d2932c05bf5
Commit: 4d2932c05bf5
Server OS: Windows 10.0.26200 (x64)
Server memory: heap 193.5 / 2240 MiB; RSS 318.5 MiB
Background wake lock: not reported
Last detected freeze: none detected
Previous session: shut down cleanly at 2026-10-21T16:49:42.645Z
Sessions ended without shutdown: 10 recorded
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0
Client runtime: {"build":"2.5.1+4d2932c05bf5","page":"mvid5sa6-auq8cjfm","persistence":"local","navigation":"reload","standalone":false,"view":[747,0,0,0],"events":[{"at":1792601143071,"page":"mvicfqcf-e0fio1y6","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]},{"at":1792601332189,"page":"mvicjs9p-usb6381y","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]},{"at":1792602358638,"page":"mvid5sa6-auq8cjfm","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]}]}
GPU: ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0), or similar
Server GPU: no NVIDIA GPU detected
Main sidecar: not configured
Utility sidecar: not configured
Decision sidecar: not configured
Sidecar load: not measured
Active connection: LinkAPI Images
Connection provider: image_generation
LLM model: gpt-image-2-c
Professor Mari last acted on: none recorded this session
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512745620840503]

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 (Oct 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8023 Originally assigned to: @SpicyMarinara on GitHub. ## Summary On startup, Marinara Engine opens the browser before it is ready to use. The page only works after the environment injection completes and the user manually refreshes it. ## Expected behavior The browser should open only after Marinara Engine is ready and the environment has been injected. ## Actual behavior The browser opens prematurely, requiring the user to wait for the environment injection to complete and then refresh the page. ## Steps to reproduce 1. Start Marinara Engine. 2. Observe that the browser opens before the PowerShell window shows `◇ injected env (0) from ..\.env`. 3. Wait for the injection message to appear, then refresh the browser page. ## Environment - Marinara Engine version: 2.5.1 (build 2.5.1+4d2932c05bf5, commit 4d2932c05bf5) - Install type: Not provided - OS + version: Windows 10.0.26200 (x64) - Browser or app shell: Firefox 158.0 ## Logs, screenshots, or video Startup log observed: `◇ injected env (0) from ..\.env`. No screenshots or video provided. ## Additional context Reported on the current staging version. The issue has reportedly occurred for several versions after previously seamless startups. After waiting for startup to finish and refreshing the page, everything works normally. Discord thread: Browser window opening before .env is injected on startup Discord thread link: https://discord.com/channels/1417099416812392641/1562512085370535987 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (3 messages)</summary> ```text [2026-10-21T17:05:11.223Z] FSEngine: This is not a huge issue, but it is a minor annoyance. When I start up Marinara Engine, it triggers the browser window before Marinara Engine is actually ready to use. I end up having to watch the ME PowerShell instance for a couple seconds or so for the following line to show up: `◇ injected env (0) from ..\.env` And then I refresh the page and everything works fine. I'm on the current staging version. This has actually been happening to me for a few versions after many versions of seamless startups and I had no idea why, but at some point (I believe somewhat recently) the `injected env` line was made visible during the process and just based on my regular, everyday usage, it seems connected to the issue. [Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512085370535987] [2026-10-21T17:05:11.998Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512088620990546] [2026-10-21T17:07:48.639Z] FSEngine: Support diagnostic: ` ` ` Marinara Engine diagnostics Version: 2.5.1 Build: 2.5.1+4d2932c05bf5 Commit: 4d2932c05bf5 Server OS: Windows 10.0.26200 (x64) Server memory: heap 193.5 / 2240 MiB; RSS 318.5 MiB Background wake lock: not reported Last detected freeze: none detected Previous session: shut down cleanly at 2026-10-21T16:49:42.645Z Sessions ended without shutdown: 10 recorded Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0 Client runtime: {"build":"2.5.1+4d2932c05bf5","page":"mvid5sa6-auq8cjfm","persistence":"local","navigation":"reload","standalone":false,"view":[747,0,0,0],"events":[{"at":1792601143071,"page":"mvicfqcf-e0fio1y6","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]},{"at":1792601332189,"page":"mvicjs9p-usb6381y","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]},{"at":1792602358638,"page":"mvid5sa6-auq8cjfm","build":"2.5.1+4d2932c05bf5","kind":"page-start","view":[747,0,0,0]}]} GPU: ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0), or similar Server GPU: no NVIDIA GPU detected Main sidecar: not configured Utility sidecar: not configured Decision sidecar: not configured Sidecar load: not measured Active connection: LinkAPI Images Connection provider: image_generation LLM model: gpt-image-2-c Professor Mari last acted on: none recorded this session ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1562512085370535987/1562512745620840503] ``` </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-24 04:03:50 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 21, 2026):

Codex is handling this issue in the maintainer's assigned-issue sweep, on fix/assigned-issue-sweep-20261022, targeting staging. Existing contributor PRs are excluded from this sweep. Ownership: @SpicyMarinara, assisted by Codex.

<!-- gh-comment-id:6327668019 --> @SpicyMarinara commented on GitHub (Oct 21, 2026): Codex is handling this issue in the maintainer's assigned-issue sweep, on `fix/assigned-issue-sweep-20261022`, targeting `staging`. Existing contributor PRs are excluded from this sweep. Ownership: @SpicyMarinara, assisted by Codex.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 21, 2026):

Implemented in #8027 and merged into staging at 4d67fe75b3. Reviewed-head and merge ancestry are verified.

All four launchers now open the browser after the real server reports readiness, replacing the fixed timer. Coverage includes delayed readiness, failure/restart/opt-out behavior, IPv6, existing-server opening, shell arguments/exit codes and malformed browser commands. Windows launcher regressions and all native platform builds passed; physical Windows10/Firefox and Termux behavior remains manual verification as recorded in the PR.

Final PR-head validation passed all eight required checks, 973/973 Node regressions and all ten platform checks; review findings were fixed or resolved with documented reasons. Closing as completed.

<!-- gh-comment-id:6328922649 --> @SpicyMarinara commented on GitHub (Oct 21, 2026): Implemented in #8027 and merged into `staging` at [4d67fe75b3](https://github.com/Pasta-Devs/Marinara-Engine/commit/4d67fe75b31b5fc97649ba340cb69832822395de). Reviewed-head and merge ancestry are verified. All four launchers now open the browser after the real server reports readiness, replacing the fixed timer. Coverage includes delayed readiness, failure/restart/opt-out behavior, IPv6, existing-server opening, shell arguments/exit codes and malformed browser commands. Windows launcher regressions and all native platform builds passed; physical Windows10/Firefox and Termux behavior remains manual verification as recorded in the PR. Final PR-head validation passed all eight required checks, 973/973 Node regressions and all ten platform checks; review findings were fixed or resolved with documented reasons. Closing as completed.
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#7523
No description provided.