diff --git a/README.md b/README.md index a56a7a5..f5e92dd 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,49 @@ Persistence & Outputs Tip: For captchas or first-time login, run with `SHOW=1` and log in once; cookies stay in the profile. Notifications via `NOTIFY` help surface errors (e.g., captcha, login). +## Troubleshooting + +### Cloudflare / "Incorrect response" Error (Epic Games) + +If you see **"Incorrect response. Please refresh the page."** or repeated "word word" text on the login page, Cloudflare is blocking the automated browser. + +**Solution 1: Use Docker Compose (recommended)** + +The included `docker-compose.yml` has FlareSolverr pre-configured: + +```bash +docker compose up +``` + +**Solution 2: Manual login with persistent cookies** + +```bash +docker run --rm -it \ + -p 6080:6080 \ + -v fgc-data:/fgc/data \ + -v fgc-browser:/home/fgc/.cache/browser \ + -e SHOW=1 \ + -e EG_MODE=new \ + git.sky-net.it/nocci/free-games-claimer:dev \ + node epic-games +``` + +Then open `http://localhost:6080`, log in manually. Cookies are saved for subsequent runs. + +**Solution 3: Disable strict Firefox privacy settings** + +The entrypoint now creates a `user.js` with Cloudflare-friendly settings. If you still have issues, delete the browser profile to regenerate it: + +```bash +docker volume rm fgc-browser +``` + +### Common Issues + +| Error | Cause | Fix | +|-------|-------|-----| +| "Incorrect response" | Cloudflare bot detection | Use FlareSolverr or manual login | +| Captcha loop | IP flagged | Wait, change IP, or use FlareSolverr | +| "Not signed in" timeout | Login expired | Run with `SHOW=1` and re-login | +| Repeated "word" text | Cloudflare fingerprinting | See Cloudflare solutions above | + diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 66c4c2e..95f7614 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -45,10 +45,17 @@ rm -f "$BROWSER_DIR"/parent.lock "$BROWSER_DIR"/lock "$BROWSER_DIR"/.parentlock # Only write the prefs file when the volume is writable (container runs as non-root). if [ -w "$BROWSER_DIR" ] && { [ ! -e "$BROWSER_DIR/user.js" ] || [ -w "$BROWSER_DIR/user.js" ] || rm -f "$BROWSER_DIR/user.js" 2>/dev/null; }; then cat << 'EOT' > "$BROWSER_DIR/user.js" -user_pref("privacy.resistFingerprinting", true); -// user_pref("privacy.resistFingerprinting.letterboxing", true); -// user_pref("browser.contentblocking.category", "strict"); -// user_pref("webgl.disabled", true); +// Anti-fingerprinting settings for Cloudflare bypass +user_pref("privacy.resistFingerprinting", false); // Can trigger Cloudflare +user_pref("privacy.resistFingerprinting.letterboxing", false); +user_pref("browser.contentblocking.category", "standard"); +user_pref("webgl.disabled", false); // WebGL needed for some bot detection +user_pref("webgl.enable-webgl2", true); +user_pref("javascript.use_us_english_locale", true); +user_pref("intl.accept_languages", "en-US,en"); +user_pref("privacy.trackingprotection.enabled", false); // Can interfere with Cloudflare +user_pref("network.http.referer.default_policy", 2); +user_pref("network.http.referer.XOriginPolicy", 0); EOT else echo "Warning: $BROWSER_DIR not writable; skipping user.js creation."