You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get the peripheral using GlobalScope as a receiver for the CoroutineScope.peripheral extension function in the latest version (0.28.0) throws the following exception:
java.lang.IllegalStateException: Current context doesn't contain Job in it: com.myproject.di.modules.DomainModule$createConnectionScope$$inlined$CoroutineExceptionHandler$1@3595913
at kotlinx.coroutines.JobKt__JobKt.getJob(Job.kt:645)
at kotlinx.coroutines.JobKt.getJob(Unknown Source:1)
at com.juul.kable.BluetoothDeviceAndroidPeripheral.<init>(BluetoothDeviceAndroidPeripheral.kt:74)
at com.juul.kable.PeripheralKt.peripheral(Peripheral.kt:30)
at com.juul.kable.PeripheralKt.peripheral(Peripheral.kt:47)
at com.juul.kable.PeripheralKt.peripheral$default(Peripheral.kt:42)
For reference, the createConnectionScope function creates the scope which I use for all BLE operations and looks like this:
Trying to get the peripheral using GlobalScope as a receiver for the CoroutineScope.peripheral extension function in the latest version (0.28.0) throws the following exception:
For reference, the
createConnectionScope
function creates the scope which I use for all BLE operations and looks like this:Using
CoroutineScope(SupervisorJob() + Dispatchers.Default)
instead ofGlobalScope
works. The issue is not present in 0.27.0.The text was updated successfully, but these errors were encountered: