coolcat
09/23/2020, 8:03 AMMaurice Jouvet
09/23/2020, 8:30 AMTask sharedgenerateIosX64MainDatabaseInterface UP-TO-DATE
Task sharedcompileKotlinIosX64
Task sharedlinkDebugFrameworkIosX64e: Compilation failed: The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ command returned non-zero exit code: 1. output: error: Invalid record (Producer: 'LLVM8.0.0svn' Reader: 'LLVM APPLE_1_1103.0.32.62_0') 1 error generated.
tylerwilson
09/23/2020, 1:22 PMthalescm
09/23/2020, 3:29 PMthalescm
09/23/2020, 3:35 PMJohn Gainfort
09/23/2020, 6:48 PMJohn Gainfort
09/23/2020, 6:49 PMimplementation(project(":cmcd"))
Pandu
09/24/2020, 1:28 AMChristian Jensen
09/25/2020, 6:18 AM@JsExport
) from multiplatform, so a sample would be nice...Vinod Rai
09/25/2020, 9:38 AMCaused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json Kt"
Paulius Ruminas
09/25/2020, 11:02 AMClass.forName(A::class.java.name).kotlin
but I wonder if there is a multiplatform solution.Vinod Rai
09/25/2020, 12:39 PMException in thread "main" kotlinx.serialization.SerializationException: Serializer for class 'Repository' is not found. Mark the class as @Serializable or provide the serializer explicitly.
Already all data classes marked @Serializable, getting this error in android when calling API implemented in the multiplatform library.Evan
09/25/2020, 9:17 PMHttpClient: -> Cache-Control: no-store, no-cache, max-age=0
HttpClient: -> Content-Type: application/json
HttpClient: -> Date: Fri, 25 Sep 2020 01:32:40 GMT
HttpClient: -> Pragma: no-cache
HttpClient: -> Server: Kestrel
HttpClient: -> Transfer-Encoding: Identity
HttpClient: BODY Content-Type: application/json
HttpClient: BODY START
Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[MainDispatcher, Continuation @ $split$lambda-0$<anonymous>_3COROUTINE$2]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
at 0 companySharedSampleApplication 0x00000001009aa97c kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 124 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:14:63)
at 1 companySharedSampleApplication 0x0000000100b23d6c kfun:kotlinx.coroutines.CoroutinesInternalError#<init>(kotlin.String;kotlin.Throwable){} + 124 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Exceptions.common.kt:28:77)
at 2 companySharedSampleApplication 0x0000000100b72019 kfun:kotlinx.coroutines.DispatchedTask#handleFatalException(kotlin.Throwable?;kotlin.Throwable?){} + 953 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:93:22)
at 3 companySharedSampleApplication 0x0000000100b71bf7 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3543 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:64:13)
at 4 companySharedSampleApplication 0x0000000100ba96d8 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 88 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:35:19)
at 5 companySharedSampleApplication 0x0000000100ba9aae kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$41.invoke#internal + 62 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:34:51)
at 6 companySharedSampleApplication 0x0000000100ba9b0e kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$41.$<bridge-UNN>invoke(){}#internal + 62 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:34:51)
at 7 companySharedSampleApplication 0x0000000100baabc7 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge8 + 183 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:34:51)
at 8 libdispatch.dylib 0x00000001016858ac _dispatch_call_block_and_release + 12
at 9 libdispatch.dylib 0x0000000101686a88 _dispatch_client_callout + 8
at 10 libdispatch.dylib 0x0000000101694f23 _dispatch_main_queue_callback_4CF + 1152
at 11 CoreFoundation 0x00007fff203a8276 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
at 12 CoreFoundation 0x00007fff203a2b06 __CFRunLoopRun + 2685
at 13 CoreFoundation 0x00007fff203a1b9e CFRunLoopRunSpecific + 567
at 14 GraphicsServices 0x00007fff2b773db3 GSEventRunModal + 139
at 15 UIKitCore 0x00007fff24660af3 -[UIApplication _run] + 912
at 16 UIKitCore 0x00007fff24665a04 UIApplicationMain + 101
at 17 iosSampleApp 0x000000010068b74b main + 75 (/Users/ep/workspace/company-multiplatform/company-kmm-sdk/iosSampleApplication/iosApp/AppDelegate.swift:6:7)
at 18 libdyld.dylib 0x00007fff20257415 start + 1
Caused by: kotlinx.coroutines.CompletionHandlerException: Exception in completion handler ChildCompletion[ChildHandle[DeferredCoroutine{Cancelled}@326b548], kotlin.Unit] for DeferredCoroutine{Cancelled}@326b548
at 0 companySharedSampleApplication 0x00000001009aab3c kfun:kotlin.Exception#<init>(kotlin.String?;kotlin.Throwable?){} + 124 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:25:63)
at 1 companySharedSampleApplication 0x00000001009aad8c kfun:kotlin.RuntimeException#<init>(kotlin.String?;kotlin.Throwable?){} + 124 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:36:63)
at 2 companySharedSampleApplication 0x0000000100b23ccc kfun:kotlinx.coroutines.CompletionHandlerException#<init>(kotlin.String;kotlin.Throwable){} + 124 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Exceptions.common.kt:13:78)
at 3 companySharedSampleApplication 0x0000000100b29a36 kfun:kotlinx.coroutines.JobSupport.notifyCompletion#internal + 1606 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:365:9)
at 4 companySharedSampleApplication 0x0000000100b28668 kfun:kotlinx.coroutines.JobSupport.completeStateFinalization#internal + 1464 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:326:25)
at 5 companySharedSampleApplication 0x0000000100b267f9 kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 1705 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:241:9)
at 6 companySharedSampleApplication 0x0000000100b33704 kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 2036 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:922:16)
at 7 companySharedSampleApplication 0x0000000100b32de0 kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 736 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:875:16)
at 8 companySharedSampleApplication 0x0000000100b32802 kfun:kotlinx.coroutines.JobSupport#makeCompletcompanynce(kotlin.Any?){}kotlin.Any? + 642 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:840:30)
at 9 companySharedSampleApplication 0x0000000100b053d6 kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 310 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:111:21)
at 10 companySharedSampleApplication 0x00000001009d396a kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1450 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43:32)
at 11 companySharedSampleApplication 0x0000000100b716d8 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2232 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:53:21)
at 12 companySharedSampleApplication 0x0000000100ba96d8 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 88 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:35:19)
... and 14 more common stack frames skipped
Caused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.AwaitAll.AwaitAllNode@1f33078
at 0 companySharedSampleApplication 0x00000001009b1d4d kfun:kotlin.Throwable#<init>(kotlin.String?){} + 93 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Throwable.kt:23:37)
at 1 companySharedSampleApplication 0x00000001009aaa8b kfun:kotlin.Exception#<init>(kotlin.String?){} + 91 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
at 2 companySharedSampleApplication 0x00000001009aacdb kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 91 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
at 3 companySharedSampleApplication 0x00000001009e092b kfun:kotlin.native.concurrent.InvalidMutabilityException#<init>(kotlin.String){} + 91 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/native/concurrent/Freezing.kt:22:60)
at 4 companySharedSampleApplication 0x00000001009e21e2 ThrowInvalidMutabilityException + 690 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/native/concurrent/Internal.kt:92:11)
at 5 companySharedSampleApplication 0x0000000100adb91c MutationCheck + 108
at 6 companySharedSampleApplication 0x0000000100b07a26 kfun:kotlinx.coroutines.AwaitAll.AwaitAllNode.<set-handle>#internal + 102 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Await.kt:94:18)
at 7 companySharedSampleApplication 0x0000000100b06bf8 kfun:kotlinx.coroutines.AwaitAll.await#internal + 1240 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Await.kt:68:17)
at 8 companySharedSampleApplication 0x0000000100b06161 kfun:kotlinx.coroutines.$awaitAllCOROUTINE$1#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 1425 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Await.kt:38:62)
at 9 companySharedSampleApplication 0x0000000100b06434 kfun:kotlinx.coroutines#awaitAll@kotlin.collections.Collection<kotlinx.coroutines.Deferred<0:0>>(){0§<kotlin.Any?>}kotlin.collections.List<0:0> + 244 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Await.kt:37:16)
at 10 companySharedSampleApplication 0x0000000100c92a56 kfun:io.ktor.util.$split$lambda-0COROUTINE$3.invokeSuspend#internal + 2358 (/opt/buildAgent/work/a85294440dc5c6e/ktor-utils/common/src/io/ktor/util/ByteChannels.kt:29:23)
at 11 companySharedSampleApplication 0x00000001009d36b6 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 758 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:30:39)
at 12 companySharedSampleApplication 0x0000000100b71912 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2802 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:39:50)
at 13 companySharedSampleApplication 0x0000000100ba96d8 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 88 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt:35:19)
myrronth
09/27/2020, 8:49 AMandylamax
09/28/2020, 3:29 AMfaogustavo
09/29/2020, 6:56 PMstreetsofboston
09/29/2020, 8:54 PMios()
into
val onPhone = System.getenv("SDK_NAME")?.startsWith("iphoneos") ?: false
if (onPhone) {
iosArm64("ios")
} else {
iosX64("ios")
}
However, this causes the packForXcode
task configuration to fail because of this expression:
kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
To fix this, change the above expression to:
kotlin.targets.getByName<KotlinNativeTarget>("ios").binaries.getFramework(mode)
After this, you may get red-lines in the commonMain
source-set.
To fix this, disable setting the enableGranularSourceSetsMetadata
in your gradle.properties
, like this:
...
#kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
KamilH
10/02/2020, 8:29 AMandroid
target then in the jvm
main function I’m getting this error above. When I’m creating a new project with exactly the same configuration, but without android
target it’s working properly, main function compiles and it is printing a message
Any guess what is causing this problem?KamilH
10/02/2020, 11:12 AMbuild.gradle
file and try to compile. I commented following lines:
id(com.android.library)
id(kotlin-android-extensions)
kotlin { android() }
val androidMain by getting
val androidTest by getting
android { }
and after that my jvmMain
main function works. I think it is some kind of bug, right? Where can I report this?Sourabh Rawat
10/02/2020, 11:51 AMid("com.android.library")
removes all my other sourcesets 😕darkmoon_uk
10/04/2020, 11:18 AMdarkmoon_uk
10/04/2020, 11:21 AMmbonnin
10/05/2020, 9:48 AMzeugederunity
10/05/2020, 9:53 AMinline fun <reified T> T.call(block: (T)->Unit){
if (T::class == Array::class){
error("This is an array")
}
block(this)
}
I found the issue regarding that problem, but i dont know if implementing that workaround isArray
like mentioned in the issue is still the way to go. https://youtrack.jetbrains.com/issue/KT-32839
My implementation of the workaround looks like this:
// Commons
expect val KClass<*>.isArray: Boolean
// JS
actual val KClass<*>.isArray: Boolean get() = this == Array::class
// JVM
actual val KClass<*>.isArray: Boolean get() = java.isArray
joney
10/05/2020, 1:21 PMbinaries { }
block in ios { }
packForXcode
fails with Key debugFramework is missing in the map
on
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
Any Idea what I could be doing wrong?rocketraman
10/05/2020, 2:02 PMCFlow
mentioned above from the Kotlin MPP conference app for properly closing the job associated with reading the StateFlow
, and Kodein for injecting the shared view model into both Android and Swift code, and I've successfully gotten an MPP app with iOS and Android views driven by StateFlow
working!Tijl
10/05/2020, 3:07 PMetolstoy
10/06/2020, 4:20 PMTobi
10/08/2020, 2:28 PMThread 1: EXC_BAD_ACCESS (code=1, address=0x5fff89815c80)
, somewhere in the ktor coroutines stack.
My code so far is fairly simple:
class DoSomeWork(
private val domainUrl: String,
private val ktorClient: HttpClient,
private val onResponse: (Response) -> Unit = {_ ->}
) {
private val scope = MainScope()
operator fun invoke() {
scope.launch {
val response: Response = <http://ktorClient.post|ktorClient.post>(domainUrl) {
// . . .
}
onResponse(response)
}
}
companion object {
val json = Json {
encodeDefaults = false
ignoreUnknownKeys = true
}
}
}
Any idea what could be the reason?Kavita
10/09/2020, 5:10 PM