element-hq / element-hq/element-android

SessionHolder.currentSession is null

Open
#4,704 3 comments 0 reactions 0 assignees View on GitHub
matrix-sdk
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Where are you starting? What can you see?
it happen when apps is restart or kill
2. What do you click?
kill the apps and open
3. More steps…

### Outcome

#### What did you expect?
get non null SessionHolder.currentSession
#### What happened instead?
it is getting null.

So my question is that when i call, val lastAuthenticatedSession = matrixAuthService.getLastAuthenticatedSession()
sometimes work, n sometimes it crash due to RealmFileException..

So what is the best way to get SessionHolder.currentSession not null? tq

### Your phone model

xiomi 9t

### Operating system version

android 10

### Application version and app store

_No response_

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.