Git Product home page Git Product logo

crashkios's Introduction

crashkios's People

Contributors

ben-whit-ley avatar chislett avatar filipdolnik avatar findjigar avatar juliajakubcova avatar kpgalligan avatar mrf7 avatar russhwolf avatar samhill303 avatar tadeaskriz avatar thomas-vos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crashkios's Issues

Setup and integrate Crashlytics sample

See the Bugsnag sample. We want settings.gradle.kts to include the parent build, and centralize as much of the version config as possible.

To discuss: should we just check the crashlytics confg into the repo or describe how to set it up?

"Undefined symbols for architecture x86_64" when building with 0.8.5

Our project used to compile successfully with CrashKiOS 0.8.2 however when updating to 0.8.5 it now fails with:

06:36:18 > Task :shared:bugsnag:public:linkDebugTestIosX64 FAILED
06:36:18 e: /Applications/Xcode/14.2.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
06:36:18 
06:36:18 The /Applications/Xcode/14.2.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
06:36:18 output:
06:36:18 Undefined symbols for architecture x86_64:
06:36:18   "_OBJC_CLASS_$_BugsnagHandledState", referenced from:
06:36:18       objc-class-ref in result.o
06:36:18 ld: symbol(s) not found for architecture x86_64

Linker plugin not working when running tests

I have added the linker plugin, but when running iosX64Test or iosSimulatorArm64Test I get the undefined symbols error when building:

Undefined symbols for architecture arm64:
  "_FIRCLSExceptionRecordNSException", referenced from:
      _co_touchlab_crashkios_crashlytics_FIRCLSExceptionRecordNSException_wrapper0 in result.o
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRExceptionModel", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRStackFrame", referenced from:
      objc-class-ref in result.o

I have tried similar workarounds like in #46, but I can't get it working.

Import's Instructions from Readme doesn't work

I'm trying to use the imports instruction from readme:

kotlin {
   sourceSets {
       iosMain {
           dependencies {
               api "co.touchlab:crashkios:0.2"
           }
       } 
   }
}

The result is:

Execution failed for task ':multiplatform:compileKotlinIos'.
> Could not resolve all files for configuration ':multiplatform:iosCompileKlibraries'.
   > Could not find co.touchlab:crashkios:0.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://dl.google.com/dl/android/maven2/co/touchlab/crashkios/0.2/crashkios-0.2.pom
       - https://jcenter.bintray.com/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://jcenter.bintray.com/co/touchlab/crashkios/0.2/crashkios-0.2.pom
       - https://repo.maven.apache.org/maven2/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://repo.maven.apache.org/maven2/co/touchlab/crashkios/0.2/crashkios-0.2.pom
       - https://jitpack.io/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://jitpack.io/co/touchlab/crashkios/0.2/crashkios-0.2.pom
       - https://maven.google.com/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://maven.google.com/co/touchlab/crashkios/0.2/crashkios-0.2.pom
       - https://kotlin.bintray.com/kotlinx/co/touchlab/crashkios/0.2/crashkios-0.2.module
       - https://kotlin.bintray.com/kotlinx/co/touchlab/crashkios/0.2/crashkios-0.2.pom
     Required by:
         project :multiplatform

I'm using Kotlin 1.3.60, Android Studio 3.5.2. Am I do something wrong?

InvalidMutabilityException when using new coroutines 1.6 memory model

Version 0.5.0 (but 0.4.0 too, I think) crash when launched with the new memory model. Everything is fine when it's disabled.

Had this with both 1.6.0 and 1.6.0-native-mt.

Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen co.touchlab.crashkios.LogCrashHandler@36c0dd0
    at 0   shared                              0x00000001036b1250 kfun:kotlin.Throwable#<init>(kotlin.String?){} + 96
    at 1   shared                              0x00000001036a99a4 kfun:kotlin.Exception#<init>(kotlin.String?){} + 92
    at 2   shared                              0x00000001036a9bf8 kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 92
    at 3   shared                              0x00000001036debac kfun:kotlin.native.concurrent.InvalidMutabilityException#<init>(kotlin.String){} + 92
    at 4   shared                              0x00000001036dfeb8 ThrowInvalidMutabilityException + 340
    at 5   shared                              0x0000000103dbd5d0 Kotlin_AtomicReference_checkIfFrozen + 76
    at 6   shared                              0x00000001036de278 kfun:kotlin.native.concurrent.AtomicReference#<init>(1:0){} + 100
    at 7   shared                              0x0000000103b4cadc kfun:co.touchlab.crashkios.DefaultCrashHandler#<init>(){} + 180
    at 8   shared                              0x0000000103d8a82c _ZN6kotlin2mm13InitSingletonEPNS0_10ThreadDataEPP9ObjHeaderPK8TypeInfoPFvS4_ES5_ + 1352
    at 9   shared                              0x0000000103b4c174 kfun:co.touchlab.crashkios#setupCrashHandler(co.touchlab.crashkios.CrashHandler){} + 200
    at 10  shared                              0x0000000103c3a4ec kfun:com.example.shared.infrastructure.issuereporting#crashInit(co.touchlab.crashkios.CrashHandler){} + 64
    at 11  shared                              0x0000000103d78400 objc2kotlin.5569 + 140

Linker plugin not working with the new Kotlin/Native artifacts DSL

The linker plugin is not applying the compiler args when using the new DSL for Kotlin/Native artifacts: https://kotlinlang.org/docs/multiplatform-native-artifacts.html.

I can work around it by specifying the compiler args manually:

kotlinArtifacts {
    Native.XCFramework("sdk") {
        targets(iosX64, iosArm64, iosSimulatorArm64)
        setModules(
            project(":shared"),
            project(":lib")
        )

        // Add this:
        kotlinOptions {
            freeCompilerArgs = listOf(
                "-linker-options",
                "-U _FIRCLSExceptionRecordNSException " +
                        "-U _OBJC_CLASS_\$_FIRStackFrame " +
                        "-U _OBJC_CLASS_\$_FIRExceptionModel " +
                        "-U _OBJC_CLASS_\$_FIRCrashlytics"
            )
        }
    }
}

How integrate CrashKiOS?

Hello,

First of all sorry if it is a very simple question.

I cannot see any import of CrashKiOS integration. Is it correct?

val iosMain by getting {
    dependencies {
                implementation(Dependencies.Common.Native.ktorClientCore)
                implementation(Dependencies.Common.Native.sqldelightDriverNative)
                api("co.touchlab:crashkios:0.6.0")
    }
}

Best regards

can't catch other kmm lib crash.

I have 2 kmm libraries. Crashkios referenced by Library A , and no reference by Library B. When the B library crashes, the Crashkios of the A library cannot catch the exception. Is this normal?

Datadog support

We use Datadog for crash reports, would love to migrate over to Kermit for that, but it doesn't currently support Datadog. Wondering if there is any existing work around that, or what's an estimated amount effort to add the support?

CrashKiOS Crashlytics Tutorial

Overview

Set up Crashlytics for Android and iOS, then call from common code with CrashKiOS, and trigger catching crashes from iOS.

Basic outline

Start with a KMP project with Android and iOS, but no Crashlytics. Say fork KampKit

Sign up for Crashlyitcs for that project. We don't need detailed steps for this, as there's plenty of docs around that. Just "at the end, you should have google-services.json for Android and GoogleService-Info.plist for iOS.

Mention that it's generally suggested to hide then in .gitignore in open source projects.

Run and test that both of those work before trying to do KMP. If they don't work on their own, KMP won't fix it.

Make a note for iOS. If you run the app in a simulator from Xcode, it won't "crash". Xcode catches it. You need to run from Xcode, then "stop" it, then open the simulator and click on the app icon to run it directly there. Then it will "crash". Also, crash reports aren't sent until you start the app again. So, to test a "crash", you need to start the app with the icon, crash it, then restart it. If your simulated crash happens on app start, that won't work, so make sure your simulated crash is triggered by a user action (button click, etc).

Add the CrashKIOS kmp dependency to commonMain. Also, change the iOS Framework to isStatic = ture. We'll talk about dynamic later. Add kotlin.native.cacheKind.iosX64=none (and the other one for M1 which I don't have handy) to gradle.properties. Mention that we're working on an update to avoid this, but we need it for iOS linking issues.

Somewhere in startup code, you need to call enableCrashlytics() before using CrashKiOS. That's just part of the current design to avoid testing issues, although that may not be necessary in the future, depending on how we fix cacheKind above.

To test, send a handled exception from common code with CrashlyticsKotlin.sendHandledException(Exception("Some exception")). See if that comes through on both platforms.

For Android, we're done. For iOS, we need to catch unhandled exceptions that come from hard crashes. Somewhere in the startup code, call setCrashlyticsUnhandledExceptionHook(). To test, throw an uncaught exception from Kotlin code (again, triggered by user action). You should see that in the Crashlytics panel with Kotlin line numbers (AKA "symbolication").

If you're good with static frameworks, we're done (static is generally better, IMHO, but not everybody agrees). For dynamic, you need one more thing.

On iOS, we only add the definitions of Crashlytics during compile. The binary, the actual Crashlytics iOS library, isn't added until you build the iOS app. However, the Kotlin compiler expects to resolve everything when building the dynamic framework. You'll see this:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FIRStackFrame", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRExceptionModel", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in result.o
  "_FIRCLSExceptionRecordNSException", referenced from:
      _co_touchlab_crashkios_crashlytics_FIRCLSExceptionRecordNSException_wrapper0 in result.o
ld: symbol(s) not found for architecture x86_64

It's saying it can't find the Crashlytics symbols we reference. We need to tell it "these symbols are OK. You'll find them later". To do that, you can add linker flags to Gradle config, which is kind of messy, or just use our Gradle plugin.

  id("co.touchlab.crashkios.crashlyticslink") version "0.8.1"
}```

Try that with our sample and confirm.

Then walk through `CrashlyticsKotlin.logMessage("Some message")` and `CrashlyticsKotlin.setCustomValue("someKey", "someValue")`

CrashKiOS - 1.8 Beta Testing

Perform the list of sanity checks on your work projects (it mostly consists of basic actions).

  • Compile your project with a current Kotlin version.
  • Check the highlighting in different IDE modules.
  • Compile the project with the EAP Kotlin version and install the EAP IDE plugin.
  • Verify that the project re-imported successfully.
  • Check that highlighting from p.2 works not worse than before.
  • Compile the project again and look for new surprising warnings.
  • Change something in the code and check if incremental compilation works.
  • Run your tests with a new Kotlin version.
  • Stop at some well-known piece of code, run the debugger and try stepping.
  • Look for performance issues in compilation, runtime, re-import or IDE behavior.

Pay additional attention to these features and subsystems if applicable to your use case:

  • Kotlin Gradle plugin: lots of changes in all typical usage scenarios
  • The new Gradle Incremental compilation, which we plan to stabilize soon
  • Expose compiler flags via Gradle lazy properties
  • Ability to not fallback with compiler daemon by default
  • arm64 support for watchOS targets
  • Xcode 14 and new Objective-C frameworks support in Kotlin/Native

Add support to apple silicon

Hey Touchlab devs! Your other kmm libs seem to be updated to 1.5.30 / hmpp / apple silicon targets, but this one not yet. There's still a few big fish that need to be updated (like ktor) but creating this issue just so I can track progress :)

In release mode, complete stack information cannot be obtained

In the release mode, the shared module has only 2 stack information, why ????

 - 0 : "0   shared                              0x000000010ec43178 ThrowArrayIndexOutOfBoundsException + 88"
  - 1 : "1   shared                              0x000000010ec49454 objc2kotlin.44 + 916"
  - 2 : "2   SwiftUI                             0x00007fff5732b576 
  ...

in debug mode, we can get complete stack frame info :

 - 0 : "0   shared                              0x000000010b0a2241 kfun:kotlin.Throwable#<init>(){} + 65 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Throwable.kt:27:21)"
  - 1 : "1   shared                              0x000000010b09c31a kfun:kotlin.Exception#<init>(){} + 58 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:21:28)"
  - 2 : "2   shared                              0x000000010b09c42a kfun:kotlin.RuntimeException#<init>(){} + 58 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:32:28)"
  - 3 : "3   shared                              0x000000010b09c96a kfun:kotlin.IndexOutOfBoundsException#<init>(){} + 58 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:90:28)"
  - 4 : "4   shared                              0x000000010b09ca7a kfun:kotlin.ArrayIndexOutOfBoundsException#<init>(){} + 58 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/Exceptions.kt:97:21)"
  - 5 : "5   shared                              0x000000010b0d35ca ThrowArrayIndexOutOfBoundsException + 122 (/Users/teamcity/buildAgent/work/cae0e6559deed4c4/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt:23:11)"
  - 6 : "6   shared                              0x000000010b122a1d Kotlin_Array_get + 29"
  - 7 : "7   shared                              0x000000010b073165 kfun:com.banmalu.firstkmmdemo.shared.Greeting#greeting(){}kotlin.String + 885 (/Users/banmalu/AndroidStudioProjects/FirstKMMDemo/shared/src/commonMain/kotlin/com/banmalu/firstkmmdemo/shared/Greeting.kt:11:11)"
  - 8 : "8   shared                              0x000000010b07545b objc2kotlin.2 + 203 (-/<compiler-generated>:1:0)"
  

Add support for watchosX64 target

Kotlin Native 1.4.30 introduced support for the new Apple Watch simulator. When CrashKiOS is built for this target, the build errors out.

Error when build in IOS: shared:cinteropReachabilityIosX64 FAILED

Task :shared:cinteropReachabilityIosX64 FAILED
e: Could not find "org.jetbrains.kotlin.native.platform.CoreFoundationBase"

Execution failed for task ':shared:cinteropReachabilityIosX64'.

Process 'command '/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

how can I fix that?

Crash on production app

Hi Touchlab,

I tried to implement CrashKiOS for our project and was successful when the app was built for development on iOS. In the production environment, there was a crash immediately after the app started.

Here is the error I picked up from the Console.

Scene FBSceneManager/sceneID:<APPBUNDLE>-default update failed: <NSError: 0x283a1ddd0; domain: FBSceneErrorDomain; code: 1 ("operation-failed"); "Scene update failed."> {
    NSUnderlyingError = <NSError: 0x283a1cba0; domain: FBWorkspaceScene; code: 1; "Client process exited.">;
}
COSMCtrl _foregroundAppActivity incoming bundle <APPBUNDLE>  has nil supplied UUID, finds existing 6C105A4A-1D15-36F9-8818-5CA6E2CAA5B8

Here is my gradle.build.kts for xcode:

import xx.android.bld.dependencies.LibsCommon
import xx.android.bld.dependencies.ModulesCommon
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
    kotlin(xx.android.bld.dependencies.PluginsCommon.Kotlin.multiplatform)
    id(xx.android.bld.dependencies.PluginsCommon.CrashkiOS.id) version xx.android.bld.dependencies.VersionsCommon.crashkios // HERE
}

kotlin {
    //select iOS target platform depending on the Xcode environment variables
    val iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
        if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
            ::iosArm64
        else
            ::iosX64

    iOSTarget("ios") {

        binaries {
            framework {
                baseName = "xxcommon"
                export(project(ModulesCommon.domain))
                export(project(ModulesCommon.repositories))
                export(project(ModulesCommon.data))
                export(project(ModulesCommon.appServices))
                export(LibsCommon.Multiplatform.Kodein.erased)
                //export(Libs.Multiplatform.Ktor.Client.Features.common)
            }
        }

    sourceSets {
        all {
            languageSettings.optIn("kotlin.Experimental")
            languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
            languageSettings.optIn("kotlinx.coroutines.FlowPreview")
            languageSettings.optIn("kotlinx.serialization.InternalSerializationApi")
            //languageSettings.optIn("kotlinx.serialization.UnstableDefault")

            languageSettings.enableLanguageFeature("InlineClasses")
        }

        val commonMain by getting {
            dependencies {
                implementation(LibsCommon.Kotlin.stdLibCommon)
                implementation(LibsCommon.Multiplatform.Kodein.erased)
                //implementation(Libs.Multiplatform.Ktor.Client.Features.common)
                api(project(ModulesCommon.infrastructure))
                api(project(ModulesCommon.domain))
                api(project(ModulesCommon.repositories))
                api(project(ModulesCommon.data))
                api(project(ModulesCommon.appServices))
            }
        }

        val iosMain by getting {
            dependencies {
                implementation(project(ModulesCommon.infrastructure))
                implementation(LibsCommon.Multiplatform.Logging.Napier.ios)
                implementation(LibsCommon.Multiplatform.SQLDelight.Driver.ios)
                implementation(LibsCommon.Crashkios.lib) // HERE
            }
        }
    }

    /*   sourceSets["commonMain"].dependencies {
           implementation(Libs.Kotlin.stdLibCommon)
           api(project(Modules.domain))
           api(project(Modules.repositories))
           api(project(Modules.data))
       } */

}

val packForXcode by tasks.creating(Sync::class) {
    val targetDir = File(buildDir, "xcode-frameworks")

    /// selecting the right configuration for the iOS
    /// framework depending on the environment
    /// variables set by Xcode build
    val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
    val framework = kotlin.targets
        .getByName<KotlinNativeTarget>("ios")
        .binaries.getFramework(mode)
    inputs.property("mode", mode)
    dependsOn(framework.linkTask)

    from({ framework.outputDirectory })
    into(targetDir)

    /// generate a helpful ./gradlew wrapper with embedded Java path
    doLast {
        val gradlew = File(targetDir, "gradlew")
        gradlew.writeText(
            "#!/bin/bash\n"
                + "export 'JAVA_HOME=${System.getProperty("java.home")}'\n"
                + "cd '${rootProject.rootDir}'\n"
                + "./gradlew \$@\n"
        )
        gradlew.setExecutable(true)
    }
}

tasks.getByName("build").dependsOn(packForXcode)

I just have no clue where to look to solve the issue. Maybe you will be able to see the problem here. Thank you for the feedback.

InvalidMutabilityException when using new memory model

I've updated to 0.6.0 and am still getting this exception when I migrate to the new memory model.

Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen co.touchlab.crashkios.LogCrashHandler@43d270 at 0 kmmsharedmodule 0x00000001126ae71b kfun:kotlin.Exception#(kotlin.String?){} + 11 at 1 kmmsharedmodule 0x00000001126cbbb2 ThrowInvalidMutabilityException + 1010 at 2 kmmsharedmodule 0x00000001126ca125 kfun:kotlin.native.concurrent.AtomicReference#(1:0){} + 85 at 3 kmmsharedmodule 0x000000011298c287 kfun:co.touchlab.crashkios.DefaultCrashHandler#(){} + 759 at 4 kmmsharedmodule 0x0000000112d8093e objc2kotlin.6474 + 862 at 5 iosApp 0x000000010bda4c3e $s6iosApp15KMMCrashHandlerC5startyyFZ + 78

CrashKiOS Bugsnag Tutorial

Bugsnag companion to #39

Obviously need changes to account for differences in bugsnag setup and it's specific concerns

Crashlytics sample

We should copy the Kermit crashlytics sample, but replace the config with CrashKios and the calls with the relevant calls from CrashlyticsKotlin.

JVM support

Hey ho

Is there any plan for adding JVM target support?

Unable to locate dsyms for freelytics.flowredux

We're using flowredux in our KMM shared module and when I integrated crashkios exporting KMM framework with isStatic = true, getting bunch of compilation warnings "(x86_64) could not find object file symbol for symbol _kfun:com.freeletics.flowredux#reduxStore__at__kotlinx.coroutines.flow.Flow<0:0>(kotlin.Function0<0:1>;kotlin.collections.Iterable<kotlin.Function2<kotlinx.coroutines.flow.Flow<0:0>,kotlin.Function0<0:1>,kotlinx.coroutines.flow.Flow<0:0>>>;com.freeletics.flowredux.FlowReduxLogger?;kotlin.Function2<0:1,0:0,0:1>){0§<kotlin.Any"

Any help is appreciated

Bugsnag sample

We should copy the Kermit bugsnag sample, but replace the config with CrashKios and the calls with the relevant calls from BugsnagKotlin.

Kotlin Multiplatform with iOS, Android and JVM Desktop targets

Using CrashKiOS crash reporting library in commonMain with iOS, Android and JVM Desktop targets crashes build because CrashKiOS does not support the JVM target.

Is there any way to get around this issue in the dependency three?

What would it take to add a JVM target?

Integration Issue

Can't integrate CrashKios

photo_2021-12-16 23 35 57
photo_2021-12-16 23 36 05

Dependency is not visible in iosMain. Can't find solution...

May be because of Mac M1

Creating a git tag for 0.3.2 release

Would you mind creating the git tag for the 0.3.2 release?

In a project of mine I'm required to have license links to the libraries I'm using with the designated version and that only works as long as it's tagged.

CrashKiOS - 1.8 Release Testing

Switch from RC to official release, reverify that 1.8 still works and get the branch ready to merge

Perform the list of sanity checks on your work projects (it mostly consists of basic actions).

  • Compile your project with a current Kotlin version.
  • Check the highlighting in different IDE modules.
  • Compile the project with the EAP Kotlin version and install the EAP IDE plugin.
  • Verify that the project re-imported successfully.
  • Check that highlighting from p.2 works not worse than before.
  • Compile the project again and look for new surprising warnings.
  • Change something in the code and check if incremental compilation works.
  • Run your tests with a new Kotlin version.
  • Stop at some well-known piece of code, run the debugger and try stepping.
  • Look for performance issues in compilation, runtime, re-import or IDE behavior.

Pay additional attention to these features and subsystems if applicable to your use case:

  • Kotlin Gradle plugin: lots of changes in all typical usage scenarios
  • The new Gradle Incremental compilation, which we plan to stabilize soon
  • Expose compiler flags via Gradle lazy properties
  • Ability to not fallback with compiler daemon by default
  • arm64 support for watchOS targets
  • Xcode 14 and new Objective-C frameworks support in Kotlin/Native

Add versions of bugsnap and crashlytics that don't require cinterop

Building and linking with the current versions of Bugsnag and Crashlytics can get complex because we have cinterop for the client libraries, but we don't link to them directly. We used to simply tell the dev to copy/paste some Swift code to do this, which avoided many of the issues involved with the cinterop approach.

We could split the modules to have a "core" version of each that simply defined an interface, then have one published with cinterop, and just using the core with a Swift copy/paste implementation.

desktop not supported

Hello,
I have a problem when i try to use CrashKiOS on my KMP project , witch target ios, android and desktop .
No problemon iOS and android, but with desktop :
:composeApp:desktopMain: Could not resolve co.touchlab.crashkios:crashlytics:0.8.6.

App crashes at launch after App Thinning with CrashKiOS has a dependency

Like the title says, distributing an iOS app with App Thinning crashes on launch if CrashKiOS is set as a dependency for the shared.framework.

I believe this is a Kotlin issue and I have opened KT-58461 with more information on how to replicate the crash.

Here is the sample repo https://github.com/Orgmir/symbol-not-found-crash and the steps to reproduce:

  1. Open Xcode project and archive the app (you will need a valid apple dev account)
  2. Distribute for Development, with App Thinning for "All compatible device variants"
  3. Install on device, by drag and drop in Finder for example
  4. Open the app 💥

The crash will be visible in the "Device logs" button, in "Devices" window in Xcode. The reason being "symbol not found in flat namespace (OBJC_CLASS$_FIRCrashlytics)".

The reason I am opening an issue here is that Kotlin folks closed the issue blaming Apple (which fair enough, App Thinning is a black box) but I am hoping we could figure out a workaround to get this to work.

My app uses Kotlin 1.8.21 and the shared.framework is dynamic. It needs to be dynamic because we bundle some resources with it. Removing CrashKiOS dependency makes the app not crash anymore!

Any idea of how I can make it not crash?

Other issues related to the same problem:
rickclephas/NSExceptionKt#12

Kotlin 1.8.0 compile error

After updating a project to kotlin 1.8.0, I started seeing the below error

Showing Recent Messages
Undefined symbols for architecture arm64:

  "_OBJC_CLASS_$_Bugsnag", referenced from:
      objc-class-ref in libco.touchlab.crashkios:bugsnag-cache.a(result.o)
      objc-class-ref in libco.touchlab:kermit-bugsnag-cache.a(result.o)
  "_OBJC_CLASS_$_BugsnagError", referenced from:
      objc-class-ref in libco.touchlab.crashkios:bugsnag-cache.a(result.o)
  "_OBJC_CLASS_$_BugsnagFeatureFlag", referenced from:
      objc-class-ref in libco.touchlab.crashkios:bugsnag-cache.a(result.o)
  "_OBJC_CLASS_$_BugsnagStackframe", referenced from:
      objc-class-ref in libco.touchlab.crashkios:bugsnag-cache.a(result.o)

The project does not directly depend on crashkios, just has a dependency on kermit:

            implementation("co.touchlab:kermit:1.2.2")
            implementation("co.touchlab:kermit-bugsnag:1.2.2")

Why not reporting Throwable's cause (if present)?

Why not reporting Throwable's cause (if present) instead of the unhandled Throwable itself?
For example, when unhandled exceptions are thrown from coroutines, we get "CoroutinesInternalError: Fatal exception in coroutines machinery..." reports instead of the actual cause of the exception (for example an IllegalStateException generated by a check(...) call); wouldn't it be more useful if the actual cause is reported?

How to report crashes using the new Firebase Crashlytics?

In the new version of Firebase Crashlytics the function recordCustomExceptionName:reason:frameArray: is replaced by recordError.

See the following: https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios#recordcustomexceptionnamereasonframearray_is_replaced_by_recorderror

The alternative appears to be one of the following:

The ExceptionModel can be created using a name, reason, and stackTrace. This looks like the way to go but I cannot find a way to create a StackFrame using an address. The StackFrame only has a constructor for symbol, file, and line. Any ideas how to report the exception to Firebase now?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.