LOKI LogoLOKIv1.10.0

Failure Detectors

What LOKI monitors and records as a failure during a chaos session.

Built-in detectors

Every chaos session attaches a suite of passive detectors to the Playwright page (attach, after_navigation, and inspect hooks) to capture runtime anomalies without requiring manual assertions:

FlagTypeDefaultDescription
JavaScriptErrorDetectorruntimealways onCaptures uncaught JS exceptions (pageerror), console.error messages, and unhandled Promise rejections (unhandledrejection).
NetworkDetectornetworkalways onRecords aborted/failed requests (requestfailed: CORS blocks, dropped connections, dead endpoints) and HTTP 4xx / 5xx responses.
DialogDetectordialogalways onIntercepts unexpected native alert, confirm, and prompt dialogs, logs them, and automatically dismisses them so the session never hangs.
NavigationDetectornavigationalways onDetects browser-level error pages (chrome-error://, about:neterror, about:crash) and application error screens/routes (/500, /404, /error, /crash, or error titles).
ResourceDetectorassetsalways onCaptures sub-resources (<img>, <script>, <link>) that fail to load during the session and <img> elements in the final DOM with naturalWidth === 0.
MobileLayoutDetectorlayout--deviceActive when emulating a mobile device (--device). Checks for horizontal scroll overflow (scrollWidth > viewportWidth + 5) and missing or invalid <meta name="viewport"> tags.
UiFreezeDetectorui-freezeapi-chaosActive when API faults are injected (network-tormentor, swarm, all). Detects blank screens (white_screen), stuck loading spinners (infinite_spinner), and unmounted root containers (#root, #app, #__next).