Spaces:
Runtime error
Runtime error
akashyadav758 Claude Opus 4.8 (1M context) commited on
Commit ·
90bcc1f
1
Parent(s): 1618d7c
Fix flaky extension SW boot: set XDG_RUNTIME_DIR before Chrome launch
Browse filesHeadless Chrome logged "XDG_RUNTIME_DIR is invalid or not set" and the three
MV3 extension service workers intermittently failed to spawn
(DidStartWorkerFail: 5), so /gpt /gemini /flow never connected. Create and
export a valid per-user runtime dir before launching Chrome. Purely additive.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- start_hf.sh +8 -0
start_hf.sh
CHANGED
|
@@ -121,6 +121,14 @@ if [ -n "$DATABASE_URL" ]; then
|
|
| 121 |
( while sleep 300; do /opt/profilesync/profilesync backup >/dev/null 2>&1 || true; done ) &
|
| 122 |
fi
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
# 7. Launch Chrome Headless
|
| 125 |
# NOTE: do NOT add --renderer-process-limit=1 / --process-per-site / --no-zygote here.
|
| 126 |
# Each of the 3 extensions runs an MV3 service worker (its own renderer) and the chat
|
|
|
|
| 121 |
( while sleep 300; do /opt/profilesync/profilesync backup >/dev/null 2>&1 || true; done ) &
|
| 122 |
fi
|
| 123 |
|
| 124 |
+
# 6c. Provide a valid per-user runtime dir. Chrome's mojo/IPC layer and each MV3
|
| 125 |
+
# extension service worker need this; without it Chrome logs
|
| 126 |
+
# "XDG_RUNTIME_DIR is invalid or not set" and the extension service workers
|
| 127 |
+
# intermittently fail to spawn (DidStartWorkerFail) → the gpt/gemini/flow
|
| 128 |
+
# extensions never connect. Purely additive: just creates a dir and exports it.
|
| 129 |
+
export XDG_RUNTIME_DIR=/tmp/runtime-chrome
|
| 130 |
+
mkdir -p "$XDG_RUNTIME_DIR" && chmod 700 "$XDG_RUNTIME_DIR"
|
| 131 |
+
|
| 132 |
# 7. Launch Chrome Headless
|
| 133 |
# NOTE: do NOT add --renderer-process-limit=1 / --process-per-site / --no-zygote here.
|
| 134 |
# Each of the 3 extensions runs an MV3 service worker (its own renderer) and the chat
|