You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have received user feedback regarding issues with connecting to MQTT. Here are the details from two users:
Device Information:
User 1: iPhone 11, iOS 17.6.1, AWSIoT SDK version 2.36.7
User 2: iPhone 16 Pro Max, iOS 18.1, AWSIoT SDK version 2.37.2
Issue Reproduction:
For User 2, we have obtained logs but were unable to reproduce the issue.
The logs include detailed AWSIoT information, with the following key observation:
This occurred during a certificate existence check using AWSIoTManager.isValidCertificate(certificateId)
prior to calling AWSIoTManager.importIdentity.
Subsequent Behavior:
The AWSIoTManager.importIdentity method confirmed a successful return.
However, the connection attempt later failed with the following error:
MQTT session error, code: 3
If you have any suggestions or feedback regarding this issue, please let us know.
Thank you very much!
Log
November 23, 2024 at 12:25:09 AM EST [I AWSIoTDataManager.-[AWSIoTMQTTConfiguration initWithKeepAliveTimeInterval:baseReconnectTimeInterval:minimumConnectionTimeInterval:maximumReconnectTimeInterval:runLoop:runLoopMode:autoResubscribe:lastWillAndTestament:] 179] Initializing AWSIoTMqttConfiguration with KeepAlive:60.000000, baseReconnectTime:1.000000,minimumConnectionTime:1.000000, maximumReconnectTime:8.000000, autoResubscribe:Disabled, lwt topic: message:
November 23, 2024 at 12:25:09 AM EST [E AWSIoTKeychain.+[AWSIoTKeychain getIdentityRef:certificateLabel:] 370] getIdentityRef error: -25300
November 23, 2024 at 12:25:09 AM EST [D AWSIoTDataManager.-[AWSIoTDataManager connectWithClientId:cleanSession:certificateId:statusCallback:port:] 441] <<<NSThread: 0x30270ff40>{number = 10, name = (null)}>>In connectWithClientID
November 23, 2024 at 12:25:09 AM EST [I AWSIoTDataManager.-[AWSIoTDataManager connectWithClientId:cleanSession:certificateId:statusCallback:port:] 442] hostName: a2rac2pr1im2vr-ats.iot.us-west-2.amazonaws.com
November 23, 2024 at 12:25:09 AM EST [I AWSIoTDataManager.-[AWSIoTDataManager connectWithClientId:cleanSession:certificateId:statusCallback:port:] 443] URL: mqtts://a2rac2pr1im2vr-ats.iot.us-west-2.amazonaws.com
November 23, 2024 at 12:25:09 AM EST [I AWSIoTMQTTClient.-[AWSIoTMQTTClient connectWithCert] 303] user metadata is : ?SDK=iOS&Version=2.37.2
November 23, 2024 at 12:25:09 AM EST [I AWSIoTMQTTClient.-[AWSIoTMQTTClient connectWithCert] 305] Metrics collection is: Enabled
November 23, 2024 at 12:25:09 AM EST [I AWSMQTTSession.-[AWSMQTTSession initWithClientId:userName:password:keepAlive:cleanSession:willTopic:willMsg:willQoS:willRetainFlag:publishRetryThrottle:] 83] -[AWSMQTTSession initWithClientId:userName:password:keepAlive:cleanSession:willTopic:willMsg:willQoS:willRetainFlag:publishRetryThrottle:] [Line 83], Thread:<NSThread: 0x30270ff40>{number = 10, name = (null)}
November 23, 2024 at 12:25:09 AM EST [D AWSMQTTMessage.+[AWSMQTTMessage connectMessageWithClientId:userName:password:keepAlive:cleanSession:willTopic:willMsg:willQoS:willRetain:] 66] +[AWSMQTTMessage connectMessageWithClientId:userName:password:keepAlive:cleanSession:willTopic:willMsg:willQoS:willRetain:] [Line 66], Thread:<NSThread: 0x30270ff40>{number = 10, name = (null)}
November 23, 2024 at 12:25:09 AM EST [D AWSMQTTMessage.+[AWSMQTTMessage connectMessageWithClientId:userName:password:keepAlive:cleanSession:willTopic:willMsg:willQoS:willRetain:] 104] Creating AWSMQTTMessage with raw data >>>>> {length = 95, bytes = 0x00044d51 54540482 003c003a 696f732d ... 6e3d322e 33372e32 } <<<<<
November 23, 2024 at 12:25:09 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread main] 59] Started execution of Thread: [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]
November 23, 2024 at 12:25:09 AM EST [I AWSMQTTSession.-[AWSMQTTSession connectToInputStream:outputStream:] 127] <<<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}>> Initializing MQTTEncoder and MQTTDecoder streams
November 23, 2024 at 12:25:09 AM EST [D AWSMQTTEncoder.-[AWSMQTTEncoder open] 40] opening encoder stream.
November 23, 2024 at 12:25:09 AM EST [D AWSMQTTDecoder.-[AWSMQTTDecoder open] 43] opening decoder stream.
November 23, 2024 at 12:26:09 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread timerHandler:] 150] Default run loop timer executed on Thread: [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]. isRunning = YES. isCancelled = NO
November 23, 2024 at 12:26:26 AM EST [V AWSMQTTEncoder.-[AWSMQTTEncoder stream:handleEvent:] 58] -[AWSMQTTEncoder stream:handleEvent:] [Line 58] EventCode:8, Thread: <AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}
November 23, 2024 at 12:26:26 AM EST [V AWSMQTTSession.-[AWSMQTTSession encoder:handleEvent:] 339] -[AWSMQTTSession encoder:handleEvent:] [Line 339], eventCode: 1
November 23, 2024 at 12:26:26 AM EST [E AWSMQTTSession.-[AWSMQTTSession error:] 652] MQTT session error, code: 3
November 23, 2024 at 12:26:26 AM EST [D AWSMQTTEncoder.-[AWSMQTTEncoder close] 47] closing encoder stream.
November 23, 2024 at 12:26:26 AM EST [D AWSMQTTDecoder.-[AWSMQTTDecoder close] 50] closing decoder stream.
November 23, 2024 at 12:26:27 AM EST [V AWSIoTMQTTClient.-[AWSIoTMQTTClient session:handleEvent:] 1022] MQTTSessionDelegate handleEvent: 3
November 23, 2024 at 12:26:27 AM EST [E AWSIoTMQTTClient.-[AWSIoTMQTTClient session:handleEvent:] 1080] MQTTSessionEventConnectionError: Received an MQTT session connection error
November 23, 2024 at 12:26:28 AM EST [I AWSIoTMQTTClient.-[AWSIoTMQTTClient reconnectToSession] 724] Attempting to reconnect.
November 23, 2024 at 12:26:28 AM EST [I AWSIoTMQTTClient.-[AWSIoTMQTTClient connectWithCert] 303] user metadata is : ?SDK=iOS&Version=2.37.2
November 23, 2024 at 12:26:28 AM EST [I AWSIoTMQTTClient.-[AWSIoTMQTTClient connectWithCert] 305] Metrics collection is: Enabled
November 23, 2024 at 12:26:28 AM EST [V AWSIoTMQTTClient.-[AWSIoTMQTTClient connectWithCert] 387] Issued Cancel on thread [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]
November 23, 2024 at 12:26:28 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread cancelAndDisconnect:] 104] Issued Cancel and Disconnect = [NO] on thread [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]
November 23, 2024 at 12:26:28 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread main] 59] Started execution of Thread: [<AWSIoTStreamThread: 0x301c96c00>{number = 24, name = (null)}]
November 23, 2024 at 12:26:28 AM EST [I AWSMQTTSession.-[AWSMQTTSession connectToInputStream:outputStream:] 127] <<<AWSIoTStreamThread: 0x301c96c00>{number = 24, name = (null)}>> Initializing MQTTEncoder and MQTTDecoder streams
November 23, 2024 at 12:26:28 AM EST [D AWSMQTTEncoder.-[AWSMQTTEncoder open] 40] opening encoder stream.
November 23, 2024 at 12:26:28 AM EST [D AWSMQTTDecoder.-[AWSMQTTDecoder open] 43] opening decoder stream.
November 23, 2024 at 12:26:37 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread cleanUp] 140] Skipping disconnect for thread: [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]
November 23, 2024 at 12:26:37 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread main] 94] Finished execution of Thread: [<AWSIoTStreamThread: 0x301c63f80>{number = 14, name = (null)}]
November 23, 2024 at 12:27:28 AM EST [V AWSIoTStreamThread.-[AWSIoTStreamThread timerHandler:] 150] Default run loop timer executed on Thread: [<AWSIoTStreamThread: 0x301c96c00>{number = 24, name = (null)}]. isRunning = YES. isCancelled = NO
The text was updated successfully, but these errors were encountered:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
We have received user feedback regarding issues with connecting to MQTT. Here are the details from two users:
Device Information:
User 1: iPhone 11, iOS 17.6.1, AWSIoT SDK version 2.36.7
User 2: iPhone 16 Pro Max, iOS 18.1, AWSIoT SDK version 2.37.2
Issue Reproduction:
For User 2, we have obtained logs but were unable to reproduce the issue.
The logs include detailed AWSIoT information, with the following key observation:
[AWSIoTKeychain getIdentityRef:certificateLabel:] 370] getIdentityRef error: -25300
This occurred during a certificate existence check using
AWSIoTManager.isValidCertificate(certificateId)
prior to calling
AWSIoTManager.importIdentity.
The AWSIoTManager.importIdentity method confirmed a successful return.
However, the connection attempt later failed with the following error:
MQTT session error, code: 3
If you have any suggestions or feedback regarding this issue, please let us know.
Thank you very much!
The text was updated successfully, but these errors were encountered: