threefoldtech/mycelium

mobile(tracing): second start failed

Closed this issue · 1 comments

second start failed on Android, looks like because of the tracing module because the problem started at 6e8906a and by looking at the error message

D/mycelium( 8296): log: start_myceliumlog.target="mycelmob"log.module_path="mycelmob"log.file="src/lib.rs"log.line=14
E/mycelium( 8296): log: Caught a panic calling rust code: "failed to set global default subscriber: SetGlobalDefaultError(\"a global default trace dispatcher has already been set\")"log.target="uniffi_core::ffi::rustcalls"log.module_path="uniffi_core::ffi::rustcalls"log.file="/Users/ibk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uniffi_core-0.27.2/src/ffi/rustcalls.rs"log.line=195
E/[TunService]( 8296): startMycelium failed with exception
E/[TunService]( 8296): tech.threefold.mycelium.rust.uniffi.mycelmob.InternalException: failed to set global default subscriber: SetGlobalDefaultError("a global default trace dispatcher has already been set")
E/[TunService]( 8296): 	at tech.threefold.mycelium.rust.uniffi.mycelmob.MycelmobKt.uniffiCheckCallStatus(mycelmob.kt:292)
E/[TunService]( 8296): 	at tech.threefold.mycelium.rust.uniffi.mycelmob.MycelmobKt.access$uniffiCheckCallStatus(mycelmob.kt:1)
E/[TunService]( 8296): 	at tech.threefold.mycelium.rust.uniffi.mycelmob.MycelmobKt.startMycelium(mycelmob.kt:1266)
E/[TunService]( 8296): 	at tech.threefold.mycelium.TunService$start$1.invokeSuspend(TunService.kt:104)
E/[TunService]( 8296): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/[TunService]( 8296): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/[TunService]( 8296): 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
E/[TunService]( 8296): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
E/[TunService]( 8296): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
E/[TunService]( 8296): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
E/[TunService]( 8296): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
E/[TunService]( 8296): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

no issue on iOS