Skip to content

🐞[Fatal Exception: java.lang.NullPointerException Attempt to read from field 'java.lang.String io.flutter.view.FlutterCallbackInformation.callbackLibraryPath' on a null object reference in method 'java.lang.String DartExecutor$DartCallback.toString()'] #650

@bitsydarel

Description

@bitsydarel
  • I have read the README
  • I have done the setup for Android
  • I have done the setup for iOS
  • I have ran the sample app and it does not work there

Version

Technology Version
Workmanager version 0.8.0

Describe the error

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.view.FlutterCallbackInformation.callbackLibraryPath' on a null object reference in method 'java.lang.String io.flutter.embedding.engine.dart.DartExecutor$DartCallback.toString()'
at io.flutter.embedding.engine.dart.DartExecutor$DartCallback.toString(DartExecutor.java:426)
at java.lang.String.valueOf(String.java:4112)
at java.util.Objects.toString(Objects.java:147)
at io.flutter.embedding.engine.dart.DartExecutor.executeDartCallback(DartExecutor.java:181)
at dev.fluttercommunity.workmanager.BackgroundWorker.startWork$lambda$5(BackgroundWorker.kt:111)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Describe error:
I believe the error occurs when the Android plugin attempts to retrieve a Flutter Dart entry callback, which is unavailable due to factors such as the method not existing or the app having multiple processes. We’ve also observed this issue in our in-house plugin, which creates a headless Flutter engine in Android services running in another process. When trying to retrieve the saved Flutter callback, the other process fails and returns a null value, while the main process succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions