Comments (5)
➤ PM Bot commented:
Jira ticket: RJAVA-1253
from realm-java.
@Okuro3499 Thank you for reporting.
Do you expect a schema migration? If so, the file will be deleted, and the schema version will be set to zero. What if you remove schemaVersion(4)
- will you still see the exception?
from realm-java.
I still get the same exception
from realm-java.
@Okuro3499 Hmm, usually RealmFileException
should have some more details about what is going on. Can it be that there is a file on the device when you throught play store, but not when you test it locally?
Seems like you are initializing the default configuration each time you call the get
-ter of realm
. You should probably just initialize and default configuration in init
and then obtain the actual instance when calling get
:
init {
Realm.init(context)
val config = RealmConfiguration.Builder()
.name(Realm.DEFAULT_REALM_NAME)
.deleteRealmIfMigrationNeeded().schemaVersion(4).build()
Realm.setDefaultConfiguration(config)
}
val realmInstance: Realm
get() {
return Realm.getInstance()
}
Not sure it has anything to do with your issue, but could be have an impact dependent on the rest of your realm-usage throughout the app.
Maybe try enabling logging in init
with:
RealmLog.setLevel(LogLevel.DEBUG);
And see if you can catch more info on the error ... or post the output here for us to interpret it.
from realm-java.
@rorbech I implemented as you advised and app still crashes on the device but log remains the same for the crash. checked the device and there is no new file created on the device when you downloaded through play store
class DatabaseService(context: Context) {
init {
Realm.init(context)
RealmLog.setLevel(LogLevel.DEBUG)
val config = RealmConfiguration.Builder()
.name(Realm.DEFAULT_REALM_NAME)
.deleteRealmIfMigrationNeeded()
.schemaVersion(4)
.allowWritesOnUiThread(true)
.build()
Realm.setDefaultConfiguration(config)
}
val realmInstance: Realm
get() {
return Realm.getDefaultInstance()
}
}
error is still same and only one type of device is still affected
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3946)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4126)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:108)
at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem (TransactionExecutor.java:195)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:157)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:90)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2544)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loopOnce (Looper.java:232)
at android.os.Looper.loop (Looper.java:317)
at android.app.ActivityThread.main (ActivityThread.java:8501)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:878)
Caused by io.realm.exceptions.RealmFileException:
at io.realm.internal.OsSharedRealm.nativeGetSharedRealm
at io.realm.internal.OsSharedRealm.<init> (OsSharedRealm.java:175)
at io.realm.internal.OsSharedRealm.getInstance (OsSharedRealm.java:260)
at io.realm.BaseRealm.<init> (BaseRealm.java:142)
at io.realm.BaseRealm.<init> (BaseRealm.java:109)
at io.realm.Realm.<init> (Realm.java:161)
at io.realm.Realm.createInstance (Realm.java:535)
at io.realm.RealmCache.createInstance (RealmCache.java:508)
at io.realm.RealmCache.doCreateRealmOrGetFromCache (RealmCache.java:461)
at io.realm.RealmCache.createRealmOrGetFromCache (RealmCache.java:422)
at io.realm.Realm.getDefaultInstance (Realm.java:443)
at org.ole.planet.myplanet.datamanager.DatabaseService.getRealmInstance (DatabaseService.kt:22)
at org.ole.planet.myplanet.ui.sync.SyncActivity.onCreate (SyncActivity.kt:151)
at org.ole.planet.myplanet.ui.sync.DashboardElementActivity.onCreate (DashboardElementActivity.kt:45)
at org.ole.planet.myplanet.ui.dashboard.DashboardActivity.onCreate (DashboardActivity.kt:79)
at android.app.Activity.performCreate (Activity.java:8767)
at android.app.Activity.performCreate (Activity.java:8745)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1519)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3928)
from realm-java.
Related Issues (20)
- * What went wrong: Execution failed for task ':ERemittance:kaptDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction > java.lang.reflect.InvocationTargetException (no error message) HOT 2
- Update to Core 13.26.0 or later HOT 2
- Devise public API to trigger client reset for a Realm file
- baseUrl Change
- May I ask which example would be better for Android Java project reference? HOT 2
- Model cannot be cast to ModelRealmProxyInterface while using realm jars built from source in Android Project HOT 6
- [realm-core-12.3.0] Assertion failed: false HOT 3
- Realm Transformer Output Missing During Android Instrumented Test HOT 3
- Realm.Init configuration take too long delay when move intent from 1st page into next page HOT 3
- Realm not opening when offline HOT 7
- Custom machines ignore some cpu architectures HOT 3
- RealmList is null in Java17 HOT 2
- SDKs should not consume stitch_ prefixed fields HOT 2
- Crash Java_io_realm_log_RealmLog_nativeLogToCoreLoggerBridge HOT 1
- Remove deprecated RealmObjectId HOT 2
- equalTo() is not working when we have two conditions on the same field HOT 6
- RealmResults iterator throw ArrayIndexOutOfBoundsException in concurrent case HOT 3
- UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH HOT 12
- [realm-core-13.23.0] Assertion failed: false HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realm-java.