Closed HunterAuras closed 6 years ago
Hi HunterH0me,
Could you elaborate on how you were switching wifi ? Could you attach adb logs from the device?
Thanks.
Hey bxpan: Thanks for your reply, simply to change the phone's wifi AP the issue will occur. Once if the error message appear the MQTT will nerver reconnect. The logs as below:
`11-08 09:57:54.190 11903-14605/com.test.home I/System.out: =====onMQTTMessageArrived $aws/things/us-east-1:76e1b330-6663-406c-81af-73cd6e7461f2_5d17a261-eada-4ef7-84a7-94ba26ec7950/shadow/update/documents {"previous":{"state":{"desired":{"power":0,"schedule":[]},"reported":{"power":1,"schedule":[]}},"metadata":{"desired":{"power":{"timestamp":1510106274},"schedule":[]},"reported":{"power":{"timestamp":1510105347},"schedule":[]}},"version":68},"current":{"state":{"desired":{"power":0,"schedule":[]},"reported":{"power":0,"schedule":[]}},"metadata":{"desired":{"power":{"timestamp":1510106274},"schedule":[]},"reported":{"power":{"timestamp":1510106275},"schedule":[]}},"version":69},"timestamp":1510106275,"clientToken":"69ce17d0"}
11-08 09:58:02.564 11903-14847/com.test.home W/InstanceID/Rpc: No response
11-08 09:58:10.997 11903-11903/com.test.home I/home-test: Network connection changed:1
11-08 09:58:10.997 11903-11903/com.test.home I/home-test: Network connection changed(isLogin):true
11-08 09:58:13.136 11903-14700/com.test.home E/ClientState: us-east-1:8e4085d5-803b-4751-a085-ab22b5ae190c_337: Timed out as no activity, keepAlive=10,000 lastOutboundActivity=1,510,106,283,131 lastInboundActivity=1,510,106,274,188 time=1,510,106,293,131 lastPing=1,510,106,283,131
11-08 09:58:19.196 11903-11903/com.test.home W/InstanceID/Rpc: Missing callback for 3 `
Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
To help us solve your problem better, please answer the following list of questions.
What service are you using? we use AWSIoT and Cognito to provide the credential
In what version of SDK are you facing the problem? aws-android-sdk-iot:2.4.1
Is the issue limited to Simulators / Actual Devices? Actual Devices
Can your problem be resolved if you bump to a higher version of SDK? If I use the newest version of SDK the problem still exist
Is this problem related to specific Android/OS version? No
Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem. When connected to the AWS MQTT then change the WIFI on the phone, then the MQTT pub not work
Please include a stacktrace if applicable. There are no logs for the MQTT reconnecting it only print "ClientState: us-east-1:6ae9b945-43fe-4759-8939-6e5a8e91faec_6: Timed out as no activity, keepAlive=10,000 lastOutboundActivity=1,509,952,387,380 lastInboundActivity=1,509,952,380,662 time=1,509,952,397,380 lastPing=1,509,952,387,380"
If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application by using Mobile Hub.