Fix splash page loop when scraper service is unavailable
Build & Auto-Repair / build (push) Has been cancelled

Skip browser/Facebook detection in /setup/status when port 3008
is not reachable, so first_run only depends on env + Ollama.
This prevents the setup wizard from showing endlessly when
browser-use service is not running.
This commit is contained in:
2026-07-01 16:05:22 +02:00
parent 183d6c629d
commit 26319281d4
+4 -2
View File
@@ -367,9 +367,11 @@ const server = http.createServer(async (req, res) => {
let browsers = { firefox: { path: null }, opera: { path: null }, chrome: { path: null }, edge: { path: null } }
let facebookLoggedIn = false
let selectedBrowser = process.env.SELECTED_BROWSER || ""
let scraperAvailable = false
try {
await fetch("http://127.0.0.1:3008/health", { signal: AbortSignal.timeout(2000) })
scraperAvailable = true
const profiles = await (await fetch("http://127.0.0.1:3008/setup/profile", { signal: AbortSignal.timeout(5000) })).json()
for (const [b, p] of Object.entries(profiles)) {
if (p) browsers[b] = { path: p }
@@ -396,8 +398,8 @@ const server = http.createServer(async (req, res) => {
} catch {}
const anyDetected = Object.values(browsers).some(v => v.path)
// first_run = any setup step is incomplete
const firstRun = !envExists || !ollamaRunning || !anyDetected || !facebookLoggedIn || !modelAvailable
// first_run = env or Ollama incomplete, or scraper is available but detection incomplete
const firstRun = !envExists || !ollamaRunning || (scraperAvailable && (!anyDetected || !facebookLoggedIn))
return sendJSON(res, 200, {
first_run: firstRun,