Skip to main content

Session health check

ESPN cookies expire, and the login form can't be scripted. The session health check finds a dead session before a draft or matchup does, so you can re-extract the cookies by hand.

What starts it?​

The espn-session-healthcheck CronJob runs node src/bots/check_espn_session.js every Monday at 06:00 UTC. A failed Job is the alert. The deadline is 3600 s and backoffLimit is 1.

What does it check?​

TierFunctionNeeds a browser?Used by
Cookie and RESTassertCookieSessionValidNoDraft clicker, before any authenticated call.
Rendered pageassertRenderedSessionValidYesThis CronJob.

What does each failure mean?​

ConditionErrorRetried?
HTTP 401 or 403SessionExpiredErrorYes, after 30 s
Redirect to a login page, or no roster tableSessionExpiredErrorYes
HTTP 404 for the leaguePermanentError. The room or league is gone.No
Other non-2xx statusPlain Error. The session isn't treated as expired.Yes

How do I fix an expired session?​

Re-extract espn_s2 and SWID from a logged-in browser and update the secret the cluster reads. The error message prints the exact bao kv put command. Don't commit the values anywhere.