Instabug-Android icon indicating copy to clipboard operation
Instabug-Android copied to clipboard

StrictMode Violation

Open jobernolte opened this issue 3 years ago • 3 comments

Steps to Reproduce the Problem

Initialize Instabug with strict mode enabled

Expected Behavior

No StrictMode Violation

Actual Behavior

2021-10-29 09:34:20.215 2652-2667/com.elogames.app.dev D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
        at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1877)
        at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:286)
        at java.util.zip.Inflater.finalize(Inflater.java:407)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
        at java.lang.Daemons$Daemon.run(Daemons.java:137)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.Throwable: Explicit termination method 'end' not called
        at dalvik.system.CloseGuard.open(CloseGuard.java:237)
        at java.util.zip.Inflater.<init>(Inflater.java:122)
        at com.android.okhttp.okio.GzipSource.<init>(GzipSource.java:64)
        at com.android.okhttp.internal.http.HttpEngine.unzip(HttpEngine.java:484)
        at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:661)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
        at com.instabug.library.networkv2.NetworkManager.doRequest(NetworkManager.java:7)
        at com.instabug.library.networkv2.NetworkManager.doRequest(NetworkManager.java:26)
        at com.instabug.library.networkv2.ReactiveNetworkManager$a.subscribe(ReactiveNetworkManager.java:1)
        at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
        at io.reactivex.Observable.subscribe(Observable.java:12284)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:608)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        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) 

Instabug integration code

SDK Version

10.10.0

Android Version

API 29

Device Model

Emulator

jobernolte avatar Oct 29 '21 07:10 jobernolte

@jobernolte Thanks for reaching out and reporting this. Would you please share your Instabug integration code? And Would you tell us if you are using APM?

MShannan avatar Oct 31 '21 11:10 MShannan

        Instabug.Builder(application, appToken)
            .setInvocationEvents(InstabugInvocationEvent.SHAKE)
            .setInAppMessagingState(Feature.State.DISABLED)
            .build()

        Instabug.setWelcomeMessageState(WelcomeMessage.State.DISABLED)
        BugReporting.setAutoScreenRecordingEnabled(false)
        BugReporting.setScreenshotByMediaProjectionEnabled(true)
        CrashReporting.setAnrState(Feature.State.DISABLED)
        //if (settings.userId != null) showInstabugWelcome()
        Surveys.setState(Feature.State.ENABLED)

We don't use APM in our app.

jobernolte avatar Nov 01 '21 07:11 jobernolte

@jobernolte Thanks for sharing this, we will check it and get back to you as soon as possible.

MShannan avatar Nov 01 '21 08:11 MShannan

Hello @jobernolte We will close this one, but if you still have any issues, please don't hesitate to reopen it anytime. Thank you.

Bashayer-reda avatar Feb 01 '24 20:02 Bashayer-reda