Skip to content

Unexpected 'java.lang.StackOverflowError' exception in TokenCache.java class #130

@narayanagowdas

Description

@narayanagowdas

Hi,

I'm getting 'java.lang.StackOverflowError' exception from authenticationResult.account() when both accountCacheEntity and account are null;

Scenario causing the issue is,

  • Trying to fetch token using ConfidentialClientApplication acquireToken(ClientCredentialParameters parameters) method.

  • Able to successfully fetch the token by passing ClientCredentialParameters. Responses received are
    httpResponse :{"token_type":"Bearer","expires_in":3600,"ext_expires_in":3600,"access_token":"<ACTUAL_TOKEN>"}
    TokenResponse : tokens = {"access_token":"<ACTUAL_TOKEN>","id_token":"","token_type":"Bearer","expires_in":3600}

  • The AuthenticationResult received in the TokenRequest.java class contains valid values for "accessToken", "extExpiresOn", "expiresOn" and "environment". All other fields including accountCacheEntity and account are null.

  • When accountCacheEntity and account is null, authenticationResult.account() in the TokenCache.java class is throwing 'java.lang.StackOverflowError' for account field.

Screen Shot 2019-11-21 at 10 45 25 PM

Is this an open issue? or please let me know if I am missing something. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions