Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with rxSingle #3180

Closed
bmarty opened this issue Apr 14, 2021 · 1 comment · Fixed by #3215
Closed

Crash with rxSingle #3180

bmarty opened this issue Apr 14, 2021 · 1 comment · Fixed by #3215
Assignees

Comments

@bmarty
Copy link
Member

bmarty commented Apr 14, 2021

Fails fast feature must be on to see this problem. To reproduce: try to create a DM and type some chars in the search user field, in order to cancel a request.

    io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | Cancelled(throwable=kotlinx.coroutines.JobCancellationException: RxSingleCoroutine was cancelled; job=RxSingleCoroutine{Cancelling}@8b85a04)
        at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:9)
        at io.reactivex.plugins.RxJavaPlugins.handleUndeliverableException(RxJavaPlugins.java:2)
        at kotlinx.coroutines.rx2.RxSingleCoroutine.onCancelled(RxSingle.kt:3)
        at kotlinx.coroutines.AbstractCoroutine.onCompletionInternal(AbstractCoroutine.kt:2)
        at kotlinx.coroutines.JobSupport.finalizeFinishingState(JobSupport.kt:17)
        at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:27)
        at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:2)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:2)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:10)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:14)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:10)
     Caused by: Cancelled(throwable=kotlinx.coroutines.JobCancellationException: RxSingleCoroutine was cancelled; job=RxSingleCoroutine{Cancelling}@8b85a04)
        at org.matrix.android.sdk.internal.session.user.model.DefaultSearchUserTask.execute(SearchUserTask.kt:36)
        at org.matrix.android.sdk.internal.session.user.model.DefaultSearchUserTask$execute$1.invokeSuspend(Unknown Source:12)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:14) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1) 
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:10) 
     Caused by: kotlinx.coroutines.JobCancellationException: RxSingleCoroutine was cancelled; job=RxSingleCoroutine{Cancelling}@8b85a04
@bmarty
Copy link
Member Author

bmarty commented Apr 20, 2021

We should not wrap the CancellationException into Failure.Cancelled because this code will not work:

image

@bmarty bmarty self-assigned this Apr 20, 2021
bmarty added a commit that referenced this issue Apr 20, 2021
Do not wrap CancellationException to Failure.Cancelled, else RxCancellable will throw.
yostyle referenced this issue in tchapgouv/tchap-android Apr 29, 2021
Changes in Element 1.1.7 (2021-XX-XX)
===================================================

Features ✨:
 - Spaces beta

Improvements 🙌:
 - Add ability to install APK from directly from Element (#2381)

Bugfix 🐛:
 - Message states cosmetic changes (#3007)
 - Fix exception in rxSingle (#3180)
 - Do not invite the current user when creating a room (#3123)
 - Fix color issues when the system theme is changed (#2738)
 - Fix issues on Android 11 (#3067)
 - Fix issue when opening encrypted files (#3186)

Translations 🗣:
 -

SDK API changes ⚠️:
 - RegistrationWizard.createAccount() parameters are now all optional, following Matrix spec (#3205)

Build 🧱:
 - Upgrade to gradle 7

Test:
 -

Other changes:
 - New store descriptions

Changes in Element 1.1.6 (2021-04-16)
===================================================

Bugfix 🐛:
 - Fix crash on the timeline
 - App crashes on "troubleshoot notifications" button (#3187)

Changes in Element 1.1.5 (2021-04-15)
===================================================

Bugfix 🐛:
 - Fix crash during Realm migration
 - Fix crash when playing video (#3179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant