socketio / socket.io-client-swift

Other
5.21k stars 839 forks source link

emitWithAck returning No ACK #1489

Open waqar681 opened 3 months ago

waqar681 commented 3 months ago

@nuclearace Need help

Screenshot 2024-05-08 at 8 02 12 PM image image
waqar681 commented 3 months ago

@drekka @bazza @nuclearace

hourksavet commented 3 months ago

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

waqar681 commented 3 months ago

@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 commented 3 months ago

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

image
hourksavet commented 3 months ago

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

waqar681 commented 3 months ago

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

hourksavet commented 3 months ago

@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.

waqar681 commented 3 months ago

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

hourksavet commented 3 months ago

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.

waqar681 commented 3 months ago

Namespace concatenate extra comma while connecting to server namespace

image image