socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

emitWithAck returning No ACK

Open waqar681 opened this issue 1 year ago • 10 comments

@nuclearace Need help Screenshot 2024-05-08 at 8 02 12 PM

image image

waqar681 avatar May 08 '24 15:05 waqar681

@drekka @bazza @nuclearace

waqar681 avatar May 08 '24 16:05 waqar681

Because ack is required server send an ack back Screenshot 2024-05-09 at 3 58 21 in the afternoon

hourksavet avatar May 09 '24 08:05 hourksavet

@hourksavet The server is successfully sending the acknowledgment back, as confirmed by testing in Postman. However, there's an issue: when the request is sent from an iOS, the server-side logs do not show the parameters. Interestingly, the parameters are visible in the logs when the request is sent from Postman

waqar681 avatar May 09 '24 09:05 waqar681

@hourksavet brother please see the below image for request from postman image

waqar681 avatar May 09 '24 09:05 waqar681

You set "timeout" = 1 second it too short time for sending data. Please test to increase your timeout. timeout will kill your emit thread.

Timeout it like to API request timeout

hourksavet avatar May 09 '24 09:05 hourksavet

@hourksavet I increase the timeout = 20 but still getting the same error "NO ACK"

waqar681 avatar May 09 '24 09:05 waqar681

@hourksavet I increase the timeout = 20 but still getting the same error "NO ACK"

Please check your formate data to emit, is formate [String: Any] or [Any] or not If your side follow by docs to emitWithAck, check logic ack code server side.

hourksavet avatar May 09 '24 09:05 hourksavet

@hourksavet @nuclearace I've tested with both [String: Any] and [Any], but I'm encountering the same error

waqar681 avatar May 09 '24 09:05 waqar681

I am using v15.2.0 and test with v16.1.0; It working. Maybe server side do eat you. NO ACK because your service side not call ack back.

hourksavet avatar May 09 '24 09:05 hourksavet

Namespace concatenate extra comma while connecting to server namespace

image image

waqar681 avatar May 09 '24 17:05 waqar681