getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.16k stars 435 forks source link

No platform information in crash report - android #1888

Closed danielle-h closed 2 years ago

danielle-h commented 2 years ago

Platform:

IDE:

Build system:

Android Gradle Plugin:

Sentry Android Gradle Plugin:

Proguard/R8:

Platform installed with:

The version of the SDK: sentry-android:5.5.2


I have the following issue:

A crash was reported with no user or platform information. Instead, I get a hashtag and a question mark: image (no platform section at all)

Steps to reproduce: app gradle:

buildscript {
    repositories {
        mavenCentral()
    }
}

plugins {
    id "io.sentry.android.gradle" version "2.1.5"
}
apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    defaultConfig {
        applicationId "weizmann.worg.sniffdoc"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 24
        versionName "2.5" //sentry
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            consumerProguardFiles 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation files('libs/SnifferService-7.41.aar')
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.preference:preference:1.1.0-rc01'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.4.0'
    // Hamcrest library
    androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'

    //sniffer service --- This is a custom service
    //implementation project(':SnifferService-7.145')

    //bluetooth scan
    implementation 'androidx.recyclerview:recyclerview:1.0.0'

    //show data fragment
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

    //continuous buzzer
    implementation 'net.mabboud:android-tone-player:0.3'

    def room_version = "2.2.5"
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"
    // Test helpers
    testImplementation "androidx.room:room-testing:$room_version"
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0-beta01"

    //gson for striginfying experiments
    implementation 'com.google.code.gson:gson:2.8.6'
    //usbserial
    implementation 'com.github.felHR85:UsbSerial:6.1.0'

    //timber
    implementation 'com.jakewharton.timber:timber:4.7.1'

    //sentry
    implementation 'io.sentry:sentry-android:5.5.2'

}

android {
    viewBinding {
        enabled = true
    }
}

sentry.properties in root is configured with project, org and token. Actual result: I received a crash report with no platform or user data, and I don't know in which Android version or phone the crash occurred. Expected result: A 'platform' or 'user' section with type of device and android version

romtsn commented 2 years ago

If you scroll down there are usually dedicated sections for Device and Operating System - are those missing for you?

image image

danielle-h commented 2 years ago

yes, they are missing: image

marandaneto commented 2 years ago

@danielle-h Can I see your SDK init code snippet?

danielle-h commented 2 years ago

In my AndoridManifest.xml file:

 <meta-data
            android:name="io.sentry.dsn" android:value="https://<my-dsn-here>.ingest.sentry.io/6154520" />
        <!-- Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
           TODO We recommend adjusting this value in production. -->
        <meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />

dsn changed for publication.

marandaneto commented 2 years ago

@danielle-h which device and OS version are you testing to? Can you provide a minimal reproducible example?

danielle-h commented 2 years ago

I don't know what device this occurred on. I have contacted my testers but no one has reported a crash yet. The crash was a NoSuchMethodError on GetDrawable in the launch activity. I was not able to reproduce it. I was hoping for platform/device information in order to be able to do so :) Subsequent crashes did appear with device information.

marandaneto commented 2 years ago

Thanks, please let us know if you get any more information, I can't reproduce this issue with the few devices and emulators I have access to.

marandaneto commented 2 years ago

Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it. Cheers!