[GH-ISSUE #8340] [Issue]: Marinara Engine intermittently loses connection to Termux on Android #8286

Closed
opened 2026-10-27 06:06:58 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Marinara Engine intermittently stops working on a Galaxy Tab S9. After closing and reopening the app, it cannot connect to Termux even though the Termux terminal appears normal.

Expected behavior

Marinara Engine should reconnect to the active Termux session after the app is closed and reopened.

Actual behavior

Marinara Engine cannot connect to Termux after reopening, requiring the Termux session to be closed and restarted.

Steps to reproduce

  1. Run Marinara Engine with Termux on the Galaxy Tab S9.
  2. At an unknown point, Marinara Engine stops working.
  3. Close and reopen Marinara Engine.
  4. Observe that the app cannot connect to Termux while the Termux terminal appears normal.
  5. Close and restart the Termux session.

Environment

  • Marinara Engine version: 2.5.1 (build 2.5.1+8042ef6ec638)
  • Install type: termux
  • OS + version: Android 16 on Samsung Galaxy Tab S9 (SM-X716B)
  • Browser or app shell: MarinaraEngine/Android app shell; Chrome WebView 155.0.8059.43

Logs, screenshots, or video

Support Diagnostics: Server OS Android / Termux 5.15.189-android13-8-33413632-abX716BXXS6EZI2 (arm64); background wake lock acquired; last detected freeze none detected; previous session shut down cleanly; sessions ended without shutdown 0 recorded; active connection Nano via nanogpt. No screenshots, video, or error logs were provided.

Additional context

The cause and exact trigger are unknown. The reporter did not provide information about whether battery-saving mode was enabled or whether the issue also occurs in a web browser at 127.0.0.1:7860.

Discord thread: Android crashes
Discord thread link: https://discord.com/channels/1417099416812392641/1564056045574291567
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (7 messages)
[2026-10-25T23:20:20.021Z] SkullKnight7: System: galaxy tab S9

For unknown reasons Marinara engine will stop working closing and re opening the app reveals that it can't connect to termux but the Terminal looks completely normal thus requiring closing and then restarting a termux session this keeps on happening and I cannot figure out why.
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056045574291567]

[2026-10-25T23:20:20.710Z] 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/1564056045574291567/1564056048464044144]

[2026-10-25T23:21:30.023Z] DSBwizzard: :Termux:
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056339183833231]

[2026-10-25T23:21:43.084Z] SkullKnight7: ` ` `
Marinara Engine diagnostics
Version: 2.5.1
Build: 2.5.1+8042ef6ec638
Commit: 8042ef6ec638
Server OS: Android / Termux 5.15.189-android13-8-33413632-abX716BXXS6EZI2 (arm64)
Server memory: heap 139.1 / 1120 MiB; RSS 304.6 MiB
Background wake lock: acquired
Last detected freeze: none detected
Previous session: shut down cleanly at 2026-10-25T23:12:27.511Z
Sessions ended without shutdown: 0 recorded
Client OS: Android 16
Browser / app shell: Mozilla/5.0 (Linux; Android 16; SM-X716B Build/BP4A.251205.006; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/155.0.8059.43 Safari/537.36 MarinaraEngine/Android
Client runtime: {"build":"2.5.1+8042ef6ec638","page":"mvogbt8f-s5lhbxai","persistence":"local","navigation":"navigate","standalone":false,"view":[1365,0,1365,0],"events":[{"at":1792969895978,"page":"mvofzdwq-jtylnvf2","build":"2.5.1+8042ef6ec638","kind":"page-start","view":[1365,0,1365,0]},{"at":1792970475711,"page":"mvogbt8f-s5lhbxai","build":"2.5.1+8042ef6ec638","kind":"page-start","view":[1365,0,1365,0]}]}
GPU: Adreno (TM) 740
Server GPU: no NVIDIA GPU detected
Main sidecar: not configured
Utility sidecar: not configured
Decision sidecar: not configured
Sidecar load: not measured
Active connection: Nano
Connection provider: nanogpt
LLM model: z-ai/glm-5.3-flash
Professor Mari last acted on: none recorded this session
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056393965772912]

[2026-10-25T23:22:42.008Z] DSBwizzard: Are you using the APK wrapper? Can you try in your web browser going to 127.0.0.1:7860 and see if it behaves there?
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056641111068754]

[2026-10-25T23:23:10.686Z] DSBwizzard: As Termux is working consistently throughout, I wonder if it's an APK thing or something. Also, is your phone in powersaver / battery saving mode when this happens?
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056761395052585]

[2026-10-25T23:23:22.556Z] Marinara: :Termux:
[Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056811181449351]

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 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8340 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Marinara Engine intermittently stops working on a Galaxy Tab S9. After closing and reopening the app, it cannot connect to Termux even though the Termux terminal appears normal. ## Expected behavior Marinara Engine should reconnect to the active Termux session after the app is closed and reopened. ## Actual behavior Marinara Engine cannot connect to Termux after reopening, requiring the Termux session to be closed and restarted. ## Steps to reproduce 1. Run Marinara Engine with Termux on the Galaxy Tab S9. 2. At an unknown point, Marinara Engine stops working. 3. Close and reopen Marinara Engine. 4. Observe that the app cannot connect to Termux while the Termux terminal appears normal. 5. Close and restart the Termux session. ## Environment - Marinara Engine version: 2.5.1 (build 2.5.1+8042ef6ec638) - Install type: termux - OS + version: Android 16 on Samsung Galaxy Tab S9 (SM-X716B) - Browser or app shell: MarinaraEngine/Android app shell; Chrome WebView 155.0.8059.43 ## Logs, screenshots, or video Support Diagnostics: Server OS Android / Termux 5.15.189-android13-8-33413632-abX716BXXS6EZI2 (arm64); background wake lock acquired; last detected freeze none detected; previous session shut down cleanly; sessions ended without shutdown 0 recorded; active connection Nano via nanogpt. No screenshots, video, or error logs were provided. ## Additional context The cause and exact trigger are unknown. The reporter did not provide information about whether battery-saving mode was enabled or whether the issue also occurs in a web browser at 127.0.0.1:7860. Discord thread: Android crashes Discord thread link: https://discord.com/channels/1417099416812392641/1564056045574291567 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (7 messages)</summary> ```text [2026-10-25T23:20:20.021Z] SkullKnight7: System: galaxy tab S9 For unknown reasons Marinara engine will stop working closing and re opening the app reveals that it can't connect to termux but the Terminal looks completely normal thus requiring closing and then restarting a termux session this keeps on happening and I cannot figure out why. [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056045574291567] [2026-10-25T23:20:20.710Z] 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/1564056045574291567/1564056048464044144] [2026-10-25T23:21:30.023Z] DSBwizzard: :Termux: [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056339183833231] [2026-10-25T23:21:43.084Z] SkullKnight7: ` ` ` Marinara Engine diagnostics Version: 2.5.1 Build: 2.5.1+8042ef6ec638 Commit: 8042ef6ec638 Server OS: Android / Termux 5.15.189-android13-8-33413632-abX716BXXS6EZI2 (arm64) Server memory: heap 139.1 / 1120 MiB; RSS 304.6 MiB Background wake lock: acquired Last detected freeze: none detected Previous session: shut down cleanly at 2026-10-25T23:12:27.511Z Sessions ended without shutdown: 0 recorded Client OS: Android 16 Browser / app shell: Mozilla/5.0 (Linux; Android 16; SM-X716B Build/BP4A.251205.006; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/155.0.8059.43 Safari/537.36 MarinaraEngine/Android Client runtime: {"build":"2.5.1+8042ef6ec638","page":"mvogbt8f-s5lhbxai","persistence":"local","navigation":"navigate","standalone":false,"view":[1365,0,1365,0],"events":[{"at":1792969895978,"page":"mvofzdwq-jtylnvf2","build":"2.5.1+8042ef6ec638","kind":"page-start","view":[1365,0,1365,0]},{"at":1792970475711,"page":"mvogbt8f-s5lhbxai","build":"2.5.1+8042ef6ec638","kind":"page-start","view":[1365,0,1365,0]}]} GPU: Adreno (TM) 740 Server GPU: no NVIDIA GPU detected Main sidecar: not configured Utility sidecar: not configured Decision sidecar: not configured Sidecar load: not measured Active connection: Nano Connection provider: nanogpt LLM model: z-ai/glm-5.3-flash Professor Mari last acted on: none recorded this session ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056393965772912] [2026-10-25T23:22:42.008Z] DSBwizzard: Are you using the APK wrapper? Can you try in your web browser going to 127.0.0.1:7860 and see if it behaves there? [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056641111068754] [2026-10-25T23:23:10.686Z] DSBwizzard: As Termux is working consistently throughout, I wonder if it's an APK thing or something. Also, is your phone in powersaver / battery saving mode when this happens? [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056761395052585] [2026-10-25T23:23:22.556Z] Marinara: :Termux: [Discord message: https://discord.com/channels/1417099416812392641/1564056045574291567/1564056811181449351] ``` </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-27 06:06:58 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Read-only investigation against staging f258e40d3: the Android wrapper and authentication code are unchanged from reported build 8042ef6ec638. Five direct authentication controls passed, including rejected credentials and recovery with a fresh handshake after session loss/expiry. These are module-level checks, not a Galaxy Tab/Android reproduction, so no speculative fix has been made.

At the next failure, before restarting or bringing Termux to the foreground:

  1. In Chrome, open http://127.0.0.1:7860/api/health. Does it return JSON, refuse the connection, or keep waiting?
  2. Then bring Termux to the foreground without restarting it. Does Marinara recover immediately?
  3. Capture the APK's exact error/screenshot and clarify whether reopening means returning from Recents or force-stopping the app. Please include the latest ~/.marinara-engine/logs/server-*.log around that time and whether battery-saving/background restrictions were enabled.

The existing diagnostics were captured after restarting Termux; their clean shutdown and lack of a current freeze record do not establish what happened during the original failure. Keep this issue open pending failure-time evidence.

<!-- gh-comment-id:6406730187 --> @SpicyMarinara commented on GitHub (Oct 26, 2026): Read-only investigation against staging `f258e40d3`: the Android wrapper and authentication code are unchanged from reported build `8042ef6ec638`. Five direct authentication controls passed, including rejected credentials and recovery with a fresh handshake after session loss/expiry. These are module-level checks, **not a Galaxy Tab/Android reproduction**, so no speculative fix has been made. At the next failure, **before restarting or bringing Termux to the foreground**: 1. In Chrome, open `http://127.0.0.1:7860/api/health`. Does it return JSON, refuse the connection, or keep waiting? 2. Then bring Termux to the foreground **without restarting it**. Does Marinara recover immediately? 3. Capture the APK's exact error/screenshot and clarify whether reopening means returning from Recents or force-stopping the app. Please include the latest `~/.marinara-engine/logs/server-*.log` around that time and whether battery-saving/background restrictions were enabled. The existing diagnostics were captured after restarting Termux; their clean shutdown and lack of a current freeze record do not establish what happened during the original failure. Keep this issue open pending failure-time evidence.
Author
Owner

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

Not enough diagnostics; couldn't replicate.

<!-- gh-comment-id:6411366812 --> @SpicyMarinara commented on GitHub (Oct 26, 2026): Not enough diagnostics; couldn't replicate.
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#8286
No description provided.