Skip to content

Fix crash in benchmark builds when a job makes a suspend websocket request. - #15133

Open
FlorianFiebig wants to merge 1 commit into
signalapp:mainfrom
FlorianFiebig:fix/benchmark-websocket-unsupported
Open

FlorianFiebig wants to merge 1 commit into
signalapp:mainfrom
FlorianFiebig:fix/benchmark-websocket-unsupported

Conversation

@FlorianFiebig

Copy link
Copy Markdown

First time contributor checklist

Contributor checklist

  • Virtual device, Android 17 (API 37, arm64)
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax (no open issue)

Description

In a benchmark build, sending a message to a new contact crashes the app. The prekey fetch calls sendRequestSuspend, and BenchmarkWebSocketConnection falls through to the WebSocketConnection default, which throws UnsupportedOperationException. runWithChatConnection has the same default.

E AndroidRuntime: FATAL EXCEPTION: JobRunner-Core-3
E AndroidRuntime: java.lang.UnsupportedOperationException: This connection does not support suspend sendRequest

This PR overrides both methods, matching ResponderWebSocketConnection in testShared. sendRequestSuspend answers like the existing sendRequest, and runWithChatConnection throws an IOException.

Tested with assemblePlayProdBenchmark, setup type message-send, sending a text to Buddy #0:

  • Before: the app crashes with the log above.
  • After: the send job gets an IOException, retries, and the message stays pending.

Written with help from Claude Code. I reviewed the change and tested it as described above.

…quest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant