Make the client login handshake timeout configurable (session.loginTimeout)
Describe your idea
Problem. The client's initial login handshake has a hard-coded 1000 ms timeout (Login.timeout in detox/src/client/actions/actions.js). When the Detox server takes longer than a second to acknowledge login — e.g. remotely-managed or slowly-allocated devices — the run fails immediately with:
The tester has not received a response within 1000ms timeout to the message: Login { ... }
There is currently no way to raise this from configuration; the only workarounds are forking Detox or monkey-patching Login.prototype.timeout.
Proposal. Add a session.loginTimeout option (milliseconds), defaulting to 1000 (no behavior change), threaded through to the Login action. It mirrors the existing session.debugSynchronization option.
{
"session": {
"server": "ws://localhost:8099",
"loginTimeout": 30000
}
}Alternatives considered.
- Env var / CLI flag — less discoverable and less natural than a
sessionconfig field. - Leaving it hard-coded — forces forks/monkey-patching for any setup where the server needs >1s to become ready.
I have a change ready (config option + validation + type + tests + docs) and can open the PR against this issue.
Source: wix/Detox