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
Describe the bug
When aws-android-sdk-iot is used in an Android app with R8/ProGuard enabled, then the essential code gets removed and the library doesn't work properly.
For example, I stumbled upon this exception (stacktrace deobfuscated by retrace):
java.util.MissingResourceException: Error locating the logging class
at org.eclipse.paho.client.mqttv3.logging.LoggerFactory.getLogger(LoggerFactory.java:76)
at org.eclipse.paho.client.mqttv3.TimerPingSender.<init>(TimerPingSender.java:34)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:317)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.connect(AWSIotMqttManager.java:918)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.connect(AWSIotMqttManager.java:869)
In that particular case, I guess that, ideally, it should be fixed in https://github.com/eclipse/paho.mqtt.java/ and I've already found an open issue there (eclipse-paho/paho.mqtt.java#776) but it's very old and nobody seems to care, so perhaps at least you could fix it on your side instead?
To Reproduce
Just try to invoke AWSIotMqttManager.connect in a build where code shrinking was enabled, e.g. release in this case:
Describe the bug
When
aws-android-sdk-iot
is used in an Android app with R8/ProGuard enabled, then the essential code gets removed and the library doesn't work properly.For example, I stumbled upon this exception (stacktrace deobfuscated by
retrace
):In that particular case, I guess that, ideally, it should be fixed in https://github.com/eclipse/paho.mqtt.java/ and I've already found an open issue there (eclipse-paho/paho.mqtt.java#776) but it's very old and nobody seems to care, so perhaps at least you could fix it on your side instead?
To Reproduce
Just try to invoke
AWSIotMqttManager.connect
in a build where code shrinking was enabled, e.g.release
in this case:Which AWS service(s) are affected?
aws-android-sdk-iot
Expected behavior
The library can successfully connect and function properly.
Screenshots
n/a
Environment Information (please complete the following information):
com.amazonaws:aws-android-sdk-iot:2.73.0
com.android.tools.build:gradle:8.1.3
(impliesandroid.enableR8.fullMode=true
)Additional context
n/a
The text was updated successfully, but these errors were encountered: