Response code: Sampler error: unexpected frame type.

Issue #111 closed
Former user created an issue

I have a swift server where I try to send a WebSocket Ping/Pong, the ping works well. However the pong message is not being recognized. I get an error like this.

Thread Name: Send audio 1-1
Sample Start: 2019-05-15 12:39:58 CDT
Load time: 1
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:6
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): 
Response code: Sampler error: unexpected frame type.
Response message: Received: Binary frame, payload (length 201): 0x7b 0x22 0x70 0x61 0x79 0x6c 0x6f 0x61 0x64 0x22 0x3a 0x22 0x65 0x79 0x4a 0x72 ...


SampleResult fields:
ContentType: 
DataEncoding: null

Comments (2)

  1. Peter Doornbosch repo owner

    The binary frame the ping/pong sampler is reading was still in the buffer or in the network. The solution is to make sure you’ve read all frames before sending the ping. For example, use SingleReadSampler with “optional read” set to true.

  2. Log in to comment