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

Caused by java.lang.RuntimeException with proguard rules enabled. #76

Closed
snehas13 opened this issue Jun 9, 2020 · 4 comments
Closed
Assignees

Comments

@snehas13
Copy link

snehas13 commented Jun 9, 2020

Hi,

We are using plaid version 1.4.0 in our project and it works fine for debug builds.
But for release build when we enable proguard rules then we get below runtime exception.

We also use Tink library 1.3.0 version in our project for encryption and decryption.
Below exception is coming in the screen where we initialise Tink Library.

Caused by java.lang.RuntimeException
Field configName_ for c.b.c.a.j0.a3 not found. Known fields are [private com.google.crypto.tink.shaded.protobuf.Internal$i c.b.c.a.j0.a3.e, private static final c.b.c.a.j0.a3 c.b.c.a.j0.a3.f, private static volatile com.google.crypto.tink.shaded.protobuf.x0 c.b.c.a.j0.a3.g]

W.r.to initialization of Tink library we are following exact code mentioned in the Overview of below link.
https://github.com/google/tink

Request you to help us on this issue.

@JeroenMols JeroenMols self-assigned this Jun 9, 2020
@JeroenMols
Copy link
Contributor

Thanks for reporting! We are to reproduce a similar issue and are investigating what the cause might be.

@JeroenMols
Copy link
Contributor

Hi @snehas13 ,

Our SDK relies on Tink library version 1.4.0-rc2 and we suspect that this transitive dependency is causing your app to also use Tink version 1.4.0-rc2 instead of 1.3.0.

After some investigation we found that:

To verify that this is indeed the case, could you try adding the following configuration to your Proguard file and let us know if that solves your problem?

-keepclassmembers class * extends com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite {
  <fields>;
}

@snehas13
Copy link
Author

The given solution works :) Thanks a lot for the help.

@JeroenMols
Copy link
Contributor

JeroenMols commented Jun 11, 2020

Thanks for verifying!

Our next SDK release 2.0.0 will have these rules bundled in (for your convenience), once we are able to upgrade to Tink 1.4.0 we will do so and remove these rules.

You can preview that SDK version here: https://bintray.com/plaid/link-android/com.plaid.link/2.0.0-rc3
Note that we don't have an upgrade guide published yet, but we will do so as soon as we'll release 2.0.0 stable.

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

2 participants