Skip to content

In situations where the network is slow, ANR often occurs #2649

Closed
@yaohuzhou

Description

@yaohuzhou

Integration

sentry-android

Build System

Gradle

AGP Version

7.3.1

Proguard

Disabled

Version

6.17.0

Steps to Reproduce

Reproduction steps:

1. Initialize SDK.

`class TestApplication : Application() {

override fun onCreate() {
    super.onCreate()
    SentryAndroid.init(this) { options ->
        options.isDebug = BuildConfig.DEBUG
        options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
        options.isEnableSystemEventBreadcrumbs = false
        options.isEnableUncaughtExceptionHandler = true
        options.isEnableNdk = true
        options.isAnrEnabled = true
        options.maxRequestBodySize = SentryOptions.RequestSize.MEDIUM
        options.isAnrReportInDebug = false
        options.tracesSampleRate = 1.0
        options.profilesSampleRate = 1.0
    }
}

}`

2.Simulate a weak network environment using Charles proxy.
Throttle Settings-> Bandwidth (kbps): Download = 1 Upload = 1
Start Throttling

3.Repeat opening the app multiple times and wait for about 20 seconds.

4.ANR

image

Expected Result

There will be no ANR.

Actual Result

ANR often occurs.

image

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions