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 SDK not working with android.enableR8.fullMode=true #526

Closed
jaroslavhavelik opened this issue Apr 25, 2023 · 2 comments
Closed

Android SDK not working with android.enableR8.fullMode=true #526

jaroslavhavelik opened this issue Apr 25, 2023 · 2 comments
Assignees
Milestone

Comments

@jaroslavhavelik
Copy link

After enabling full mode within R8 via android.enableR8.fullMode=true (or by default since AGP 8+) we are getting the following error when attempting to enroll activation:

io.getlime.security.powerauth.networking.exceptions.FailedApiException: Unable to invoke no-args constructor for class io.getlime.security.powerauth.networking.model.response.EciesEncryptedResponse. Registering an InstanceCreator with Gson for this type may fix this problem. at io.getlime.security.powerauth.networking.client.HttpRequestHelper.buildResponseException(HttpRequestHelper.java:363) at io.getlime.security.powerauth.networking.client.HttpRequestHelper.buildResponse(HttpRequestHelper.java:243) at io.getlime.security.powerauth.networking.client.HttpClientTask.doInBackground(HttpClientTask.java:201) at android.os.AsyncTask$3.call(AsyncTask.java:394)

Can you please suggest (or even better update consumer proguard rules) so we can use full mode of R8.

@jaroslavhavelik jaroslavhavelik changed the title Android SDK not working with R8.fullMode is enabled Android SDK not working with android.enableR8.fullMode=true Apr 25, 2023
@hvge
Copy link
Member

hvge commented May 25, 2023

Backport to release/1.7.x

@hvge hvge added this to the 1.8.0 milestone May 25, 2023
@kober32
Copy link
Member

kober32 commented Jun 21, 2023

This should be fixed by adding following rule to the https://github.com/wultra/powerauth-mobile-sdk/blob/develop/proj-android/PowerAuthLibrary/proguard-rules.pro

-keep class io.getlime.security.powerauth.networking.model.** {
    <fields>;
}

@hvge hvge closed this as completed in 39a5b0f Sep 14, 2023
hvge added a commit that referenced this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants