ooni / probe-multiplatform

1 stars 1 forks source link

feat: add engine bridge on ios. #31

Closed aanorbel closed 3 months ago

aanorbel commented 3 months ago

Closses https://github.com/ooni/probe-multiplatform/issues/20

Proposed changes

TODOs

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'go_seq_go_to_refnum on objective-c objects is not permitted' First throw call stack: ( 0 CoreFoundation 0x00000001804ae0f8 exceptionPreprocess + 172 1 libobjc.A.dylib 0x0000000180087db4 objc_exception_throw + 56 2 OONI Probe 0x000000010515f56c go_seq_go_to_refnum + 192 3 OONI Probe 0x000000010515b5e0 -[OonimkallSessionConfig setLogger:] + 168 4 OONI Probe 0x0000000102de40a8 $sSo38ComposeAppOonimkallBridgeSessionConfigP10OONI_ProbeE4toMkSo0ceF0CyF + 1332 5 OONI Probe 0x0000000102de3b34 $s10OONI_Probe18IosOonimkallBridgeC12doNewSession13sessionConfigSo010ComposeAppdeH0_pSo0kldehJ0_p_tKF + 76 6 OONI Probe 0x0000000102de41fc $s10OONI_Probe18IosOonimkallBridgeC12doNewSession13sessionConfigSo010ComposeAppdeH0_pSo0kldehJ0_p_tKFTo + 64 7 OONI Probe 0x0000000102e2c5f4 kotlin2objc_kfun:org.ooni.engine.OonimkallBridge#newSession(org.ooni.engine.OonimkallBridge.SessionConfig){}org.ooni.engine.OonimkallBridge.Session + 460 8 OONI Probe 0x0000000102e2c4d8 kotlin2objc_kfun:org.ooni.engine.OonimkallBridge#newSession(org.ooni.engine.OonimkallBridge.SessionConfig){}org.ooni.engine.OonimkallBridge.Session + 176 9 OONI Probe 0x0000000102e273c4 kfun:org.ooni.engine.OonimkallBridge#newSession(org.ooni.engine.OonimkallBridge.SessionConfig){}org.ooni.engine.OonimkallBridge.Session-trampoline + 108 10 OONI Probe 0x0000000102def738 kfun:org.ooni.engine.Engine#session(org.ooni.engine.models.TaskSettings){}org.ooni.engine.OonimkallBridge.Session + 224 11 OONI Probe 0x0000000102df1a48 kfun:org.ooni.engine.Engine.httpDo$lambda$3#internal + 204 12 OONI Probe 0x0000000102df2d78 kfun:org.ooni.engine.Engine.$httpDo$lambda$3$FUNCTION_REFERENCE$2.invoke#internal + 140 13 OONI Probe 0x00000001037eafa4 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 116 14 OONI Probe 0x00000001038dc9f4 kfun:kotlinx.coroutines.intrinsics#startUndispatchedOrReturnat__kotlinx.coroutines.internal.ScopeCoroutine<0:0>(0:1;kotlin.coroutines.SuspendFunction1<0:1,0:0>){0§<kotlin.Any?>;1§<kotlin.Any? 15 OONI Probe 0x0000000103865388 kfun:kotlinx.coroutines#withContext#suspend(kotlin.coroutines.CoroutineContext;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>;kotlin.coroutines.Continuation<0:0>){0§<k 16 OONI Probe 0x0000000102def9fc kfun:org.ooni.engine.Engine#httpDo#suspend(org.ooni.engine.models.TaskSettings;kotlin.coroutines.Continuation<kotlin.String?>){}kotlin.Any? + 292 17 OONI Probe 0x0000000102df0b3c kfun:org.ooni.engine.Engine.$startTask$lambda$1COROUTINE$0.invokeSuspend#internal + 1396 18 OONI Probe 0x0000000102df17fc kfun:org.ooni.engine.Engine.startTask$lambda$1#internal + 332 19 OONI Probe 0x0000000102df2ad0 kfun:org.ooni.engine.Engine.$startTask$lambda$1$FUNCTION_REFERENCE$0.invoke#internal + 140 20 OONI Probe 0x00000001037eb350 kfun:kotlin.coroutines.SuspendFunction1#invoke#suspend(1:0;kotlin.coroutines.Continuation<1:1>){}kotlin.Any?-trampoline + 116 21 OONI Probe 0x00000001038b322c kfun:kotlinx.coroutines.flow.ChannelFlowBuilder.collectTo#internal + 200 22 OONI Probe 0x0000000103904df8 kfun:kotlinx.coroutines.flow.internal.ChannelFlow#collectTo#suspend(kotlinx.coroutines.channels.ProducerScope<1:0>;kotlin.coroutines.Continuation){}kotlin.Any-trampoline + 76 23 OONI Probe 0x00000001038c2288 kfun:kotlinx.coroutines.flow.internal.ChannelFlow.$lambda$0#internal + 132 24 OONI Probe 0x00000001038c247c kfun:kotlinx.coroutines.flow.internal.ChannelFlow.$$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 136 25 OONI Probe 0x00000001037eafa4 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 116 26 OONI Probe 0x00000001036c14c0 kfun:kotlin.coroutines.intrinsics.object-4.invokeSuspend#internal + 732 27 OONI Probe 0x00000001037ea8c0 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 68 28 OONI Probe 0x00000001036be0b8 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 624 29 OONI Probe 0x00000001037ea9a0 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 100 30 OONI Probe 0x00000001038d2348 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1880 31 OONI Probe 0x00000001038ff964 kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 92 32 OONI Probe 0x00000001038d4d4c kfun:kotlinx.coroutines.internal.LimitedDispatcher.Worker.run#internal + 232 33 OONI Probe 0x00000001038ff964 kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 92 34 OONI Probe 0x00000001038f7ba0 kfun:kotlinx.coroutines.MultiWorkerDispatcher.$workerRunLoop$lambda$2COROUTINE$0.invokeSuspend#internal + 1468 35 OONI Probe 0x00000001037ea8c0 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any?-trampoline + 68 36 OONI Probe 0x00000001036be0b8 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 624 37 OONI Probe 0x00000001037ea9a0 kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 100 38 OONI Probe 0x00000001038d2348 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1880 39 OONI Probe 0x00000001038ff964 kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 92 40 OONI Probe 0x000000010387556c kfun:kotlinx.coroutines.EventLoopImplBase#processNextEvent(){}kotlin.Long + 1248 41 OONI Probe 0x00000001038ff6b0 kfun:kotlinx.coroutines.EventLoop#processNextEvent(){}kotlin.Long-trampoline + 52 42 OONI Probe 0x00000001038f1380 kfun:kotlinx.coroutines.BlockingCoroutine.joinBlocking#internal + 436 43 OONI Probe 0x00000001038f01e4 kfun:kotlinx.coroutines#runBlocking(kotlin.coroutines.CoroutineContext;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>){0§<kotlin.Any?>}0:0 + 1396 44 OONI Probe 0x00000001038f03c4 kfun:kotlinx.coroutines#runBlocking$default(kotlin.coroutines.CoroutineContext?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,0:0>;kotlin.Int){0§<kotlin.Any?>}0:0 + 240 45 OONI Probe 0x00000001038f5ff8 kfun:kotlinx.coroutines.MultiWorkerDispatcher.workerRunLoop#internal + 184 46 OONI Probe 0x00000001038f7260 kfun:kotlinx.coroutines.MultiWorkerDispatcher.$lambda$1$lambda$0#internal + 68 47 OONI Probe 0x00000001038f855c kfun:kotlinx.coroutines.MultiWorkerDispatcher.$$lambda$1$lambda$0$FUNCTION_REFERENCE$5.invoke#internal + 72 48 OONI Probe 0x00000001038f862c kfun:kotlinx.coroutines.MultiWorkerDispatcher.$$lambda$1$lambda$0$FUNCTION_REFERENCE$5.$invoke(){}#internal + 72 49 OONI Probe 0x00000001037e72cc kfun:kotlin.Function0#invoke(){}1:0-trampoline + 100 50 OONI Probe 0x00000001036ca190 WorkerLaunchpad + 132 51 OONI Probe
libc++abi: terminating due to uncaught exception of type NSException