Describe the bug
From release 2.8.1 onwards the AWSIotMqttManager is no longer able to successfully reconnect after losing it's connection.
To Reproduce
Steps to reproduce the behavior:
AWSIotMqttManager with AWS with autoReconnect enabled and amountAWSIotMqttManager enters a state in which it periodically tries to reconnect AWSIotMqttManager keeps attempting to reconnect and each attempt failsWhich AWS service(s) are affected?
IoT
Expected behavior
After reestablishing the internet connection the AWSIotMqttManager should be able to successfully reconnect.
Screenshots
Not applicable
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
I tested all releases from 2.7.5 upwards. This bug seems to have originated in release 2.8.1 since all older releases don't have this problem, while all newer versions do. However no possible cause is mentioned in the release notes.
I'm aware of this issue: https://github.com/aws-amplify/aws-sdk-android/issues/394. However since the problem only occurs on another newer release it seems to me to be a different issue.
I also encountered the same problem, just as @rvp-thunderbuild described it.
I also encountered the problem!
@spmvanmierlo @rvp-thunderbuild @brandonbai Sorry for the inconvenience caused. Can you post a code snippet?
This is the main part of the code:
AWSIotMqttManager mAWSIotMqttManager = new AWSIotMqttManager("clientId", "endpoint");
// Omit credentialsProvider
mAWSIotMqttManager.connect(credentialsProvider, new AWSIotMqttClientStatusCallback(){
@Override
public void onStatusChanged(final AWSIotMqttClientStatus status, Throwable throwable) {
runOnUiThread(new Runnable() {
@Override
public void run() {
// Omit btn
Snackbar.make(btn, status.name(), Snackbar.LENGTH_LONG).show();
}
});
}
});
@rvp-thunderbuild @brandonbai @spmvanmierlo
We have released a fix for this in the version 2.9.1. Can you please update to the latest version and check if it fixes the issue?
@desokroshan Version 2.9.1 did indeed fix the problem. Thank you
@rvp-thunderbuild, thank you for confirming. I鈥檒l go ahead and close this issue.
Most helpful comment
I also encountered the same problem, just as @rvp-thunderbuild described it.