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

Proguard error when try to catch MsalUiRequiredException #1917

Open
thaworn-li opened this issue Oct 6, 2023 · 2 comments
Open

Proguard error when try to catch MsalUiRequiredException #1917

thaworn-li opened this issue Oct 6, 2023 · 2 comments
Labels
Inevstigation Engineering team as looked into the issue and needs deeper investigation to provide a conclusion
Projects

Comments

@thaworn-li
Copy link

Hi, I have a problem when try to build released app with proguard enable. we found an error like this when R8 minifiy

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.c

Screenshot 2566-10-07 at 01 14 27
@negoe negoe added the Inevstigation Engineering team as looked into the issue and needs deeper investigation to provide a conclusion label Oct 16, 2023
@negoe negoe added this to Investigation Required in Bug Triage Oct 16, 2023
@negoe
Copy link
Contributor

negoe commented Oct 16, 2023

Hi @thaworn-li Can you please share the following:

  • Device: [e.g. Pixel, OnePlus 6, etc]
  • Android Version: [e.g. API Level, Build Number]
  • MSAL Version

This needs further investigation from our side in order to confirm you.

@thaworn-li
Copy link
Author

thaworn-li commented Oct 19, 2023

Hi @negoe. Sorry to answer you late.

I try to build .aab release version to publish to playstore.

Here is my config in android project

  • const val SDK_MIN = 23
    const val SDK_TARGET = 33
    const val SDK_COMPILE = 33
    JAVA_VERSION = JavaVersion.VERSION_11
  • MSAL version = 4.9.0

Here is the code that causes proguard failure. If I remove this code, It will be work fine.

image

Build error message
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 72 other contexts)

image

@thaworn-li thaworn-li changed the title Proguard error when try to cache MsalUiRequiredException Proguard error when try to catch MsalUiRequiredException Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inevstigation Engineering team as looked into the issue and needs deeper investigation to provide a conclusion
Projects
Bug Triage
  
Investigation Required
Development

No branches or pull requests

2 participants