WalletConnect / kotlin-walletconnect-lib

library to use WalletConnect with Kotlin or Java
MIT License
147 stars 100 forks source link

Wallet connect library is working in debug mode but not in release mode #37

Closed Flaming19 closed 3 years ago

Flaming19 commented 3 years ago

Wallet connect library is working in debug mode but when we create release build it stops working and we start getting error on every wallet like trust, metamask etc.

Error Image Link : https://ibb.co/4dc0xxj [Trust wallet screen ] same error on every wallet

Please help us, as we already spend day on this error.

ligi commented 3 years ago

do you use proguard in production?

Flaming19 commented 3 years ago

No,

below is my build type buildTypes { release { // TODO: Add your own signing config for the release build. signingConfig signingConfigs.release } }

ligi commented 3 years ago

sure signingConfigs.release does not include proguard? If it's not proguard I see no reason debug and release behave differently

Flaming19 commented 3 years ago

Please take a look on my signingConfigs.release

signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null storePassword keystoreProperties['storePassword'] } }

ligi commented 3 years ago

OK - see no proguard - can you provide the project code to reproduce?

ankii9600 commented 3 years ago

facing same issue

Flaming19 commented 3 years ago

@ligi yes, but my project is in flutter.

Flaming19 commented 3 years ago

Please let me know how can i share code with you.

ligi commented 3 years ago

oh - I do not want to read dart code - but this reminds me of: https://github.com/WalletConnect/kotlin-walletconnect-lib/issues/35 - also states flutter usage and the problem sounds similar - maybe you can try this workaround?

Flaming19 commented 3 years ago

Sure, But #35 still in open state. Is this already fixed? I will write this code in android also and share with you.

ligi commented 3 years ago

but he mentions a workaround there - can you please try it out and LMK if it works for you?

Flaming19 commented 3 years ago

Sure, I will.

Flaming19 commented 3 years ago

@ligi thanks for your help.

ligi commented 3 years ago

@Flaming19 so this worked for you?

Flaming19 commented 3 years ago

Yes, I add some other changes also to make it functional, But yes #35 also help me to resolve my issue. Closing this thread.

ghost commented 2 years ago

@Flaming19 I am also stuck on the same issue. May you share the changes that are required to make it work.

secret3579 commented 2 years ago

Any update?

bijoshdeveloper commented 2 years ago

@secret3579 Was facing the same issue

There is some issue with the payload adapter from Moshi when minify enabled. Tried many ways but none of them worked. So changed the implementation without Moshi by using the following repo

https://github.com/Haoxiqiang/android-wallet-connect-sdk

feynman-x commented 1 year ago

I solve it by add blow to proguard-rules.pro of app module:

-keep class org.walletconnect.** { *; }

Through the key I guess is EncryptedPayload class, but i add rule to keep all class of kotlin-walletconnect-lib to be on the safe side.

Hoping This Helps

Sotatek-NinhTran commented 1 year ago

I solve it by add blow to proguard-rules.pro of app module:

-keep class org.walletconnect.** { *; }

Through the key I guess is EncryptedPayload class, but i add rule to keep all class of kotlin-walletconnect-lib to be on the safe side.

Hoping This Helps

You save my life! Thank u