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

Crash for FORTSDKv1.6.1 #16

Open
riocallos opened this issue Jul 3, 2020 · 4 comments
Open

Crash for FORTSDKv1.6.1 #16

riocallos opened this issue Jul 3, 2020 · 4 comments

Comments

@riocallos
Copy link

riocallos commented Jul 3, 2020

Experienced a crash when my build settings are
minifyEnabled true
shrinkResources true

java.lang.IllegalAccessError: Field 'org.apache.commons.codec.binary.Base64.CHUNK_SEPARATOR' is inaccessible to class 'com.payfort.sdk.android.dependancies.security.aes.AESCipher' (declaration of 'com.payfort.sdk.android.dependancies.security.aes.AESCipher' appears in base.apk!classes2.dex) at com.payfort.sdk.android.dependancies.security.aes.AESCipher.getDecryptedMessage(AESCipher.java:7) at com.payfort.sdk.android.dependancies.security.aes.AESCipherManager.decryptMsg(AESCipherManager.java:2) at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:3) at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:1) at android.os.AsyncTask.finish(AsyncTask.java:695) at android.os.AsyncTask.access$600(AsyncTask.java:180) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

this is how my proguard-rules.pro looks

-keep class othercode.** { ; }
-dontwarn com.payfort.
*
-keep class com.payfort.** { ; }
-keep public interface com.payfort.
* {*;}
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.content.BroadcastReceiver
-keep class javax.** { ; }
-dontwarn de.keyboardsurfer.
*
-keep class de.keyboardsurfer.** { ; }
-dontwarn com.google.
*
-keep class com.google.** { ; }
-dontwarn org.bouncycastle.
*
-keep class org.bouncycastle.** { ; }
-dontwarn commons-codec.
*
-keep class commons-codec.** { ; }
-dontwarn com.victor.
*
-keep class com.victor.** { ; }
-dontwarn com.shamanland.
*
-keep class com.shamanland.** { ; }
-dontwarn com.android.
*
-keep class com.android.** { *; }

-dontwarn androidx.**
-keep class androidx.** { ; }
-keep interface androidx.
* { *; }

-dontwarn com.google.android.material.textfield.**
-keep class com.google.android.material.textfield.** { ; }
-keep interface com.google.android.material.textfield.
* { *; }

@riocallos riocallos changed the title Error for FortSDKv1.6 Crash for FortSDKv1.6.1 Jul 3, 2020
@riocallos riocallos changed the title Crash for FortSDKv1.6.1 Crash for FORTSDKv1.6.1 Jul 3, 2020
@PayFortIntegration
Copy link

PayFortIntegration commented Jul 14, 2020

Hi Riocallos,

Can you please check and make sure you are including all our Proguard rules included in our SDK file?
Attached our Proguard must be added in the application.

if that did not solve the problem, please share the proguard added in your application.
for any further assistance, please contact us directly on "[email protected]"

progaurd.txt

@riocallos
Copy link
Author

riocallos commented Jul 15, 2020

Hello,

Actually the progaurd.txt you attached produces a compile error in Android studio for the last three lines.
Expected [!]interface|@interface|class|enum

I can confirm that I have the same proguard as the one you've sent (after fixing the error). I'm attaching it here. Still experiencing the same crash.

proguard-rules.txt

@PayFortIntegration
Copy link

Hi Riocallos,

Thanks for your reply, can you please try the attached file, and confirm normal operations.

proguard-rules.txt

@riocallos
Copy link
Author

Hello,

Applied the new proguard you attached. Still the same crash/error.

java.lang.IllegalAccessError: Field 'org.apache.commons.codec.binary.Base64.CHUNK_SEPARATOR' is inaccessible to class 'com.payfort.sdk.android.dependancies.security.aes.AESCipher' (declaration of 'com.payfort.sdk.android.dependancies.security.aes.AESCipher' appears in base.apk!classes2.dex)

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