element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.39k stars 731 forks source link

Crash on startup on Android 14 #8105

Open K900 opened 1 year ago

K900 commented 1 year ago

Steps to reproduce

Element Android 1.5.24 crashes on startup on Android 14 developer preview:

02-09 19:52:26.820 28109 28109 E AndroidRuntime: Process: im.vector.app, PID: 28109
02-09 19:52:26.820 28109 28109 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {im.vector.app/im.vector.application.features.Alias}: java.lang.RuntimeException: /data/user/0/im.vector.app/files/97bdd7ffe800db3f0ae6db1c3edbc561/crypto_store.realm: Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 1836. Current pid is 28109. in /tmp/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107

Outcome

What did you expect?

No crash.

What happened instead?

Crash.

Your phone model

Google Pixel 6

Operating system version

Android 14 developer preview UPP1.230113.009

Application version and app store

Element version 1.5.24 from Github artifacts

Homeserver

Synapse 1.76 on matrix.0upti.me

Will you send logs?

Yes

Are you willing to provide a PR?

No

jdauphant commented 1 year ago

Not sur it's linked to Android 14, I have the same stack trace on Android 9


--------------------------------- crash call stack ---------------------------------
Element Build : 402080002
SDK Version : 1.5.26 (c2011a29)
Phone : SM-G950F (G950FXXUCDVG4 9 REL)
Memory statuses
usedSize   7 MB
freeSize   0 MB
totalSize   8 MB
Thread: main, Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.gouv.tchap.a/im.vector.app.features.home.HomeActivity}: java.lang.RuntimeException: java.lang.RuntimeException: /data/user/0/fr.gouv.tchap.a/files/eb2c9d2fab07c38ce7cf2829cb8bdb3a/crypto_store.realm: Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 10754. Current pid is 23712. in /tmp/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7050)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: /data/user/0/fr.gouv.tchap.a/files/eb2c9d2fab07c38ce7cf2829cb8bdb3a/crypto_store.realm: Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 10754. Current pid is 23712. in /tmp/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107
    at im.vector.app.core.di.VectorViewModelFactory.create(VectorViewModelFactory.kt:5)
    at im.vector.app.core.di.VectorViewModelFactory.create(VectorViewModelFactory.kt:12)
    at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:10)
    at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:16)
    at im.vector.app.features.home.HomeActivity.onCreate(HomeActivity.kt:34)
    at android.app.Activity.performCreate(Activity.java:7327)
    at android.app.Activity.performCreate(Activity.java:7318)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)
    ... 11 more
Caused by: java.lang.RuntimeException: /data/user/0/fr.gouv.tchap.a/files/eb2c9d2fab07c38ce7cf2829cb8bdb3a/crypto_store.realm: Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 10754. Current pid is 23712. in /tmp/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107
    at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(Native Method)
    at io.realm.internal.OsSharedRealm.<init>(OsSharedRealm.java:11)
    at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:8)
    at io.realm.BaseRealm.<init>(BaseRealm.java:19)
    at io.realm.Realm.<init>(Realm.java:8)
    at io.realm.Realm.getInstance(Realm.java:101)
    at org.matrix.android.sdk.internal.crypto.store.db.HelperKt.doRealmTransaction(Helper.kt:15)
    at org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore.<init>(RealmCryptoStore.kt:72)
    at org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore_Factory.get(RealmCryptoStore_Factory.java:58)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:14)
    at org.matrix.android.sdk.internal.crypto.MXOlmDevice_Factory.get(MXOlmDevice_Factory.java:15)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:14)
    at org.matrix.android.sdk.internal.crypto.tasks.DefaultSetDeviceNameTask_Factory.get(DefaultSetDeviceNameTask_Factory.java:29)
    at org.matrix.android.sdk.internal.crypto.RoomDecryptorProvider_Factory.get(RoomDecryptorProvider_Factory.java:3)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:14)
    at dagger.internal.DelegateFactory.get(DelegateFactory.java:5)
    at org.matrix.android.sdk.internal.crypto.EventDecryptor_Factory.get(EventDecryptor_Factory.java:30)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:14)
    at org.matrix.android.sdk.internal.session.room.event.DefaultFilterAndStoreEventsTask_Factory.get(DefaultFilterAndStoreEventsTask_Factory.java:19)
    at org.matrix.android.sdk.internal.session.pushers.DefaultRemovePusherTask_Factory.get(DefaultRemovePusherTask_Factory.java:49)
    at fr.gouv.tchap.android.sdk.internal.session.room.TchapRoomGetter_Factory.get(TchapRoomGetter_Factory.java:35)
    at org.matrix.android.sdk.internal.session.room.EventRelationsAggregationProcessor_Factory.get(EventRelationsAggregationProcessor_Factory.java:48)
    at dagger.internal.SetFactory.get(SetFactory.java:89)
    at org.matrix.android.sdk.internal.database.EventInsertLiveObserver_Factory.get(EventInsertLiveObserver_Factory.java:11)
    at dagger.internal.SetFactory.get(SetFactory.java:89)
    at org.matrix.android.sdk.internal.session.DefaultSession_Factory.get(DefaultSession_Factory.java:86)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:14)
    at dagger.internal.DelegateFactory.get(DelegateFactory.java:5)
    at org.matrix.android.sdk.internal.session.DaggerSessionComponent$SessionComponentImpl.session(DaggerSessionComponent.java:3)
    at org.matrix.android.sdk.internal.auth.DefaultAuthenticationService.getLastAuthenticatedSession(DefaultAuthenticationService.kt:15)
    at im.vector.app.core.di.SessionInitializer.tryInitialize(SessionInitializer.kt:107)
    at im.vector.app.core.di.ActiveSessionHolder.getOrInitializeSession(ActiveSessionHolder.kt:23)
    at im.vector.app.core.di.ActiveSessionHolder$getSafeActiveSession$1.invokeSuspend(ActiveSessionHolder.kt:29)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:119)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:154)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:110)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:3)
    at im.vector.app.core.di.ActiveSessionHolder.getSafeActiveSession(ActiveSessionHolder.kt:7)
    at im.vector.app.core.di.ActiveSessionHolder.getActiveSession(ActiveSessionHolder.kt:1)
    at im.vector.app.DaggerVectorApplication_HiltComponents_SingletonC$SingletonCImpl.session(DaggerVectorApplication_HiltComponents_SingletonC.java:14)
    at im.vector.app.DaggerVectorApplication_HiltComponents_SingletonC$ActivityCImpl$SwitchingProvider.get(DaggerVectorApplication_HiltComponents_SingletonC.java:170)
    at im.vector.app.core.di.VectorViewModelFactory.create(VectorViewModelFactory.kt:4)
    ... 19 more

User-Agent: "(samsung SM-G950F; Android 9; Flavour GooglePlay; MatrixAndroidSdk2 1.5.26)"
app_language: "fr_FR"
branch_name: "main"
can_contact: "false"
default_app_language: "fr_FR"
device: "SM-G950F"
email: "undefined"
locale: "fr_FR"
matrix_sdk_version: "1.5.26 (c2011a29)"
multi_window: "OFF"
olm_version: "3.2.12 - olm version (3.2.11) - 92769ce-2022-05-30 13:55:34 -0400"
os: "9 (API 28) G950FXXUCDVG4-REL"
server_version: "undefined"
theme: "dark"
verbose_log: "OFF"
``