openwebnet / openwebnet-android

OpenWebNet Android client for My Home BTicino and Legrand home automation system
https://openwebnet.xyz
MIT License
34 stars 21 forks source link

Realm issue #75

Closed niqdev closed 7 years ago

niqdev commented 7 years ago
rx.exceptions.OnErrorNotImplementedException: 
  at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call (InternalObservableUtils.java:386)
  at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call (InternalObservableUtils.java:383)
  at rx.internal.util.ActionSubscriber.onError (ActionSubscriber.java:44)
  at rx.observers.SafeSubscriber._onError (SafeSubscriber.java:153)
  at rx.observers.SafeSubscriber.onError (SafeSubscriber.java:115)
  at com.github.openwebnet.repository.impl.CommonRealmRepositoryImpl.lambda$add$0 (CommonRealmRepositoryImpl.java:37)
  at com.github.openwebnet.repository.impl.CommonRealmRepositoryImpl$$Lambda$1.call (Unknown Source:6)
  at rx.Observable.subscribe (Observable.java:10352)
  at rx.Observable.subscribe (Observable.java:10319)
  at rx.Observable.subscribe (Observable.java:10124)
  at com.github.openwebnet.view.settings.GatewayEditTextPreference.addGateway (GatewayEditTextPreference.java:101)
  at com.github.openwebnet.view.settings.GatewayEditTextPreference.lambda$showDialog$0 (GatewayEditTextPreference.java:64)
  at com.github.openwebnet.view.settings.GatewayEditTextPreference$$Lambda$1.onClick (Unknown Source:4)
  at android.view.View.performClick (View.java:6291)
  at android.view.View$PerformClick.run (View.java:24931)
  at android.os.Handler.handleCallback (Handler.java:808)
  at android.os.Handler.dispatchMessage (Handler.java:101)
  at android.os.Looper.loop (Looper.java:166)
  at android.app.ActivityThread.main (ActivityThread.java:7358)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
Caused by: java.lang.IllegalArgumentException: 
  at io.realm.internal.SharedGroup.createNativeWithImplicitTransactions (Native Method)
  at io.realm.internal.SharedGroup.openSharedGroupOrFail (SharedGroup.java:95)
  at io.realm.internal.SharedGroup.<init> (SharedGroup.java:74)
  at io.realm.internal.SharedGroupManager.<init> (SharedGroupManager.java:49)
  at io.realm.BaseRealm.<init> (BaseRealm.java:86)
  at io.realm.Realm.<init> (Realm.java:135)
  at io.realm.Realm.createAndValidate (Realm.java:233)
  at io.realm.Realm.createInstance (Realm.java:214)
  at io.realm.RealmCache.createRealmOrGetFromCache (RealmCache.java:126)
  at io.realm.Realm.getDefaultInstance (Realm.java:160)
  at com.github.openwebnet.database.DatabaseRealm.getRealmInstance (DatabaseRealm.java:37)
  at com.github.openwebnet.database.DatabaseRealm.add (DatabaseRealm.java:41)
  at com.github.openwebnet.repository.impl.CommonRealmRepositoryImpl.lambda$add$0 (CommonRealmRepositoryImpl.java:33)
niqdev commented 7 years ago

This commit fixed the issue, due to an outdated version of Realm, upgrading the lib fixed the issue. This commit broke few tests, see this Released in version 2.12.1 still in beta