aws-amplify / aws-sdk-android

AWS SDK for Android. For more information, see our web site:
https://docs.amplify.aws
Other
1.03k stars 548 forks source link

AwsMobileClient is not initialising automatically when i move to amplify 2.7.1 #3247

Closed ZubairAkber closed 1 year ago

ZubairAkber commented 1 year ago

Describe the bug I was using 1.30.0 version of amplify and every thing works fine, when i move to 2.7.1 and updated the code amplify works fine i just get the data and ready state is triggered but when it tries to connect to MQTT i got the following error

MQTT broker: a3jmi0po6ccx5n-ats.iot.ap-southeast-1.amazonaws.com:443 MQTT I Connection Lost com.amazonaws.AmazonClientException: Cognito Identity not configured System.err W com.amazonaws.AmazonClientException: Cognito Identity not configured System.err W at com.amazonaws.mobile.client.AWSMobileClient.getCredentials(AWSMobileClient.java:391) System.err W at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager$1.run(AWSIotMqttManager.java:993) System.err W at java.lang.Thread.run(Thread.java:1012)

What i have observed is AwsMobileClient is not initialised at the start of app when i use 2.7.1 and in case of 1.30.0 it is initialised properly at the start with the logs that its initialise is called.

I have create a bug on amplify repo as well https://github.com/aws-amplify/amplify-android/issues/2400

To Reproduce Simply update to 2.7.1 version of amplify from 1.30.0

Screenshots

image
dengdan154 commented 1 year ago

Closing this ticket as responded on the duplicate on amplify repo