Android Jetpack Compose Blank Login Page

I have an Android Jetpack Compose application, but the login experience using the Android Studio Emulator is not smooth. Not sure if it’s an emulator issue or something in my code.

MainActivity.kt:

class MainActivity : ComponentActivity() {
    private lateinit var account: Auth0

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
          Column(
                modifier = Modifier
                    .fillMaxSize()
                    .background(MaterialTheme.colorScheme.surface),
                horizontalAlignment = Alignment.CenterHorizontally,
                verticalArrangement = Arrangement.Center
            ) {
                Button(
                    colors = ButtonDefaults.buttonColors(
                        containerColor = MaterialTheme.colorScheme.primary),
                    onClick = { loginWithBrowser() }
                ) {
                    Text(text = "Login Button", color = MaterialTheme.colorScheme.onPrimary)
                }
            }
        }
    }

    fun loginWithBrowser() {
        WebAuthProvider.login(account)
            .withScheme(getString(R.string.com_auth0_scheme))
            .withScope("openid profile email")
            .withAudience("https://demo.api.com")
            // Launch the authentication passing the callback where the results will be received
            .start(this, object : Callback<Credentials, AuthenticationException> {
                // Called when there is an authentication failure
                override fun onFailure(error: AuthenticationException) {
                    // Something went wrong!
                    Log.d("Auth0", "$error")
                }

                // Called when authentication completed successfully
                override fun onSuccess(result: Credentials) {
                    // Get the access token from the credentials object.
                    // This can be used to call APIs
                    Log.d("Auth0", result.toString())
                    accessToken = result.accessToken
                    showUserProfile(accessToken)
                }
            })
    }

    fun logout() {
        WebAuthProvider.logout(account)
            .withScheme(getString(R.string.com_auth0_scheme))
            .start(this, object: Callback<Void?, AuthenticationException> {
                override fun onSuccess(result: Void?) {
                    // The user has been logged out!
                }

                override fun onFailure(error: AuthenticationException) {
                    // Something went wrong!
                }
            })
    }

    fun showUserProfile(accessToken: String) {
        val client = AuthenticationAPIClient(account)

        // With the access token, call `userInfo` and get the profile from Auth0.
        client.userInfo(accessToken)
            .start(object : Callback<UserProfile, AuthenticationException> {
                override fun onFailure(error: AuthenticationException) {
                    // Something went wrong!
                }

                override fun onSuccess(result: UserProfile) {
                    // We have the user's profile!
                    val res= result
                    Log.d("Auth0", "$result")
                }
            })
    }

}

And this code when the login button is pressed results in this blank emulator screen:

Another thing that might help is that the first time I login, the login providers do appear and I can get all the way to entering a password, but after that the screen is constantly loading. And then this blank screen happens any time after that. Not sure if this has to do with already being logged in if I am even am logged in.

Any help is appreciated since I have no clue what’s wrong.

-Thanks

EDIT: It also happens when logging out, so maybe something to do with Android App Links? (Although pressing the X to exit returns me back to my app)

EDIT 2: With the same client_id, domain, and callback using the example project, the login and logout work perfectly.

EDIT 3: I have copied the project multiple times and some seem to work and some don’t. May be an issue with Android Studio itself.

I’m having exactly the same issue, with screen when opening the login page.