diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index fbde23d..d01d86e 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -163,9 +163,9 @@ LaunchServices now opens `http`, `https` and `mailto` links on the Linux desktop ## Riot client shows "Not Found" instead of its UI -The client window opens but only shows `Not Found`, and its log has `ENOENT, dist/renderer/index.html not found in …/app.asar` although the archive contains that file. Electron cannot hand out a descriptor into `app.asar`, so its asynchronous `fs.open` copies the file to a temporary file first (`copyFileOut`) and reports a failed copy as "not found". Chromium on macOS takes its temporary directory from `NSTemporaryDirectory()`, not `TMPDIR`, and that directory is unusable here, so every copy fails. Synchronous reads such as `fs.readFileSync` do not copy and keep working, which is why the rest of the client starts. +On affected setups, including the reported NixOS installation, the client window opens but only shows `Not Found`, and its log has `ENOENT, dist/renderer/index.html not found in …/app.asar` although the archive contains that file. Electron's asynchronous file opening can copy an archive entry to a temporary file first (`copyFileOut`), and a failed copy can be reported as "not found". Chromium checks `MAC_CHROMIUM_TMPDIR` before falling back to `NSTemporaryDirectory()`; an unusable default temporary directory can therefore produce this symptom even while synchronous archive reads work. -The launcher sets `MAC_CHROMIUM_TMPDIR=/private/tmp`, which Chromium checks first; `scripts/install-runtime.sh` already creates that guest directory with mode `1777`. To check the archive outside the client, run the client binary as Node (`ELECTRON_RUN_AS_NODE=1`) with a script that calls `fs.createReadStream` on a file inside `app.asar`: it fails without the variable and reads the file with it. +The launcher defaults `MAC_CHROMIUM_TMPDIR` to `/private/tmp`, preserving a non-empty override. `scripts/install-runtime.sh` creates that guest directory with mode `1777`. Verify directory creation and temporary-file writes with a standalone guest probe, then launch the client normally and check whether its UI loads. Do not run diagnostic scripts through Riot's executable. This workaround addresses temporary-file failures; an actually missing or damaged archive needs separate investigation. ## Language dropdown closes Riot, or client resize leaves a clipped UI diff --git a/tools/run-riot-client.sh b/tools/run-riot-client.sh index 21fc89f..770568d 100755 --- a/tools/run-riot-client.sh +++ b/tools/run-riot-client.sh @@ -98,11 +98,9 @@ export __GL_YIELD="${__GL_YIELD:-NOTHING}" if [ -w /proc/self/timerslack_ns ]; then echo 1 > /proc/self/timerslack_ns 2>/dev/null || true fi -# Chromium takes its temp directory from NSTemporaryDirectory(), which is unusable -# under Darling, so every temp file fails. Electron opens files in app.asar -# asynchronously by copying them to a temp file and reports the failed copy as -# "not found": the Riot client then shows a "Not Found" page instead of its UI. -# MAC_CHROMIUM_TMPDIR overrides the directory. +# On affected setups Chromium's default temp directory is unusable. Electron +# can copy app.asar entries to temporary files for async reads and report a +# failed copy as "not found". Use a writable guest directory by default. exec env -u ELECTRON_RUN_AS_NODE -u DYLD_INSERT_LIBRARIES EGL_PLATFORM=x11 \ MAC_CHROMIUM_TMPDIR="${MAC_CHROMIUM_TMPDIR:-/private/tmp}" \ LANG="${RCLOL_GUEST_LOCALE:-en_US.UTF-8}" LC_ALL="${RCLOL_GUEST_LOCALE:-en_US.UTF-8}" \