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

Missing classes when R8 minify is enabled #1677

Open
lebeshev opened this issue Aug 15, 2022 · 9 comments
Open

Missing classes when R8 minify is enabled #1677

lebeshev opened this issue Aug 15, 2022 · 9 comments
Labels
Incoming Issue Untriaged New issues
Projects

Comments

@lebeshev
Copy link

Describe the bug
When building app with

    isMinifyEnabled = true
    proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")

and

dependencies {
    implementation("com.microsoft.identity.client:msal:4.0.0")
}

R8 produces following warnings:

Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 257 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: com.microsoft.identity.common.internal.ui.webview.ExpectedPage com.microsoft.identity.common.internal.ui.webview.OAuth2WebViewClient.mExpectedPage and 59 other contexts)

Smartphone (please complete the following information):

  • Android Version: API 31
  • MSAL Version: 4.0.0
@lebeshev
Copy link
Author

lebeshev commented Aug 15, 2022

My mistake. Full list of missing classes is this:

Missing class com.google.crypto.tink.subtle.Ed25519Sign$KeyPair (referenced from: com.nimbusds.jose.jwk.OctetKeyPair com.nimbusds.jose.jwk.gen.OctetKeyPairGenerator.generate())
Missing class com.google.crypto.tink.subtle.Ed25519Sign (referenced from: com.google.crypto.tink.subtle.Ed25519Sign com.nimbusds.jose.crypto.Ed25519Signer.tinkSigner and 2 other contexts)
Missing class com.google.crypto.tink.subtle.Ed25519Verify (referenced from: com.google.crypto.tink.subtle.Ed25519Verify com.nimbusds.jose.crypto.Ed25519Verifier.tinkVerifier and 2 other contexts)
Missing class com.google.crypto.tink.subtle.X25519 (referenced from: com.nimbusds.jose.JWECryptoParts com.nimbusds.jose.crypto.X25519Encrypter.encrypt(com.nimbusds.jose.JWEHeader, byte[]) and 2 other contexts)
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 257 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: com.microsoft.identity.common.internal.ui.webview.ExpectedPage com.microsoft.identity.common.internal.ui.webview.OAuth2WebViewClient.mExpectedPage and 59 other contexts)
Missing class javax.annotation.Nonnull (referenced from: com.microsoft.identity.common.java.telemetry.events.DeprecatedApiUsageEvent com.microsoft.identity.common.java.telemetry.events.DeprecatedApiUsageEvent.putDeprecatedClassUsage(java.lang.Class) and 4 other contexts)
Missing class javax.annotation.Nullable (referenced from: void com.microsoft.identity.common.java.exception.TerminalException.<init>(java.lang.String, java.lang.String) and 12 other contexts)
Missing class org.bouncycastle.asn1.ASN1Encodable (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.pkcs.PrivateKeyInfo (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.asn1.x509.AlgorithmIdentifier (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate) and 3 other contexts)
Missing class org.bouncycastle.cert.X509CertificateHolder (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 2 other contexts)
Missing class org.bouncycastle.cert.jcajce.JcaX509CertificateHolder (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.crypto.BlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.CipherParameters (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.InvalidCipherTextException (referenced from: byte[] com.nimbusds.jose.crypto.impl.LegacyAESGCM.decrypt(javax.crypto.SecretKey, byte[], byte[], byte[], byte[]) and 1 other context)
Missing class org.bouncycastle.crypto.engines.AESEngine (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.modes.GCMBlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]) and 2 other contexts)
Missing class org.bouncycastle.crypto.params.AEADParameters (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.params.KeyParameter (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider (referenced from: org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider com.nimbusds.jose.crypto.bc.BouncyCastleFIPSProviderSingleton.bouncyCastleFIPSProvider and 1 other context)
Missing class org.bouncycastle.jce.provider.BouncyCastleProvider (referenced from: org.bouncycastle.jce.provider.BouncyCastleProvider com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton.bouncyCastleProvider and 1 other context)
Missing class org.bouncycastle.openssl.PEMException (referenced from: java.security.KeyPair com.nimbusds.jose.jwk.PEMEncodedKeyParser.toKeyPair(org.bouncycastle.asn1.pkcs.PrivateKeyInfo) and 3 other contexts)
Missing class org.bouncycastle.openssl.PEMKeyPair (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.PEMParser (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter (referenced from: org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter com.nimbusds.jose.jwk.PEMEncodedKeyParser.pemConverter and 5 other contexts)

@lebeshev lebeshev changed the title Missing classes from edu.umd.cs.findbugs.annotations when minify is enabled Missing classes when R8 minify is enabled Aug 15, 2022
@negoe negoe added the Incoming Issue Untriaged New issues label Aug 22, 2022
@negoe negoe added this to Needs triage in Bug Triage Aug 22, 2022
@negoe negoe moved this from Needs triage to Investigation Required in Bug Triage Sep 12, 2022
@negoe negoe moved this from Investigation Required to Committed in Bug Triage Oct 17, 2022
@jairrab
Copy link

jairrab commented Jan 15, 2023

Saw similar warnings after adding the following dependency:

com.microsoft.identity.client:msal:4.1.0

Same issue after updating to 4.1.3

Logs:

WARNING:R8: Missing class com.google.auto.value.AutoValue$CopyAnnotations (referenced from: io.opentelemetry.sdk.common.InstrumentationLibraryInfo)
Missing class com.google.auto.value.extension.memoized.Memoized (referenced from: io.opentelemetry.api.common.Attributes io.opentelemetry.sdk.trace.internal.data.ImmutableExceptionEventData.getAttributes())
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 288 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: boolean com.microsoft.identity.common.crypto.AndroidWrappedKeyLoader.sSkipKeyInvalidationCheck and 64 other contexts)
Missing class org.bouncycastle.asn1.ASN1Encodable (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.pkcs.PrivateKeyInfo (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.asn1.x509.AlgorithmIdentifier (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate) and 3 other contexts)
Missing class org.bouncycastle.cert.X509CertificateHolder (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 2 other contexts)
Missing class org.bouncycastle.cert.jcajce.JcaX509CertificateHolder (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.crypto.BlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.CipherParameters (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.InvalidCipherTextException (referenced from: byte[] com.nimbusds.jose.crypto.impl.LegacyAESGCM.decrypt(javax.crypto.SecretKey, byte[], byte[], byte[], byte[]) and 1 other context)
Missing class org.bouncycastle.crypto.engines.AESEngine (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.modes.GCMBlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]) and 2 other contexts)
Missing class org.bouncycastle.crypto.params.AEADParameters (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.params.KeyParameter (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider (referenced from: org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider com.nimbusds.jose.crypto.bc.BouncyCastleFIPSProviderSingleton.bouncyCastleFIPSProvider and 1 other context)
Missing class org.bouncycastle.jce.provider.BouncyCastleProvider (referenced from: org.bouncycastle.jce.provider.BouncyCastleProvider com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton.bouncyCastleProvider and 1 other context)
Missing class org.bouncycastle.openssl.PEMKeyPair (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.PEMParser (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter (referenced from: org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter com.nimbusds.jose.jwk.PEMEncodedKeyParser.pemConverter and 5 other contexts)

@negoe negoe moved this from Committed to In Progress in Bug Triage Jan 30, 2023
@negoe negoe moved this from In Progress to Investigation Required in Bug Triage Jan 30, 2023
@argenkiwi
Copy link

I have upgraded to AGP 8.0 and I get an error when making a build with R8 enabled. I believe it is related to this change.

I am on v.4.2.0. Please advice on what rules I should apply to be able to finish the build process without these errors.

@krolikm
Copy link

krolikm commented May 23, 2023

Same issue in v4.5.0. I was able to build the app with these rules in proguard-rules.pro:

-dontwarn edu.umd.cs.findbugs.annotations.NonNull
-dontwarn edu.umd.cs.findbugs.annotations.Nullable
-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings

@dwane13
Copy link

dwane13 commented Jul 24, 2023

Same with 4.6.1

Missing class com.google.crypto.tink.subtle.Ed25519Sign (referenced from: com.google.crypto.tink.subtle.Ed25519Sign com.nimbusds.jose.crypto.Ed25519Signer.tinkSigner and 2 other contexts)
Missing class com.google.crypto.tink.subtle.Ed25519Verify (referenced from: com.google.crypto.tink.subtle.Ed25519Verify com.nimbusds.jose.crypto.Ed25519Verifier.tinkVerifier and 2 other contexts)
Missing class com.google.crypto.tink.subtle.X25519 (referenced from: com.nimbusds.jose.JWECryptoParts com.nimbusds.jose.crypto.X25519Encrypter.encrypt(com.nimbusds.jose.JWEHeader, byte[]) and 2 other contexts)
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 296 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: boolean com.microsoft.identity.common.crypto.AndroidWrappedKeyLoader.sSkipKeyInvalidationCheck and 70 other contexts)
Missing class org.bouncycastle.asn1.ASN1Encodable (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.pkcs.PrivateKeyInfo (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.asn1.x509.AlgorithmIdentifier (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate) and 3 other contexts)
Missing class org.bouncycastle.cert.X509CertificateHolder (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 2 other contexts)
Missing class org.bouncycastle.cert.jcajce.JcaX509CertificateHolder (referenced from: com.nimbusds.jose.jwk.ECKey com.nimbusds.jose.jwk.ECKey.parse(java.security.cert.X509Certificate))
Missing class org.bouncycastle.crypto.BlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.CipherParameters (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.InvalidCipherTextException (referenced from: byte[] com.nimbusds.jose.crypto.impl.LegacyAESGCM.decrypt(javax.crypto.SecretKey, byte[], byte[], byte[], byte[]) and 1 other context)
Missing class org.bouncycastle.crypto.engines.AESEngine (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.crypto.modes.GCMBlockCipher (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]) and 2 other contexts)
Missing class org.bouncycastle.crypto.params.AEADParameters (referenced from: org.bouncycastle.crypto.modes.GCMBlockCipher com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESGCMCipher(javax.crypto.SecretKey, boolean, byte[], byte[]))
Missing class org.bouncycastle.crypto.params.KeyParameter (referenced from: org.bouncycastle.crypto.engines.AESEngine com.nimbusds.jose.crypto.impl.LegacyAESGCM.createAESCipher(javax.crypto.SecretKey, boolean) and 1 other context)
Missing class org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider (referenced from: org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider com.nimbusds.jose.crypto.bc.BouncyCastleFIPSProviderSingleton.bouncyCastleFIPSProvider and 1 other context)
Missing class org.bouncycastle.jce.provider.BouncyCastleProvider (referenced from: org.bouncycastle.jce.provider.BouncyCastleProvider com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton.bouncyCastleProvider and 1 other context)
Missing class org.bouncycastle.jsse.BCSSLParameters (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context)
Missing class org.bouncycastle.jsse.BCSSLSocket (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 5 other contexts)
Missing class org.bouncycastle.jsse.provider.BouncyCastleJsseProvider (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.<init>())
Missing class org.bouncycastle.openssl.PEMException (referenced from: java.security.KeyPair com.nimbusds.jose.jwk.PEMEncodedKeyParser.toKeyPair(org.bouncycastle.asn1.pkcs.PrivateKeyInfo) and 3 other contexts)
Missing class org.bouncycastle.openssl.PEMKeyPair (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.PEMParser (referenced from: java.util.List com.nimbusds.jose.jwk.PEMEncodedKeyParser.parseKeys(java.lang.String) and 1 other context)
Missing class org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter (referenced from: org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter com.nimbusds.jose.jwk.PEMEncodedKeyParser.pemConverter and 5 other contexts)
Missing class org.conscrypt.Conscrypt$Version (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int))
Missing class org.conscrypt.Conscrypt (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int) and 4 other contexts)
Missing class org.conscrypt.ConscryptHostnameVerifier (referenced from: okhttp3.internal.platform.ConscryptPlatform$DisabledHostnameVerifier)
Missing class org.openjsse.javax.net.ssl.SSLParameters (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List))
Missing class org.openjsse.javax.net.ssl.SSLSocket (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context)
Missing class org.openjsse.net.ssl.OpenJSSE (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.<init>())

Is there any updates about this issue?

@andreas-umbricht
Copy link

With AGP 8.0 and sdk version 4.9.0, I receive the following errors:

Missing class com.google.crypto.tink.subtle.Ed25519Sign$KeyPair (referenced from: com.nimbusds.jose.jwk.OctetKeyPair com.nimbusds.jose.jwk.gen.OctetKeyPairGenerator.generate())
Missing class com.google.crypto.tink.subtle.Ed25519Sign (referenced from: com.google.crypto.tink.subtle.Ed25519Sign com.nimbusds.jose.crypto.Ed25519Signer.tinkSigner and 2 other contexts)
Missing class com.google.crypto.tink.subtle.Ed25519Verify (referenced from: com.google.crypto.tink.subtle.Ed25519Verify com.nimbusds.jose.crypto.Ed25519Verifier.tinkVerifier and 2 other contexts)
Missing class com.google.crypto.tink.subtle.X25519 (referenced from: com.nimbusds.jose.JWECryptoParts com.nimbusds.jose.crypto.X25519Encrypter.encrypt(com.nimbusds.jose.JWEHeader, byte[]) and 2 other contexts)
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 296 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: boolean com.microsoft.identity.common.crypto.AndroidWrappedKeyLoader.sSkipKeyInvalidationCheck and 71 other contexts)

Do you have any viable rules for R8 to avoid this?

@WonderCsabo
Copy link

WonderCsabo commented Feb 8, 2024

I get the following list with 5.0.0 :

Missing class com.google.crypto.tink.subtle.Ed25519Sign (referenced from: com.google.crypto.tink.subtle.Ed25519Sign com.nimbusds.jose.crypto.Ed25519Signer.tinkSigner and 2 other contexts)
Missing class com.google.crypto.tink.subtle.Ed25519Verify (referenced from: com.google.crypto.tink.subtle.Ed25519Verify com.nimbusds.jose.crypto.Ed25519Verifier.tinkVerifier and 2 other contexts)
Missing class com.google.crypto.tink.subtle.X25519 (referenced from: com.nimbusds.jose.JWECryptoParts com.nimbusds.jose.crypto.X25519Encrypter.encrypt(com.nimbusds.jose.JWEHeader, byte[]) and 2 other contexts)
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 302 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: boolean com.microsoft.identity.common.crypto.AndroidWrappedKeyLoader.sSkipKeyInvalidationCheck and 76 other contexts)

This library should package R8 rules in consumerProguardFiles, so users do not face this issue.

@MK2161
Copy link

MK2161 commented Feb 15, 2024

dependencies {
implementation("com.microsoft.identity.client:msal:4.0.0")
}

and
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
)

com.microsoft.identity.client:msal:4.5.0

Issue
Missing class edu.umd.cs.findbugs.annotations.NonNull (referenced from: java.util.Map com.microsoft.identity.common.java.challengehandlers.PKeyAuthChallenge.getChallengeHeaderWithSignedJwt(com.microsoft.identity.common.java.challengehandlers.IDeviceCertificate) and 13 other contexts)
Missing class edu.umd.cs.findbugs.annotations.Nullable (referenced from: android.app.Activity com.microsoft.identity.common.internal.platform.AndroidPlatformUtil.mActivity and 301 other contexts)
Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: boolean com.microsoft.identity.common.crypto.AndroidWrappedKeyLoader.sSkipKeyInvalidationCheck and 71 other contexts) how to fix it

@negoe
Copy link
Contributor

negoe commented Mar 28, 2024

Tracked internally Product Backlog Item 2093560: GitHub Investigate: Defined multiple times when R8 minify is enabled #1695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incoming Issue Untriaged New issues
Projects
Bug Triage
  
Investigation Required
Development

No branches or pull requests

9 participants