#6576: fix(signal): increase attachment fetch timeout to 60s
channel: signal
## Problem
The default RPC timeout of 10 seconds is insufficient for larger audio attachments which need to be transferred as base64. This causes voice messages over ~15 seconds to timeout and show as `<media:unknown>`.
## Solution
- Add `DEFAULT_ATTACHMENT_TIMEOUT_MS` (60s) in `client.ts`
- Pass timeout to `signalRpcRequest` in `fetchAttachment()`
- Keep general RPC timeout at 10s for other operations
## Testing
Tested with 40-second voice messages on Signal which previously failed to process.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR introduces a dedicated 60s timeout for Signal attachment downloads (base64 over JSON-RPC) while keeping the default RPC timeout at 10s. It does this by exporting `DEFAULT_ATTACHMENT_TIMEOUT_MS` from `src/signal/client.ts` and using it in `fetchAttachment()` in `src/signal/monitor.ts` via the `timeoutMs` option passed to `signalRpcRequest`.
The change is narrowly scoped to attachment fetching: other RPC calls still use the existing `DEFAULT_TIMEOUT_MS` fallback inside `signalRpcRequest`, so typical operations remain fast-failing while large voice notes have more time to transfer.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge and is a targeted change with low blast radius.
- The change is small and isolated to Signal attachment fetching by threading an explicit timeout option through an existing RPC helper; it should not affect other RPC calls. Main remaining uncertainty is whether exporting the constant from `client.ts` matches the project’s intended API surface (vs keeping it internal or colocating the constant near attachment code).
- src/signal/client.ts (export surface), src/signal/monitor.ts (attachment RPC options)
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#16573: fix(signal): increase attachment fetch timeout to 30s (#16545)
by robbyczgw-cla · 2026-02-14
87.9%
#6916: fix(slack): add timeout to file download to prevent DoS (CWE-400)
by hclsys · 2026-02-02
72.0%
#6591: fix(signal): process all inbound attachments in parallel
by ProofOfReach · 2026-02-01
71.2%
#23745: fix(resilience): add timeout to unguarded fetch calls in browser su...
by kevinWangSheng · 2026-02-22
71.1%
#12984: fix(signal): fall back to JSON-RPC for health check on signal-cli 0...
by omair445 · 2026-02-10
68.8%
#6805: fix: increase WebSocket MAX_PAYLOAD_BYTES to 6MB for attachments
by cortexuvula · 2026-02-02
68.6%
#7247: fix(telegram): abort stale getUpdates connections after long-poll t...
by JanderV · 2026-02-02
68.5%
#22540: fix(signal): preserve original filename in outbound attachments
by lailoo · 2026-02-21
67.6%
#6463: fix(telegram): improve timeout handling and prevent channel exits
by ai-fanatic · 2026-02-01
67.2%
#6302: fix: Add timeouts to prevent indefinite hangs (issues #4954, #4956,...
by batumilove · 2026-02-01
67.0%