java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Leonardo Ferrari
, 1 year ago
Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.
via GitHub by zachtom
, 1 year ago
This Realm instance has already been closed, making it unusable.
via Stack Overflow by Zeyad Gasser
, 11 months ago
Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.
via GitHub by anjanibansal
, 1 year ago
This Realm instance has already been closed, making it unusable.
via GitHub by Nordlenning
, 1 year ago
This Realm instance has already been closed, making it unusable.
via GitHub by SergeyTrukhachev
, 1 year ago
This Realm instance has already been closed, making it unusable.
java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.
at io.realm.BaseRealm.checkIfValid(BaseRealm.java:456)
at io.realm.RealmResults.addChangeListener(RealmResults.java:926)
at io.realm.rx.RealmObservableFactory$5.call(RealmObservableFactory.java:147)
at io.realm.rx.RealmObservableFactory$5.call(RealmObservableFactory.java:131)
at rx.Observable.unsafeSubscribe(Observable.java:9860)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:9860)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:9860)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Users with the same issue

2 times, 1 year ago
3 times, 1 year ago
2 times, 1 year ago
12 times, 1 year ago
6 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.