corymsmith / react-native-fabric

A React Native library for Fabric, Crashlytics and Answers
MIT License
1.31k stars 236 forks source link

Crash on Fabric.with #222

Closed TheMakerOleguch closed 3 years ago

TheMakerOleguch commented 5 years ago

After restart application via https://github.com/JakeWharton/ProcessPhoenix i got this error 2019-05-30 17:32:10.259 29997-29997/com.payoneer.android E/Answers: Failed to submit events task java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@af3a9ab rejected from java.util.concurrent.ScheduledThreadPoolExecutor@cb38808[Shutting down, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 8] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2049) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:814) at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:305) at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533) at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:635) at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:601) at com.crashlytics.android.answers.AnswersEventsHandler.executeAsync(AnswersEventsHandler.java:185) at com.crashlytics.android.answers.AnswersEventsHandler.processEvent(AnswersEventsHandler.java:171) at com.crashlytics.android.answers.AnswersEventsHandler.processEventAsync(AnswersEventsHandler.java:47) at com.crashlytics.android.answers.SessionAnalyticsManager.onLifecycle(SessionAnalyticsManager.java:129) at com.crashlytics.android.answers.AnswersLifecycleCallbacks.onActivityStarted(AnswersLifecycleCallbacks.java:26) at io.fabric.sdk.android.ActivityLifecycleManager$ActivityLifecycleCallbacksWrapper$1.onActivityStarted(ActivityLifecycleManager.java:111) at android.app.Application.dispatchActivityStarted(Application.java:207) at android.app.Activity.onStart(Activity.java:1190) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:614) at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1248) at android.app.Activity.performStart(Activity.java:6679) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) I have added additional check to not register Fabric if it is restart process, but it is not helped @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); if (!ProcessPhoenix.isPhoenixProcess(this)) { Fabric.with(this, new Crashlytics()); } }