Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOT Connection - java.lang.IllegalArgumentException: no NetworkModule installed for scheme “ssl” #3356

Closed
hardikdevios opened this issue Jul 12, 2023 · 7 comments

Comments

@hardikdevios
Copy link

Describe the bug
After updating the AWS SDK Library to 2.71.0 I am getting the following exception from mqttManager?.connect() function

java.lang.IllegalArgumentException: no NetworkModule installed for scheme “ssl” of URI “ssl://xxxxxxxxxxxxxx-xxx.iot.xx-xxxx-1.amazonaws.com:8883”

Which AWS service(s) are affected?
AWS IOT

Environment Information (please complete the following information):

  • AWS Android SDK Version: 2.71.0
  • Device: Pixel 4a
  • Android Version: Pie 9.0
  • Specific to simulators: No
@tylerjroach
Copy link
Member

@hardikdevios This looks like it is coming from the Paho client. Can you try these proguard rules?
eclipse/paho.mqtt.java#572 (comment)

@hardikdevios
Copy link
Author

@hardikdevios This looks like it is coming from the Paho client. Can you try these proguard rules? eclipse/paho.mqtt.java#572 (comment)

Thank you, let me try it

@hardikdevios
Copy link
Author

@tylerjroach Proguard rules didn't work, still getting the same error

@hardikdevios
Copy link
Author

@tylerjroach Any idea, do we require any other proguard rules to get it working?

@hardikdevios
Copy link
Author

@tylerjroach Any way solved the issue, so I am closing the ticket

@tylerjroach
Copy link
Member

Sorry I had not gotten back to you yet but I am glad you resolved the issue. If there are any details that you can share, in case another customer runs into the same issue, it would be appreciated. Thanks!

@F1nny
Copy link

F1nny commented Jul 21, 2023

Thanks @tylerjroach for your help here, it appears that in the newer AWS SDK, the paho client SPI NetworkModuleFactory is now created as a service in the Android META-INF which was not the case in the prior versions (we hadn't updated since last year so was a bit of a jump). Due to some other factors our apk has to be resigned via command line which has always cleared the META-INF before resigning, and losing that service file is what caused the problem 😄 After reworking the resigning process, we're back to normal 🎉 Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants