-
Notifications
You must be signed in to change notification settings - Fork 464
Headless background task can not be executed if barcode library is embeded #85
Comments
mee too |
have you got any idea? |
mee too, problem persists. |
same problem here... i'm try has been 2 days and nothing, if someone can run, please tell us... rsrs |
We have same issue Please check Guard code against when running headless, since there is no Activity in the Headless context.
|
Will be fixed in |
Hi,
i have a problem using the library background_fetch (background_fetch: '^0.1.0') when I embed the barcode library.
I get the following exception if my background task starts:
java.lang.RuntimeException: java.lang.IllegalStateException: registrar.activity() must not be null
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.app.job.JobServiceEngine$JobHandler.handleMessage(JobServiceEngine.java:112)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:108)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.os.Looper.loop(Looper.java:166)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7425)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: Caused by: java.lang.IllegalStateException: registrar.activity() must not be null
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.apptreesoftware.barcodescan.BarcodeScanPlugin$Companion.registerWith(BarcodeScanPlugin.kt:19)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.apptreesoftware.barcodescan.BarcodeScanPlugin.registerWith(Unknown Source:2)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:22)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.example.xyz.Application.registerWith(Application.java:17)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.transistorsoft.flutter.backgroundfetch.HeadlessTask.initFlutterView(HeadlessTask.java:133)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.transistorsoft.flutter.backgroundfetch.HeadlessTask.(HeadlessTask.java:47)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at com.transistorsoft.flutter.backgroundfetch.HeadlessJobService.onStartJob(HeadlessJobService.java:38)
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.app.job.JobService$1.onStartJob(JobService.j
02-25 11:32:42.472 11461 11461 E AndroidRuntime: at android.app.job.JobServiceEngine$JobHandler.handleMessage(JobServiceEngine.java)
See also Issue:
transistorsoft/flutter_background_fetch#12
The text was updated successfully, but these errors were encountered: