Skip to content

java.lang.NullPointerException: Attempt to invoke virtual method 'void O9.l.A(O9.p, O9.u)' on a null object reference #1094

@sanket-vekariya

Description

@sanket-vekariya
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void O9.l.A(O9.p, O9.u)' on a null object reference
       at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin$MethodRunner.run(FlutterSecureStoragePlugin.java:127)
       at android.os.Handler.handleCallback(Handler.java:995)
       at android.os.Handler.dispatchMessage(Handler.java:103)
       at android.os.Looper.loopOnce(Looper.java:273)
       at android.os.Looper.loop(Looper.java:363)
       at android.os.HandlerThread.run(HandlerThread.java:85)

Used plugin version:
flutter_secure_storage: 10.0.0

Macbook Air M4 chip

Flutter version 3.24.3
minSdk 24
targetSdk 35
compileSdk 36

Sharing also the impacted mobile device user list as below

Samsung = 35%
Xiaomi = 22%
OnePlus = 18%
Oppo = 12%
Other = 12%

Total data set (915 crash affecting 911 users)

Hello plugin owner, I started facing this issue and found into firebase crashlytics. Let me know what other details I can share to help you fix this issue. This is impacting lots of users.



Edits:

Suggested Solution

As per the plugin code earlier 9.2.4 version in FlutterSecureStorage.java class, you removed try catch code block into run method
Check this link to see difference.
basically to mitigate this issue, check around onDetachedFromEngine method as well.

Possible Steps to reproduce:

  • add app in background
  • app app in foreground
  • try to hit 1 storage write call

Let me know if you need more details to resolve this as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions