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

Getting several duplicate class error in modules bcpkix-jdk15on-1.56.0 and pkix-1.51.0 after installing freersap-react-native and building #13

Closed
roneyyb opened this issue Apr 15, 2023 · 10 comments
Assignees
Labels
bug Something isn't working waiting for response Response from reporter is needed

Comments

@roneyyb
Copy link

roneyyb commented Apr 15, 2023

Describe the bug
I am using react-native 0.69.9 and project works fine but after installing freersap-react-native and trying to build again after doing configuration I am getting duplicate class error

Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class org.spongycastle.cert.AttributeCertificateHolder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.AttributeCertificateIssuer found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertIOException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertRuntimeException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertUtils found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.X509AttributeCertificateHolder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.X509CRLEntryHolder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.X509CRLHolder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cms.DefaultCMSSignatureEncryptionAlgorithmFinder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 26s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/rajatbothra/Projects/StreakApp/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class org.spongycastle.cert.AttributeCertificateHolder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.AttributeCertificateIssuer found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertIOException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.cert.CertRuntimeException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder$1$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder$DigestOutputStream found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JceAsymmetricKeyUnwrapper found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JceAsymmetricKeyWrapper found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JceGenericKey found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JceSymmetricKeyUnwrapper found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.JceSymmetricKeyWrapper found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.OperatorHelper found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.OperatorHelper$OpCertificateException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.operator.jcajce.OperatorUtils found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.MacDataGenerator found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS10CertificationRequest found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS10CertificationRequestBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12MacCalculatorBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12MacCalculatorBuilderProvider found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12PfxPdu found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12PfxPduBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12SafeBag found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12SafeBagBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS12SafeBagFactory found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS8EncryptedPrivateKeyInfo found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCS8EncryptedPrivateKeyInfoBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCSException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.PKCSIOException found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS10CertificationRequest found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS10CertificationRequestBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12MacCalculatorBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12MacCalculatorBuilderProvider found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12MacCalculatorBuilderProvider$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12PBEInputDecryptorProviderBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12PBEInputDecryptorProviderBuilder$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12PBEInputDecryptorProviderBuilder$1$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12PBEOutputEncryptorBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.BcPKCS12PBEOutputEncryptorBuilder$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.PKCS12PBEUtils found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.bc.PKCS12PBEUtils$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcaPKCS10CertificationRequest found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcaPKCS12SafeBagBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcaPKCS8EncryptedPrivateKeyInfoBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilder found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilder$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilderProvider found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilderProvider$1 found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
Duplicate class org.spongycastle.tsp.TSPAlgorithms found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)

 Duplicate class org.spongycastle.tsp.TimeStampTokenInfo found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
 Duplicate class org.spongycastle.tsp.cms.CMSTimeStampedData found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
 Duplicate class org.spongycastle.tsp.cms.CMSTimeStampedDataGenerator found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
 Duplicate class org.spongycastle.tsp.cms.CMSTimeStampedDataParser found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)
 Duplicate class org.spongycastle.tsp.cms.CMSTimeStampedGenerator found in modules bcpkix-jdk15on-1.56.0 (com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0) and pkix-1.51.0 (com.madgag.spongycastle:pkix:1.51.0.0)

 
 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

To Reproduce
Installing freersap-react-native on a react-native 0.69.9 version project.

Expected behavior
It should show either the issue mentioned or initialization Success or initialization error

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Device: PIXEL 4A API 33
  • OS version: [e.g. iOS8.1]
  • Version of freeRASP: LATEST

Additional context
android/build.gradle

buildscript {
ext {
kotlin_version='1.6.10'
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 33
androidXCore = "1.6.0"
targetSdkVersion = 33
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
mavenCentral()
google()

    maven { url "https://jitpack.io" }
} 
dependencies {
   
     classpath("com.android.tools.build:gradle:7.1.1")
    classpath("com.facebook.react:react-native-gradle-plugin")
    classpath("de.undercouch:gradle-download-task:5.0.1")
  
    classpath("com.google.gms:google-services:4.3.10")

    classpath('com.google.firebase:firebase-crashlytics-gradle:2.6.1')
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files'

    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

}

}

allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}

    google()
    jcenter()
    maven { url 'https://www.jitpack.io' }
     maven{url = uri("https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp")}
    maven{url = uri("https://developer.huawei.com/repo/")}
    maven{url = uri("https://jitpack.io")}
}

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

configurations.all {
    resolutionStrategy {
        force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
            force 'androidx.core:core-ktx:1.6.0','com.facebook.react:react-native:'+ REACT_NATIVE_VERSION
             
    }
}
configurations.all {
    resolutionStrategy.force "com.google.android.material:material:1.5.0-alpha02"
}

}

@roneyyb roneyyb added the bug Something isn't working label Apr 15, 2023
@msikyna
Copy link
Member

msikyna commented Apr 19, 2023

Hello @roneyyb ,
we will look at the issue. Meanwhile, could you try to reintegrate it with the new version, which has been released yesterday?

Kind regards,
Talsec team

@tompsota
Copy link
Member

Hi @roneyyb,

It looks like there are two modules (bcpkix-jdk15on-1.56.0, pkix:1.51.0.0) that both contain the AttributeCertificateHolder class from the org.spongycastle.cert package (the latter is indeed from freeRASP).

To resolve this error, you need to determine which module you want to use and exclude the other one from the classpath.

To exclude the module from freeRASP, navigate to node_modules/freerasp-react-native/android/build.gradle and in dependencies, change implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:x.x.x" (replace x.x.x with the version of SDK you are using) to:

implementation("com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:x.x.x") {
    exclude group: 'com.madgag.spongycastle', module: 'pkix'
}

Let us know if this helped,
Talsec team

@msikyna msikyna added the waiting for response Response from reporter is needed label May 9, 2023
@AmineKenzup
Copy link

I'm having the same issue, is there are any ongoing fixes for this?

@tompsota
Copy link
Member

Hi @AmineKenzup,

you have to exclude the conflicting module manually, as explained here.

Unfortunately, as there may be conflict with any package that uses the same modules as freeRASP SDK, it is not possible to fix this issue on our side (freeRASP needs to include all its modules in case they aren't included by other packages, and vice versa).

Best,
Tomas, Talsec developer

@Neustradamus
Copy link

There are a lot of CVE in Spongy Castle, can you update to last Bouncy Castle version?

@msikyna
Copy link
Member

msikyna commented May 26, 2023

Hello @Neustradamus ,

we reviewed the issue and decided to remove the Bouncy Castle dependency in the next version of freeRASP.

Kind regards,
Talsec team

@roneyyb
Copy link
Author

roneyyb commented Jun 5, 2023

Hello @msikyna
When new version will be released. I am still seeing this issue.

@msikyna
Copy link
Member

msikyna commented Jun 7, 2023

Hello @roneyyb ,
we are planning to release a new version of freeRASP next week.

Kind regards,
Talsec team

@tompsota
Copy link
Member

Hello @roneyyb,

we removed the BouncyCastle dependency in v3.0.0, which was released yesterday. Updating freeRASP to the latest version should fix the duplicate class error.

Best,
Tomas, Talsec developer

@Neustradamus
Copy link

@talsec, @msikyna, @tompsota: Thanks a lot to all to have removed and created a new release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for response Response from reporter is needed
Projects
None yet
Development

No branches or pull requests

6 participants