Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

coreLibraryDesugaring breaks Sentry #476

@PaulWoitaschek

Description

@PaulWoitaschek

Enabling coreLibraryDesugaring is incompatible with sentry 2.2.0

To reproduce this, add coreLibraryDesugaring to your application and now no events will be sent.

Here is an example project that demonstrates the issue: (it's the official sample)
PaulWoitaschek@167cd61

Just install it to your device in release mode:
./gradlew sentry-sample:installRelease

Click on Capture exception
And you'll see the stacktrace in your log:

2020-07-02 09:33:03.475 16774-16800/? E/Sentry: Event submission failed: 39ec87a940ff4d5fb47a138fc11c0764
    java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
        at com.google.gson.internal.$Gson$Types.getGenericSupertype(Unknown Source:40)
        at com.google.gson.internal.$Gson$Types.getSupertype(Unknown Source:20)
        at com.google.gson.internal.$Gson$Types.getMapKeyAndValueTypes(Unknown Source:20)
        at com.google.gson.internal.bind.MapTypeAdapterFactory.create(Unknown Source:22)
        at com.google.gson.Gson.getDelegateAdapter(Unknown Source:35)
        at com.google.gson.internal.bind.TreeTypeAdapter.delegate(Unknown Source:11)
        at com.google.gson.internal.bind.TreeTypeAdapter.write(Unknown Source:4)
        at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(Unknown Source:34)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(Unknown Source:28)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(Unknown Source:42)
        at io.sentry.android.core.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.write(Unknown Source:2)
        at io.sentry.android.core.UnknownPropertiesTypeAdapterFactory$UnknownPropertiesTypeAdapter.write(Unknown Source:2)
        at com.google.gson.Gson.toJson(Unknown Source:34)
        at com.google.gson.Gson.toJson(Unknown Source:8)
        at io.sentry.android.core.AndroidSerializer.serialize(Unknown Source:14)
        at io.sentry.core.transport.HttpTransport.send(Unknown Source:29)
        at io.sentry.core.transport.AsyncConnection$EventSender.flush(Unknown Source:69)
        at io.sentry.core.transport.AsyncConnection$EventSender.run(Unknown Source:6)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions