SwiftMQTT icon indicating copy to clipboard operation
SwiftMQTT copied to clipboard

Stream Error / Socket Error in Swift 5 & Xcode 11 Beta

Open jamesbebbington opened this issue 5 years ago • 2 comments

I'm building a new app, targeting iOS 13 and using SwiftUI so am using Xcode 11 beta.

After receiving a message, the connection is then unexpectedly terminated:

Connected to MQTT server.
Subscribed to topic 'state'.
Message received:  Hello world
2019-07-14 16:55:49.128126+0100 MyApp[3575:118403] SocketStream read error [0x600001580540]: 1 54
Server disconnected: None
Server disconnected: Stream Error
Server disconnected: Stream Error
Connection failed:  Socket Error

This sounds very much like #39 and #42, however I've tried the Swift 5 and Xcode 10.2 fixes in in @anatoliykant's and @kervich's forks with no luck. Has anyone tested SwiftMQTT in Xcode 11 beta yet?

Thanks!

jamesbebbington avatar Jul 14 '19 16:07 jamesbebbington

@jamesbebbington I didn't try iOS 13 beta yet, however the issue you describe seems to be a different one - at least I see that you can subscribe to a channel and receive a message. I suggest that you first run the tests from SwiftMQTT to see what exactly is going wrong there (you might be getting ECONNRESET due to not responding to ping or something like that). Also, make sure that your issue is not a duplicate of #43

kervich avatar Jul 16 '19 12:07 kervich

Hey @kervich many thanks for getting back to me, I shall take a look.

jamesbebbington avatar Jul 16 '19 13:07 jamesbebbington