[Bug]: Linux AppImage 0.0.41-nightly.20260914.1687 returns HTTP 500 — static handler uses fs.open on app.asar
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Summary
The Linux AppImage starts, but the backend returns HTTP 500 for GET /. The desktop UI cannot load.
Version
- T3 Code:
0.0.41-nightly.20260914.1687 - Package: Linux x86_64 AppImage, 188708343 bytes
- Electron 44.1.0, Node 24.19.0, Chrome 152.0.7977.65
- Ubuntu 26.04.1 LTS, GNOME on Wayland
Steps to reproduce
- Run
T3-Code-0.0.41-nightly.20260914.1687-x86_64.AppImage. - Wait for
backend readyin~/.local/state/t3code/t3code.log. - Run
curl -i http://127.0.0.1:3773/.
Actual result
HTTP/1.1 500 Internal Server Error
content-type: text/plain
content-length: 21
Internal Server Error
Expected result
The backend returns the web client. The desktop UI loads.
Cause
The static handler calls FileSystem.open on this path:
/tmp/.mount_T3-Cod.../resources/app.asar/apps/server/dist/client/index.html
The Electron asar layer fails the open call with ENOENT:
openStaticFile -> PlatformError: NotFound: FileSystem.open (.../app.asar/apps/server/dist/client/index.html)
ENOENT, apps/server/dist/client/index.html not found in .../app.asar
The file is present in the archive. fs.statSync returns size 20143, and fs.readFileSync returns valid HTML. fs.openSync and fs.promises.open fail with ENOENT. Electron asar support implements stat and readFile, but not open.
Regression
PR #9669 added the file-handle streaming path. That code returns 500 on PlatformError. The failure occurs when the client files are inside app.asar, as in the AppImage build.
This is not #11523. #11523 reports truncated assets on the t3code:// path.
Suggested fix
Read the file with FileSystem.readFile, or mark the client directory as unpacked in the AppImage build.
Workaround
Run an older AppImage.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the openStaticFile entry point and the FileSystem.open call, then compare the streaming path introduced by PR #9669 with FileSystem.readFile. Reproduce using the AppImage and curl against http://127.0.0.1:3773/; done means the request returns the web client instead of HTTP 500 and the desktop UI loads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- backend, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100