{"record":{"id":"6c20b757f261bd98","repo":"unionlabs/union","slug":"timed-out-after-6c20b7","errorCode":null,"errorMessage":"timed out after {:?}","messagePattern":"timed out after (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"tools/union-test/src/evm.rs","lineNumber":191,"sourceCode":"                            return Err(anyhow::anyhow!(\"get_logs RPC error: {}\", e));\n                        }\n                    };\n                    for log in logs {\n                        if let Ok(ibc_event) = IbcEvents::decode_log(&log.inner)\n                            && let Some(event) = filter_fn(ibc_event.data)\n                        {\n                            events.push(event);\n                        }\n                    }\n\n                    prev_latest += 1u64;\n                }\n\n                tokio::time::sleep(Duration::from_secs(10)).await;\n            }\n        })\n        .await\n        .map_err(|_| anyhow::anyhow!(\"timed out after {:?}\", timeout))?\n    }\n\n    pub async fn wait_for_create_client(\n        &self,\n        timeout: Duration,\n    ) -> anyhow::Result<helpers::CreateClientConfirm> {\n        Ok(self\n            .wait_for_event(\n                |e| match e {\n                    IbcEvents::CreateClient(ev) => Some(helpers::CreateClientConfirm {\n                        client_id: ev.client_id,\n                    }),\n                    _ => None,\n                },\n                timeout,\n                1,\n            )\n            .await?","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/unionlabs/union/blob/031785bb6dc6b957c624e62bc64c184409c97d7b/tools/union-test/src/evm.rs#L173-L209","documentation":"`EvmClient::wait_for_event` wraps its polling loop (checks block number every 10s, scans each new block's logs filtered by `ibc_handler_address`) in `tokio::time::timeout(timeout, ...)`; this error means the deadline elapsed before `expected_event_count` matching IBC events were observed.","triggerScenarios":"The watched event never lands: relayer stopped so packets are never received/acked; `ibc_handler_address` is wrong so the relevant logs are filtered out; the event fired before the wait started (scan begins at the block number at wait start); the EVM chain stalled.","commonSituations":"Relayer down between devnets; timeout too short for slow proof-verification chains; test fixture configured with a stale handler address; anvil snapshot reverted past the emitting block.","solutions":["Increase the `timeout` Duration passed to the wait helper","Verify `ibc_handler_address` is the deployed IBC contract whose logs you need","Confirm the chain produces blocks and the relayer is running","Start the wait before triggering the action that emits the event"],"exampleFix":"// before\nlet evt = evm.wait_for_create_client(Duration::from_secs(120)).await?; \n// after\nlet evt = evm.wait_for_create_client(Duration::from_secs(1200)).await?;","handlingStrategy":"retry","validationCode":"// pre-flight: chain is producing blocks\nlet b1 = evm.provider.get_block_number().await?;\ntokio::time::sleep(Duration::from_secs(10)).await;\nlet b2 = evm.provider.get_block_number().await?;\nanyhow::ensure!(b2 > b1, \"EVM chain stalled; wait_for_event will time out\");","typeGuard":null,"tryCatchPattern":"match evm.wait_for_event(filter, timeout, n).await {\n    Ok(evts) => Ok(evts),\n    Err(e) if e.to_string().contains(\"timed out after\") => {\n        // verify relayer + handler address, then retry with a longer timeout\n        evm.wait_for_event(filter, timeout * 2, n).await\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Confirm the relayer is running before starting waits that depend on relayed packets","Start the wait before triggering the emitting action so the starting block precedes the event","Double-check ibc_handler_address against the deployed IBC contract"],"tags":["rust","evm","timeout","ibc","polling"],"backgroundTag":null,"analyzedSha":"031785bb6dc6b957c624e62bc64c184409c97d7b","analyzedAt":"2026-08-16T06:24:09.996Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}