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

App crash with code=M_UNKNOWN_TOKEN, message=Invalid access token passed[SDK] #8723

Open
mdhanif-simformsolutions opened this issue Dec 29, 2023 · 0 comments

Comments

@mdhanif-simformsolutions

Description

I've created a matrix session with credentials like below :-

val credential = Credentials(
                userId = userId, 
                accessToken = accessToken,
                homeServer = homeServer, 
                refreshToken = null, deviceId = deviceId
            )
currentSession = matrix.authenticationService().createSessionFromSso(
                homeServerConnectionConfig, credential
            )

here I am passing refresh token as null as i want my access token to not expire we haven't set any expiration time or session lifetime so my access token should be valid until my session is live.

Now when I try to open app after 1-2 days of login it start giving me below error :-

java.lang.RuntimeException: MatrixError(code=M_UNKNOWN_TOKEN, message=Invalid access token passed., consentUri=null, limitType=null, adminUri=null, retryAfterMillis=null, isSoftLogout=false, newLookupPepper=null, session=null, completedStages=null, flows=null, params=null)

this makes my app crash.

I am not sure how does my token gets invalid or expire as I don't have any method which does this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant