https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
e

Evan

09/25/2020, 9:17 PM
I thought I had this Ktor networking with an MVP architecture working on iOS, but now I’m getting the following exception when trying to dispatch the result on
Dispatchers.Main
. Anyone else running into an error like this?
t

Tijl

09/25/2020, 9:19 PM
you need to upgrade to version
Copy code
1.3.9-native-mt-2
of
Copy code
org.jetbrains.kotlinx:kotlinx-coroutines-core
👍 1
e

Evan

09/25/2020, 9:34 PM
@Tijl thank you so much, that got things working again!
👍 1
n

nrobi

11/07/2020, 4:39 PM
Getting the same exception with
coroutines 1.3.9-native-mt-2
and
ktor 1.4.1
. @Tijl @Evan any ideas? 🤔
t

Tijl

11/07/2020, 4:43 PM
make sure you are actually using
coroutines 1.3.9-native-mt-2
and it’s not upgraded by some other dependency, you can do this (usually) by adding
!!
in the declaration
n

nrobi

11/07/2020, 4:44 PM
hmm, well I’m using
isForce
, since I had some issue s with
strictly
🤔
Copy code
implementation(Dependencies.Common.coroutine.Core) {
    isForce = true
}
t

Tijl

11/07/2020, 4:47 PM
this exact bug (waitAll not working), was fixed in that version, so then I’d double check your dependency graph. Are you sure you have the exact same cause as the exception? if it’s something else I’d open a new thread.
👍 1
n

nrobi

11/07/2020, 5:04 PM
I’m not sure it’s related to
awaitAll()
.
Copy code
Fatal exception in coroutines machinery for DispatchedContinuation[MainDispatcher
Tried using both the
Dispatchers.Main
, and a custom one with the
dispatch_async(dispatch_get_main_queue())
implementation 🤔
t

Tijl

11/07/2020, 5:14 PM
if you look at the stacktrace in this thread, it’s clearly awaitAll that is the cause, which was fixed in the version I pointed out, which is why it fixed the problem. if you don’t have awaitAll in your stacktrace, you have a different problem.
👍 1
n

nrobi

11/07/2020, 5:50 PM
You’re right, diving deeper in the stacktrace helped, looks like it’s the same as https://youtrack.jetbrains.com/issue/KTOR-1087
4 Views