cashapp / zipline

Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs
Apache License 2.0
2.07k stars 158 forks source link

'Zipline closed' unexpectedly #886

Closed fluxxion82 closed 1 year ago

fluxxion82 commented 1 year ago

I'm running the redwood emoji search app and getting crashes in both android and ios app from a 'Zipline closed', IllegalStateException exception.

This is the emoji search app that I'm running: https://github.com/fluxxion82/redwoodEmojiSeach

I start the server locally with this command: ./gradlew -p presenter-treehouse :presenter-treehouse:serveDevelopmentZipline --info --continuous

I then launch both apps. Ui appears and able to use app fine. I then make a change to the code and the server redeploys. Everything still looks good. I then make a change to the code again (usually reverting what I just did), the server redeploys and then apps crash. Server seems to keep running and don't really see any errors.

Android stack trace >FATAL EXCEPTION: Treehouse Process: com.example.redwood.emojisearch.android.composeui, PID: 6432 java.lang.IllegalStateException: Zipline closed at app.cash.zipline.Zipline$endpoint$1.call(Zipline.kt:68) at app.cash.zipline.internal.bridge.OutboundCallHandler.call(OutboundCallHandler.kt:87) at app.cash.redwood.treehouse.lazylayout.api.LazyListIntervalContent$Item$Companion$Adapter$GeneratedOutboundService.get(properties.kt:29) at app.cash.redwood.treehouse.lazylayout.composeui.ComposeUiLazyColumn$value$1$1$1$1$1$1.get(ComposeUiLazyColumn.kt:58) at app.cash.redwood.treehouse.RealBinding$start$1.invokeSuspend(bindings.kt:117) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ea6ff8c, java.util.concurrent.Executors$FinalizableDelegatedExecutorService@13fa6d5]
ios stack trace >Uncaught Kotlin exception: kotlin.IllegalStateException: Zipline closed at 0 EmojiSearchApp 0x10033cfa3 kfun:kotlin.Throwable#(kotlin.String?){} + 123 at 1 EmojiSearchApp 0x100334e4b kfun:kotlin.Exception#(kotlin.String?){} + 119 at 2 EmojiSearchApp 0x100335117 kfun:kotlin.RuntimeException#(kotlin.String?){} + 119 at 3 EmojiSearchApp 0x100335903 kfun:kotlin.IllegalStateException#(kotlin.String?){} + 119 at 4 EmojiSearchApp 0x1005fbb6b kfun:app.cash.zipline.Zipline.object-1.call#internal + 571 at 5 EmojiSearchApp 0x1005d5bab kfun:app.cash.zipline.internal.bridge.OutboundCallHandler#call(app.cash.zipline.ZiplineService;kotlin.Int;kotlin.Array...){}kotlin.Any? + 1639 at 6 EmojiSearchApp 0x100717bef kfun:app.cash.redwood.treehouse.lazylayout.api.LazyListIntervalContent.Item.Companion.Adapter.GeneratedOutboundService.get#internal + 467 at 7 EmojiSearchApp 0x10073a53b kfun:app.cash.redwood.treehouse.lazylayout.uiview.CellContent.get#internal + 259 at 8 EmojiSearchApp 0x10071053f kfun:app.cash.redwood.treehouse.RealBinding.$start$lambda$2COROUTINE$9.invokeSuspend#internal + 563 at 9 EmojiSearchApp 0x10034179f kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result){} + 587 at 10 EmojiSearchApp 0x10059716b kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2699 at 11 EmojiSearchApp 0x1005ba36b kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda$0#internal + 155 at 12 EmojiSearchApp 0x1005ba763 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$252.invoke#internal + 95 at 13 EmojiSearchApp 0x1005ba877 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$252.$invoke(){}#internal + 95 at 14 EmojiSearchApp 0x1005bc053 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge991 + 279 at 15 libdispatch.dylib 0x1017d0593 _dispatch_call_block_and_release + 23 at 16 libdispatch.dylib 0x1017d1d5b _dispatch_client_callout + 15 at 17 libdispatch.dylib 0x1017e2807 _dispatch_main_queue_drain + 1315 at 18 libdispatch.dylib 0x1017e22d3 _dispatch_main_queue_callback_4CF + 39 at 19 CoreFoundation 0x180372ca3 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 11 at 20 CoreFoundation 0x18036d35f __CFRunLoopRun + 1955 at 21 CoreFoundation 0x18036c7a3 CFRunLoopRunSpecific + 583 at 22 GraphicsServices 0x188ff7c97 GSEventRunModal + 159 at 23 UIKitCore 0x10883237b -[UIApplication _run] + 867 at 24 UIKitCore 0x108836373 UIApplicationMain + 123 at 25 EmojiSearchApp 0x10031947b main + 63 (/Users/s.albury/Development/workspace/multiplatform/redwoodEmojiSeach/ios-uikit/EmojiSearchApp/AppDelegate.swift:) at 26 dyld 0x10129df9f 0x0 + 4314488735 at 27 ??? 0x101381e4f 0x0 + 4315422287 at 28 ??? 0x34007fffffffffff 0x0 + 3747135627460607999
swankjesse commented 1 year ago

I believe this is fixed with the latest LazyList updates.