fix: minimal Chrome flags (drop --test-type/AutomationControlled) + policy infobar suppress

Per the flag hypothesis: remove the automation-signaling flags that can trigger
Google's /sorry/ challenge. Suppress the --no-sandbox warning bar with a Chrome
managed policy (CommandLineFlagSecurityWarningsEnabled=false) instead of
--test-type, so the infobar stays hidden without the automation signal.
This commit is contained in:
javis-bot
2026-06-15 16:51:11 +09:00
parent 247edda3eb
commit 8868381f13

View File

@@ -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}" \