java.lang.IllegalStateException

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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web26

  • via GitHub by genaforvena
    ,
  • via GitHub by Sutirth
    ,
  • Stack trace

    • 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 rx.internal.schedulers.ExecutorScheduler$ExecutorSchedulerWorker.run(ExecutorScheduler.java:104) 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Indri YunitaIndri Yunita
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Diogo JaymDiogo Jaym
    3 times, last one
    bayukresnobayukresno
    2 times, last one
    brunosatrianibrunosatriani
    12 times, last one
    1 more bugmates