element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.01k stars 136 forks source link

Doesn't navigate to room from matrix.to link after joining #3002

Open Johennes opened 3 months ago

Johennes commented 3 months ago

Steps to reproduce

  1. Tap the matrix.to link in https://matrix.to/#/!QQpfJfZvqxbCfeDgCj:matrix.org/$94TsS-xTTz1mK5fvWd6Y5bU6fYSZoellxtyxh7RvG54?via=element.io&via=matrix.org&via=envs.net while not being in that room yet
  2. Follow the prompt to join the room
  3. Notice how you're left in the room that contains the link

Outcome

What did you expect?

To be dropped into the linked-to room after joining.

What happened instead?

No navigation, I'm left in the room that contains the link.

Your phone model

Pixel 6

Operating system version

Android 14

Application version and app store

0.4.13

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

Yes

jmartinesp commented 3 months ago

I'm afraid I couldn't reproduce the issue 🫤 .

Johennes commented 3 months ago

Hm, I wanted to try reproducing, left the room and tapped the link again but now it drops me back onto the link without even offering to join the room. 🤔

https://github.com/element-hq/element-x-android/assets/1137962/4956f307-e3db-4228-b7a2-1b2b33021db0

(In the video above I'm tapping the matrix.to link in the center of the screen)

jmartinesp commented 3 months ago

Oh I misunderstood your instructions, sorry. I managed to reproduce it by tapping on the link on the message linked in the PR:

10:04:31.550 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: Failed finding room with id=!SkrYaAfuWIioIKZoAu:tadzik.net.
                                                                             org.matrix.rustcomponents.sdk.RoomListException$RoomNotFound: roomName=!SkrYaAfuWIioIKZoAu:tadzik.net
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.read(matrix_sdk_ffi.kt:27994)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.read(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverter$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:213)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:225)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.liftFromRustBuffer(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.liftFromRustBuffer(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.lift(matrix_sdk_ffi.kt:226)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.lift(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.lift(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.RoomListException$ErrorHandler.lift(matrix_sdk_ffi.kt:27976)
                                                                                at org.matrix.rustcomponents.sdk.RoomListException$ErrorHandler.lift(matrix_sdk_ffi.kt:27975)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.uniffiCheckCallStatus(matrix_sdk_ffi.kt:289)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.access$uniffiCheckCallStatus(matrix_sdk_ffi.kt:1)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.uniffiRustCallAsync(matrix_sdk_ffi.kt:33658)
                                                                                at org.matrix.rustcomponents.sdk.RoomListService.room$suspendImpl(matrix_sdk_ffi.kt:14767)
                                                                                at org.matrix.rustcomponents.sdk.RoomListService.room(Unknown Source:0)
                                                                                at io.element.android.libraries.matrix.impl.roomlist.RoomListExtensionsKt.roomOrNull(RoomListExtensions.kt:132)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory.pairOfRoom-UILmRhc(RustRoomFactory.kt:109)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory.access$pairOfRoom-UILmRhc(RustRoomFactory.kt:44)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory$create$2.invokeSuspend(RustRoomFactory.kt:78)
                                                                                at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
                                                                                at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
                                                                                at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
                                                                              | RoomListExtensions.kt:134
10:04:31.552 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: No room cached for !SkrYaAfuWIioIKZoAu:tadzik.net | RustRoomFactory.kt:117
10:04:31.554 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: awaitAllRoomsAreLoaded: wait | RoomList.kt:70
10:04:31.564 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: Failed finding room with id=!SkrYaAfuWIioIKZoAu:tadzik.net.
                                                                             org.matrix.rustcomponents.sdk.RoomListException$RoomNotFound: roomName=!SkrYaAfuWIioIKZoAu:tadzik.net
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.read(matrix_sdk_ffi.kt:27994)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.read(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverter$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:213)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.liftFromRustBuffer(matrix_sdk_ffi.kt:225)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.liftFromRustBuffer(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.liftFromRustBuffer(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterRustBuffer$DefaultImpls.lift(matrix_sdk_ffi.kt:226)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.lift(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.FfiConverterTypeRoomListError.lift(matrix_sdk_ffi.kt:27982)
                                                                                at org.matrix.rustcomponents.sdk.RoomListException$ErrorHandler.lift(matrix_sdk_ffi.kt:27976)
                                                                                at org.matrix.rustcomponents.sdk.RoomListException$ErrorHandler.lift(matrix_sdk_ffi.kt:27975)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.uniffiCheckCallStatus(matrix_sdk_ffi.kt:289)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.access$uniffiCheckCallStatus(matrix_sdk_ffi.kt:1)
                                                                                at org.matrix.rustcomponents.sdk.Matrix_sdk_ffiKt.uniffiRustCallAsync(matrix_sdk_ffi.kt:33658)
                                                                                at org.matrix.rustcomponents.sdk.RoomListService.room$suspendImpl(matrix_sdk_ffi.kt:14767)
                                                                                at org.matrix.rustcomponents.sdk.RoomListService.room(Unknown Source:0)
                                                                                at io.element.android.libraries.matrix.impl.roomlist.RoomListExtensionsKt.roomOrNull(RoomListExtensions.kt:132)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory.pairOfRoom-UILmRhc(RustRoomFactory.kt:109)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory.access$pairOfRoom-UILmRhc(RustRoomFactory.kt:44)
                                                                                at io.element.android.libraries.matrix.impl.room.RustRoomFactory$create$2.invokeSuspend(RustRoomFactory.kt:82)
                                                                                at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
                                                                                at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
                                                                                at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
                                                                                at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
                                                                              | RoomListExtensions.kt:134
10:04:31.566 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: No room cached for !SkrYaAfuWIioIKZoAu:tadzik.net | RustRoomFactory.kt:117
10:04:31.568 org.matrix.rust.sdk     io.element.android.x.debug           D  elementx: No room found for !SkrYaAfuWIioIKZoAu:tadzik.net | RustRoomFactory.kt:86

It seems like EX (or the SDK, probably) can't find the room so it just cancels the transition.