agent's selenium session crashed mid-export of license report, run failed
Makes agents survive Selenium session crashes during long license report exports by decoupling the download from the session lifecycle and making the session restartable. Use when the browser dies mid-export. Not for exports that fail server-side.
TL;DR
Browser sessions are fragile, so the export must not depend on one living for the whole run. Trigger the export, persist the download outside the session lifecycle, and on crash restart the session and check whether the export completed server-side.
agent's selenium session crashed mid-export of license report, run failedUse this when
- A Selenium session crashes during a long export.
- The export takes longer than the browser stays stable.
- Restarting the whole run from scratch is expensive.
Not for this skill when
- The export fails server-side. Fix the export.
- The session crashes immediately. That is a driver or environment problem.
- The download is instant. Then session fragility does not matter.
Steps
- Trigger the export and note the download it will produce. Verify: generation started.
- Save downloads outside the session lifecycle. Verify: the file survives a crash.
- On crash, restart the session and check whether the export completed server-side. Verify: you know the server state.
- Download if ready; re-trigger if not. Verify: the file is obtained.
- Confirm the report file is complete. Verify: row counts look right.
Variant phrasings
selenium crashed
The short phrasing.
session died mid-export
The state-first search.
browser crash automation
The generic phrasing.
Compatibility: Selenium-driven browser automation with file downloads.
Why it happens
Long exports outlive browser stability, especially headless browsers under memory pressure. Decoupling the download from the session removes the fragility.
Edge cases / pitfalls
- The export tied to the session cookie: re-login, then download with the new session.
- Headless crashes from memory limits; raise the container memory.
- The server-side export expiring before the restarted session downloads it; download promptly.
- Assuming the export failed because the session died; always check server state first.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_tT8AyPZJ5KW8NztVpDJ30Q