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 Java ClassCastException for Android clients #410

Open
6 tasks done
p-salmon opened this issue Feb 19, 2024 · 1 comment
Open
6 tasks done

Getting Java ClassCastException for Android clients #410

p-salmon opened this issue Feb 19, 2024 · 1 comment
Labels
android more info needed This issue is waiting for more information in order to progress

Comments

@p-salmon
Copy link

Checklist

Description

Hi everyone, thank you for the awesome project.

We are getting a singular error in our logs, here is a condensed trace:

Fatal Exception: java.lang.ClassCastException
fc.h cannot be cast to java.lang.String
  com.auth0.auth0_flutter.UserProfileExtensionsKt.getLocale (UserProfileExtensions.kt:57)
  com.auth0.auth0_flutter.UserProfileExtensionsKt.toMap (UserProfileExtensions.kt:23)
  com.auth0.auth0_flutter.request_handlers.web_auth.LoginWebAuthRequestHandler$handle$1.onSuccess (LoginWebAuthRequestHandler.kt:82)
  com.auth0.auth0_flutter.request_handlers.web_auth.LoginWebAuthRequestHandler$handle$1.onSuccess (LoginWebAuthRequestHandler.kt:64)
  com.auth0.android.provider.OAuthManager$resume$1$onSuccess$1.onSuccess (OAuthManager.kt:111)
  com.auth0.android.provider.OAuthManager$resume$1$onSuccess$1.onSuccess (OAuthManager.kt:109)
  com.auth0.android.provider.OAuthManager$assertValidIdToken$signatureVerifierCallback$1.onSuccess (OAuthManager.kt:179)
  com.auth0.android.provider.OAuthManager$assertValidIdToken$signatureVerifierCallback$1.onSuccess (OAuthManager.kt:157)
  com.auth0.android.provider.SignatureVerifier$1.onSuccess (SignatureVerifier.java:61)
  com.auth0.android.provider.SignatureVerifier$1.onSuccess (SignatureVerifier.java:56)
  com.auth0.android.request.internal.BaseRequest.start$lambda$2$lambda$0 (BaseRequest.kt:74)
  android.os.Handler.handleCallback (Handler.java:958)

This is coming from a single client:
Brand: Samsung
Model: Galaxy S22
Version: Android 14

When we look into the code, we can see this issue is coming from user profile extraction:

val UserProfile.locale: String?
    get() = getExtraInfo()["locale"] as String?

We're a little bit clueless on how to approach this bug resolution, and where hoping to find any ideas on how to solve this, just clues on how to solve this could be greatly appreciated, thanks.

Reproduction

We couldn't manage to reproduce the error, unfortunately.

Additional context

No response

auth0_flutter version

1.3.1

Flutter version

3.16.5

Platform

Android

Platform version(s)

14

@Widcket Widcket added the android label Mar 4, 2024
@Widcket
Copy link
Collaborator

Widcket commented Mar 4, 2024

Hi @p-salmon, thanks for raising this.

What is the value that comes in the "locale" claim?

@Widcket Widcket added the more info needed This issue is waiting for more information in order to progress label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android more info needed This issue is waiting for more information in order to progress
Projects
None yet
Development

No branches or pull requests

2 participants