googlearchive / firebase-jobdispatcher-android

DEPRECATED please see the README.md below for details.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FJD crashing our app on Android 8 and above

kapilsukhyani opened this issue · comments

Caused by java.lang.IllegalStateException: { when=0 callback=com.amplitude.api.AmplitudeClient$5 target=android.os.Handler } This message is already in use.
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:574)
at android.os.Handler.enqueueMessage(Handler.java:662)
at android.os.Handler.sendMessageAtTime(Handler.java:631)
at android.os.Handler.sendMessageDelayed(Handler.java:601)
at android.os.Handler.sendMessage(Handler.java:538)
at android.os.Message.sendToTarget(Message.java:418)
at com.firebase.jobdispatcher.JobService$JobCallback.sendResult(JobService.java:244)
at com.firebase.jobdispatcher.JobService.jobFinished(JobService.java:167)

This is not happening on older Android OS versions. The typical scenario when we call jobFinished is after completing the job from a background thread.

There is another stack trace also that we are seeing
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Handler.sendMessage(android.os.Message)' on a null object reference
at android.os.Message.sendToTarget(Message.java:418)
at com.firebase.jobdispatcher.JobService$JobCallback.sendResult(JobService.java:244)
at com.firebase.jobdispatcher.JobService.jobFinished(JobService.java:167)

In April 2019 we announced that Firebase Job Dispatcher would be deprecated today, April 7th 2020. For this reason we are going to close all open issues and archive the repository. We will also stop supporting FJD for new app installations (such as those targeting sdk versions greater than Android Q). Existing apps that rely on FJD should continue to function as usual.

While we will no longer work on FJD, we encourage you to migrate to Work Manager which is a superior tool and fully supported by the Android team.

Thank you for taking the time to try the library and provide this feedback. We sincerely appreciate your effort and we apologize for not addressing it in time.