Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-brain-core / sub_brains/browser_healer/launch.sh |
| Date | Not specified in source |
| Repository | Janady13/ai-brain-core |
| Revision | f7275582f13ada80bfb3b1008089800ca26f4a23 |
| Branch | main |
| Path or archive member | sub_brains/browser_healer/launch.sh |
| Original SHA-256 | 5d551584bc920e476c77895be2d3314451b93a60632f5f931ed2a1226cdf5d78 |
| Git blob SHA | 1e8471f89c8c5c2e7e64dadf7d4f9db99a533c05 |
| Reading-copy SHA-256 | 5d551584bc920e476c77895be2d3314451b93a60632f5f931ed2a1226cdf5d78 |
Every recorded occurrence
These 3 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/ai-brain-core / sub_brains/browser_healer/launch.sh | main | f7275582f13ada80bfb3b1008089800ca26f4a23 | Open original |
| Janady13/ai-brain-core / sub_brains/browser_healer/launch.sh | claude/agi-architecture-diagram-01GJ7CohfKvLb77yiKpHqd6d | 365850e27004318edd582881225024026b118c2d | Open original |
| Janady13/ai-brain-core / sub_brains/browser_healer/launch.sh | healer-core | 0fe4cbbaa91912149f1a8e32205371ff67017268 | Open original |
Recovered source transcript
Download complete source text ↓47 lines · 1.6 KB
#!/bin/bash
# 🚀 Browser Healer - auto-fix blank screens, ERR_CONNECTION_REFUSED, proxy issues
LOG_FILE="$HOME/Desktop/AI_Brain/logs/browser_healer.log"
mkdir -p "$(dirname "$LOG_FILE")"
echo "🌍 [Browser Healer] Starting..." >>"$LOG_FILE"
# Load API list from env file
API_ENV="$HOME/Desktop/AI_Brain/env/free_apis.env"
if [[ -f "$API_ENV" ]]; then
mapfile -t API_LIST < <(grep -v '^#' "$API_ENV" | grep -v '^\s*$')
else
API_LIST=("https://api.github.com" "https://httpbin.org/get")
fi
while true; do
for browser in "Google Chrome" "Chromium" "Safari" "Firefox"; do
if pgrep -x "$browser" >/dev/null; then
# Kill blank tabs
osascript -e "tell application \"$browser\" to close (every window whose name contains \"about:blank\")" 2>/dev/null || true
# Restart if connection refused seen in logs
if grep -qi "ERR_CONNECTION_REFUSED" "$LOG_FILE"; then
echo "⚠️ $browser connection refused, restarting..." | tee -a "$LOG_FILE"
pkill -x "$browser" || true
open -a "$browser"
fi
# Reset proxy/firewall
networksetup -setwebproxystate Wi-Fi off 2>/dev/null || true
networksetup -setsecurewebproxystate Wi-Fi off 2>/dev/null || true
fi
done
# API health checks
for api in "${API_LIST[@]}"; do
if curl -s --max-time 5 "$api" >/dev/null; then
echo "✅ API ok: $api" >>"$LOG_FILE"
else
echo "⚠️ API failed: $api" >>"$LOG_FILE"
fi
done
sleep 60
done