diff --git a/docker/run-chrome.sh b/docker/run-chrome.sh index bec305e..b1b0e7b 100755 --- a/docker/run-chrome.sh +++ b/docker/run-chrome.sh @@ -8,19 +8,24 @@ for i in $(seq 1 40); do done sleep 3 export DISPLAY=:1 -# --remote-debugging-port exposes CDP so the brain's browse-search.mjs -# (playwright connectOverCDP) can drive this on-screen Chrome for the -# broadcast-visible Google/YouTube search. Bound to loopback (same container). + +# Suppress the "--no-sandbox unsupported flag" warning bar via a managed policy +# instead of --test-type. --test-type is an automation signal Google can flag, +# so we keep the launch flags minimal/clean (less chance of the /sorry/ bot +# challenge) while still hiding the infobar. +mkdir -p /etc/opt/chrome/policies/managed +cat > /etc/opt/chrome/policies/managed/jarvis.json <<'JSON' +{ "CommandLineFlagSecurityWarningsEnabled": false } +JSON + +# Minimal, non-automation flags. --remote-debugging exposes CDP so the brain can +# drive this on-screen Chrome (Google/YouTube/Naver), --disable-features=Translate +# hides the translate popup. NO --test-type / --disable-blink-features. exec google-chrome \ --no-sandbox --no-first-run --disable-dev-shm-usage \ - --test-type \ - --disable-blink-features=AutomationControlled \ - --disable-features=AutomationControlled \ - --lang=ko-KR \ - --disable-infobars \ --no-default-browser-check \ - --disable-translate \ - --disable-features=Translate,TranslateUI,InfoBars \ + --disable-features=Translate,TranslateUI \ + --lang=ko-KR \ --remote-debugging-port="${CDP_PORT:-9222}" \ --remote-debugging-address="${CDP_BIND:-127.0.0.1}" \ --user-data-dir="${CHROME_PROFILE_DIR:-/root/chrome-profile}" \