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

Fix crashes on conversation screen #1590

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Fix crashes on conversation screen #1590

merged 2 commits into from
Aug 1, 2024

Conversation

simophin
Copy link

@simophin simophin commented Aug 1, 2024

This should fix issues reported on Google Play Store:

The underlying problem is the suspend function throws an exception instead of using the ResultOf system.

Exception org.session.libsession.snode.OnionRequestAPI$HTTPRequestFailedAtDestinationException:
  at org.session.libsession.snode.OnionRequestAPI.handleResponse (OnionRequestAPI.kt:611)
  at org.session.libsession.snode.OnionRequestAPI.access$handleResponse (OnionRequestAPI.kt:38)
  at org.session.libsession.snode.OnionRequestAPI$sendOnionRequest$1$1.invoke (OnionRequestAPI.kt:378)
  at org.session.libsession.snode.OnionRequestAPI$sendOnionRequest$1$1.invoke (OnionRequestAPI.kt:375)
  at org.session.libsignal.utilities.ThreadUtils.queue$lambda$0 (ThreadUtils.kt:29)
  at org.session.libsignal.utilities.ThreadUtils.$r8$lambda$fBVaDXxK1lXFamZwYyxWNzVYu18
  at org.session.libsignal.utilities.ThreadUtils$$ExternalSyntheticLambda0.run
  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.kt:115)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:103)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:584)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:793)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:697)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:684)

@ThomasSession
Copy link
Collaborator

Ah nice I had these changes on my todo list...
Did you check that the receiving end of each of these call handle the error properly? Do they do anything with it?

Copy link

@bemusementpark bemusementpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, looks better, but should we just move to Result?

@simophin
Copy link
Author

simophin commented Aug 1, 2024

Yep it's now kotlin.Result

@simophin simophin merged commit 268b6cc into dev Aug 1, 2024
2 checks passed
@simophin simophin deleted the fix-onionreq-crash branch August 1, 2024 09:36
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 this pull request may close these issues.

3 participants