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

Android app crash in release mode #443

Closed
ngbahiep opened this issue Jul 24, 2023 · 4 comments
Closed

Android app crash in release mode #443

ngbahiep opened this issue Jul 24, 2023 · 4 comments
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@ngbahiep
Copy link

Describe the bug

Hi,
I am using this sdk to connect to aws mqtt. everything works fine in debug mode. However, app crash in release mode.
I do some testing and found that if I set minifyEnabled and shrinkResources to false, it works. Otherwise, it does not.
Below is the error:
`#1 pc 001c3d97 /data/app/com.xxx.xxx-zJ8Km5JEAhZ5OvpxzwJOMQ==/lib/arm/libaws-crt-jni.so (aws_fatal_assert+50)'

'#2 pc 000525e3 /data/app/com.xxx.xxx-zJ8Km5JEAhZ5OvpxzwJOMQ==/lib/arm/libaws-crt-jni.so (cache_java_class_ids+17026)'

'#3 pc 000490ab /data/app/com.xxx.xxx-zJ8Km5JEAhZ5OvpxzwJOMQ==/lib/arm/libaws-crt-jni.so (Java_software_amazon_awssdk_crt_CRT_awsCrtInit+258)'

'#4 pc 0003677b /data/app/com.xxx.xxx-zJ8Km5JEAhZ5OvpxzwJOMQ==/oat/arm/base.odex (offset 0x34000)`

Expected Behavior

I expect app should work

Current Behavior

current is app crash

Reproduction Steps

It crashes when start connect to mqtt

Possible Solution

No response

Additional Information/Context

No response

SDK version used

v1.14.0

Environment details (OS name and version, etc.)

android

@ngbahiep ngbahiep added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2023
@bretambrose
Copy link
Contributor

Android isn't officially supported yet. I'll bring this up with the engineer working on it though.

@jmklix jmklix added feature-request A feature should be added or improved. p2 This is a standard priority issue and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2023
@bretambrose
Copy link
Contributor

I should have added to the original response: minify/shrink will absolutely not work under any circumstances until (unless) we add support to essentially skip the entire common runtime from the tree-shaking. The native part of the common runtime uses JNI references to classes and minify/shrink will throw those methods/classes away because it doesn't understand usage external to Java.

@ngbahiep
Copy link
Author

thank you @bretambrose . I excluded aws iot sdk in proguard file. my android app works now.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants