Flutterfire: 🐛 [Cloud Firestore] Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'void f.a.b.a.j.a(java.lang.String, java.lang.Object)' on a null object reference

Created on 10 Sep 2020  ·  18Comments  ·  Source: FirebaseExtended/flutterfire

Bug report

These issues only happen on Android phones only. It worked fine in iOS. I'm using Flutter 1.20.3 and use cloud_firestore ^0.14.0+2

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'void f.a.b.a.j.a(java.lang.String, java.lang.Object)' on a null object reference
io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.a (FlutterFirebaseFirestorePlugin.java:67)
io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$Om-QqNeCto0p2tej6MhbBamtjUw.onEvent (-.java:6)
com.google.firebase.firestore.Query.a (Query.java:27)
com.google.firebase.firestore.Query$$Lambda$3.a (Query.java:6)
com.google.firebase.firestore.core.AsyncEventListener.a (AsyncEventListener.java:6)
com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run (AsyncEventListener.java:6)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
android.os.Looper.loop (Looper.java:237)
android.app.ActivityThread.main (ActivityThread.java:8125)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:496)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)
crowd auth cloud_firestore bug

Most helpful comment

My Flutter Doctor:

[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.4 19E266, locale en-ID)
    • Flutter version 1.20.3 at /Users/hanselsusanto/Development/flutter
    • Framework revision 216dee60c0 (8 days ago), 2020-09-01 12:24:47 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/hanselsusanto/Library/Android/sdk
    • Platform android-30, build-tools 29.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.7, Build version 11E801a
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.48.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (1 available)
    • iPhone 8 (mobile) • 322380E7-0B2D-47CA-828F-9EE966D04A2C • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-7 (simulator)

All 18 comments

My Flutter Doctor:

[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.4 19E266, locale en-ID)
    • Flutter version 1.20.3 at /Users/hanselsusanto/Development/flutter
    • Framework revision 216dee60c0 (8 days ago), 2020-09-01 12:24:47 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/hanselsusanto/Library/Android/sdk
    • Platform android-30, build-tools 29.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.7, Build version 11E801a
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.48.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (1 available)
    • iPhone 8 (mobile) • 322380E7-0B2D-47CA-828F-9EE966D04A2C • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-7 (simulator)

Same error on Flutter stable 1.20.3 with cloud_firestore: ^0.13.5

Similar error on Crashlytics logs.. Latest Flutter Stable build in production.

  #firebase
  firebase_core: ^0.5.0
  firebase_auth: ^0.18.0+1
  cloud_firestore: ^0.14.0+2
  firebase_storage: ^4.0.0
  firebase_analytics: ^6.0.0
  firebase_remote_config: ^0.4.0
  firebase_crashlytics: ^0.2.0-dev.5
  firebase_messaging: ^7.0.0
  firebase_performance: ^0.4.0
  firebase_dynamic_links: ^0.6.0
`Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object, io.flutter.plugin.common.MethodChannel$Result)' on a null object reference
       at io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin$3.onCodeAutoRetrievalTimeOut(FlutterFirebaseAuthPlugin.java:828)
       at com.google.firebase.auth.api.internal.zzfk.zza(zzfk.java:2)
       at com.google.firebase.auth.api.internal.zzfm.run(zzfm.java:4)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6944)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)`

Does this happen when any specific code is run?

I think for mine it's when they are trying to link their account to a Google account after signing in with an anonymous account.

sorry there were two instances... one is during normal sign-up. I cannot tell if it's Google or Mobile number. But it triggered a crash in these two instances.

Hi @hansels
Can you please provide flutter run --verbose logs, and a minimal complete reproducible code sample
Thank you

Sure here they are


logs

[+17123 ms] Performing Streamed Install
                     Success
[        ] Installing build/app/outputs/flutter-apk/app.apk... (completed in 17.1s)
[        ] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc shell echo -n e141cdad8ae976abfe5d734aa9b4359e38b4e69b >
/data/local/tmp/sky.dev.mtsstudio.edufair.sha1
[+1055 ms] Redmi Note 7 startApp
[   +4 ms] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc shell am start -a android.intent.action.RUN -f 0x20000000 --ez
enable-background-compilation true --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true
dev.mtsstudio.edufair/dev.mtsstudio.edufair.MainActivity
[ +673 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000
cmp=dev.mtsstudio.edufair/.MainActivity (has extras) }
[   +1 ms] Waiting for observatory port to be available...
[+6949 ms] Observatory URL on device: http://127.0.0.1:37923/AnOOWcLVRCM=/
[   +2 ms] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc forward tcp:0 tcp:37923
[   +6 ms] 64642
[        ] Forwarded host port 64642 to device port 37923 for Observatory
[   +5 ms] Caching compiled dill
[ +117 ms] Connecting to service protocol: http://127.0.0.1:64642/AnOOWcLVRCM=/
[ +422 ms] Successfully connected to service protocol:
http://127.0.0.1:64642/AnOOWcLVRCM=/
[        ] Waiting for Redmi Note 7 to report its views...
[   +7 ms] Waiting for Redmi Note 7 to report its views... (completed in 6ms)
[   +9 ms] DevFS: Creating new filesystem on the device (null)
[  +35 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/dev.mtsstudio.edufair/code_cache/flutter_edufairNHFHFB/flutter_edu
fair/)
[   +3 ms] Updating assets
[ +167 ms] Manifest contained wildcard assets. Inserting missing file into build graph
to force rerun. for more information see #56466.
[   +8 ms] Syncing files to device Redmi Note 7...
[   +1 ms] Scanning asset files
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:flutter_edufair/main.dart
3adb5620-03d3-41a0-922f-877f9ba79739
[        ] <- 3adb5620-03d3-41a0-922f-877f9ba79739
[ +154 ms] Updating files
[ +401 ms] E/chromium(18917): [ERROR:filesystem_posix.cc(62)] mkdir
/data/user/0/dev.mtsstudio.edufair/cache/WebView/Crashpad: No such file or directory
(2)
[ +492 ms] W/FileUtils(18917): Slow Operation: fsync took 1344ms
[  +23 ms] D/SharedPreferencesImpl(18917): Time required to fsync
/data/user/0/dev.mtsstudio.edufair/shared_prefs/WebViewChromiumPrefs.xml: [<1: 0, <2:
0, <4: 0, <8: 0, <16: 0, <32: 0, <64: 0, <128: 0, <256: 0, <512: 0, <1024: 0, <2048: 1,
<4096: 0, <8192: 0, <16384: 0, >=16384: 0]
[   +8 ms] DevFS: Sync finished
[        ] Syncing files to device Redmi Note 7... (completed in 1,086ms)
[        ] Synced 2.9MB.
[        ] <- accept
[   +3 ms] Connected to _flutterView/0x7614b89020.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Redmi Note 7 is available at:
           http://127.0.0.1:64642/AnOOWcLVRCM=/
[ +336 ms] I/sstudio.edufai(18917): ProcessProfilingInfo new_methods=2987 is saved
saved_to_disk=1 resolve_classes_delay=8000
[+1029 ms] W/BpBinder(18917): Slow Binder: BpBinder transact took 1512ms,
interface=android.os.IUserManager, code=37 oneway=false
[+1238 ms] W/sstudio.edufai(18917): Accessing hidden method
Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden field
Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArr
ay; (greylist, reflection, allowed)
[   +6 ms] W/sstudio.edufai(18917): Accessing hidden method
Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
[  +67 ms] W/Activity(18917): Slow Operation: Activity
dev.mtsstudio.edufair/.MainActivity onCreate took 9912ms
[  +83 ms] W/Looper  (18917): Slow Looper main: Long Msg: seq=3 plan=18:28:22.197
late=1050ms wall=10038ms running=0ms h=android.app.ActivityThread$H w=159
[   +4 ms] W/Looper  (18917): Slow Looper main: Activity
dev.mtsstudio.edufair/.MainActivity is 1050ms late (wall=10038ms running=0ms
ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem]
lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 1 msg,
msg 1 took 1207ms (seq=2 late=2ms h=android.app.ActivityThread$H w=110)
[  +13 ms] W/Looper  (18917): Slow Looper main: Activity
dev.mtsstudio.edufair/.MainActivity is 11098ms late (wall=0ms running=0ms
ClientTransaction{
callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 2
msg, msg 1 took 1207ms (seq=2 late=2ms h=android.app.ActivityThread$H w=110), msg 2
took 10038ms (seq=3 late=1050ms h=android.app.ActivityThread$H w=159)
[  +57 ms] W/sstudio.edufai(18917): Accessing hidden method
Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard;
(greylist,core-platform-api, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection,
allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->peekLong(JZ)J (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->pokeLong(JJZ)V (greylist, reflection, allowed)
[   +9 ms] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->pokeInt(JIZ)V (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->peekInt(JZ)I (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->pokeByte(JB)V (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->peekByte(J)B (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->pokeByteArray(J[BII)V (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Llibcore/io/Memory;->peekByteArray(J[BII)V (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J
(greylist,core-platform-api, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden field Ljava/nio/Buffer;->address:J
(greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->arrayIndexScale(Ljava/lang/Class;)I (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, reflection, allowed)
[   +1 ms] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,
reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,
reflection, allowed)
[  +40 ms] D/SurfaceView(18917): UPDATE null, mIsCastMode = false
[  +82 ms] W/sstudio.edufai(18917): Accessing hidden method
Lcom/android/org/conscrypt/ConscryptFileDescriptorSocket;->setUseSessionTickets(Z)V
(greylist,core-platform-api, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lcom/android/org/conscrypt/ConscryptFileDescriptorSocket;->setHostname(Ljava/lang/Strin
g;)V (greylist,core-platform-api, reflection, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V
(greylist,core-platform-api, reflection, allowed)
[ +185 ms] W/sstudio.edufai(18917): Accessing hidden method
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
(greylist,core-platform-api, reflection, allowed)
[ +979 ms] W/Gralloc3(18917): mapper 3.x is not supported
[ +203 ms] I/OpenGLRenderer(18917): Davey! duration=1606ms; Flags=1,
IntendedVsync=13370086847617, Vsync=13370153514281,
OldestInputEvent=9223372036854775807, NewestInputEvent=0,
HandleInputStart=13370161557918, AnimationStart=13370161633543,
PerformTraversalsStart=13370161638804, DrawStart=13371477037345,
SyncQueued=13371480960939, SyncStart=13371481749741,
IssueDrawCommandsStart=13371482211251, SwapBuffers=13371691345678,
FrameCompleted=13371694021303, DequeueBufferDuration=14722000,
QueueBufferDuration=1384000, 
[  +13 ms] W/Looper  (18917): Slow Looper main: Long Msg: seq=22 plan=18:28:33.252
late=75ms wall=1542ms running=0ms h=android.view.Choreographer$FrameHandler
c=android.view.Choreographer$FrameDisplayEventReceiver
[   +2 ms] E/libEGL  (18917): call to OpenGL ES API with no current context (logged
once per thread)
[  +41 ms] I/Choreographer(18917): Skipped 95 frames!  The application may be doing too
much work on its main thread.
[  +36 ms] W/Looper  (18917): Slow Looper main: doFrame is 1590ms late because of 3
msg, msg 1 took 1542ms (seq=22 late=75ms h=android.view.Choreographer$FrameHandler
c=android.view.Choreographer$FrameDisplayEventReceiver)
[  +54 ms] E/FirebaseInstanceId(18917): Topic sync or token retrieval failed on hard
failure exceptions: FIS_AUTH_ERROR. Won't retry the operation.
[+1180 ms] W/BpBinder(18917): Slow Binder: BpBinder transact took 1103ms,
interface=com.google.android.gms.measurement.internal.IMeasurementService, code=11
oneway=false
[+2999 ms] W/DynamiteModule(18917): Local module descriptor class for providerinstaller
not found.
[   +7 ms] I/DynamiteModule(18917): Considering local module providerinstaller:0 and
remote module providerinstaller:0
[        ] W/ProviderInstaller(18917): Failed to load providerinstaller module: No
acceptable module found. Local version is 0 and remote version is 0.
[  +42 ms] I/sstudio.edufai(18917): The ClassLoaderContext is a special shared library.
[  +13 ms] I/sstudio.edufai(18917): The ClassLoaderContext is a special shared library.
[   +9 ms] I/sstudio.edufai(18917): The ClassLoaderContext is a special shared library.
[  +66 ms] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking,
allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->copyMemory(JJJ)V (greylist, linking, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getByte(J)B (greylist,core-platform-api, linking, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getByte(Ljava/lang/Object;J)B (greylist,core-platform-api, linking,
allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(J)J (greylist,core-platform-api, linking, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->putByte(JB)V (greylist,core-platform-api, linking, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->putByte(Ljava/lang/Object;JB)V (greylist,core-platform-api, linking,
allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api,
reflection, allowed)
[   +2 ms] W/sstudio.edufai(18917): Accessing hidden method
Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api,
reflection, allowed)
[  +57 ms] I/sstudio.edufai(18917): Waiting for a blocking GC ClassLinker
[   +5 ms] I/sstudio.edufai(18917): WaitForGcToComplete blocked ClassLinker on
ClassLinker for 5.155ms
[  +84 ms] V/NativeCrypto(18917): Registering
com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
[  +56 ms] W/sstudio.edufai(18917): Accessing hidden method
Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist,
reflection, allowed)
[  +61 ms] I/ProviderInstaller(18917): Installed default security provider
GmsCore_OpenSSL
[ +188 ms] W/sstudio.edufai(18917): Accessing hidden field
Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed)
[  +12 ms] W/sstudio.edufai(18917): Accessing hidden field
Ljava/io/FileDescriptor;->descriptor:I (greylist, JNI, allowed)
[  +40 ms] W/sstudio.edufai(18917): Accessing hidden method
Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist,
reflection, allowed)
[  +23 ms] W/sstudio.edufai(18917): Accessing hidden method
Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy;
(greylist,core-platform-api, linking, allowed)
[        ] W/sstudio.edufai(18917): Accessing hidden method
Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed)
[+7557 ms] I/flutter (18917): CacheManager: Failed to download file from  with error:
[        ] I/flutter (18917): Invalid argument(s): No host specified in URI 
[  +19 ms] I/chatty  (18917): uid=10312(dev.mtsstudio.edufair) 1.ui identical 10 lines
[        ] I/flutter (18917): CacheManager: Failed to download file from  with error:
[        ] I/flutter (18917): Invalid argument(s): No host specified in URI 
[+16394 ms] W/FA      (18917): setCurrentScreen cannot be called with the same class
and name
[+2869 ms] W/InputTransport(18917): Slow Input: 111ms so far, channel
'ClientState{ea0c718 uid=10312 pid=18917 displayId=0} (server)' publisher ~
publishKeyEvent: seq=1, deviceId=-1, source=0x101, action=0x0, flags=0x8, keyCode=4,
scanCode=0, metaState=0x0, repeatCount=0,downTime=13403435000000,
eventTime=13403435000000
[  +31 ms] W/InputTransport(18917): Slow Input: 141ms so far, channel
'ClientState{ea0c718 uid=10312 pid=18917 displayId=0} (server)' publisher ~
publishKeyEvent: seq=2, deviceId=-1, source=0x101, action=0x1, flags=0x8, keyCode=4,
scanCode=0, metaState=0x0, repeatCount=0,downTime=13403435000000,
eventTime=13403435000000
[+2738 ms] W/FA      (18917): setCurrentScreen cannot be called with the same class and
name
[+1209 ms] W/InputTransport(18917): Slow Input: 116ms so far, channel
'ClientState{ea0c718 uid=10312 pid=18917 displayId=0} (server)' publisher ~
publishKeyEvent: seq=4, deviceId=-1, source=0x101, action=0x1, flags=0x8, keyCode=4,
scanCode=0, metaState=0x0, repeatCount=0,downTime=13407414000000,
eventTime=13407414000000
[+1619 ms] E/FA      (18917): Failed to send event to the service:
android.os.DeadObjectException:
com.google.android.gms.measurement.internal.zzer.zza(com.google.android.gms:play-servic
es-measurement-impl@@17.5.0:6)
[ +293 ms] W/sstudio.edufai(18917): Verification of java.lang.String
com.google.android.gms.common.util.ProcessUtils.zzd(int) took 100.964ms
[+1930 ms] W/FA      (18917): setCurrentScreen cannot be called with the same class and
name
[+1244 ms] W/InputTransport(18917): Slow Input: 126ms so far, channel
'ClientState{ea0c718 uid=10312 pid=18917 displayId=0} (server)' publisher ~
publishKeyEvent: seq=6, deviceId=-1, source=0x101, action=0x1, flags=0x8, keyCode=4,
scanCode=0, metaState=0x0, repeatCount=0,downTime=13412489000000,
eventTime=13412489000000
[+1135 ms] W/BpBinder(18917): Slow Binder: BpBinder transact took 966ms, interface=,
code=46 oneway=false
[ +960 ms] Service protocol connection closed.
[        ] Lost connection to device.
[   +2 ms] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc forward --list
[   +6 ms] Exit code 0 from:
/Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s 3057ccbc forward --list
[        ] 3057ccbc tcp:64642 tcp:37923
[   +1 ms] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc forward --remove tcp:64642
[   +7 ms] DevFS: Deleting filesystem on the device
(file:///data/user/0/dev.mtsstudio.edufair/code_cache/flutter_edufairNHFHFB/flutter_edu
fair/)
[ +258 ms] Ignored error while cleaning up DevFS: TimeoutException after
0:00:00.250000: Future not completed
[   +1 ms] executing: /Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s
3057ccbc forward --list
[   +6 ms] Exit code 0 from:
/Users/hanselsusanto/Library/Android/sdk/platform-tools/adb -s 3057ccbc forward --list
[   +1 ms] "flutter run" took 124,261ms.
[ +110 ms] ensureAnalyticsSent: 107ms
[   +2 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[  +10 ms] Shutdown hooks complete
[        ] exiting with code 0

Hi @hansels
The logs you provided doesn't contain Fatal Exception
Can you please provide flutter run --verbose with fatal exception and a complete reproducible minimal code sample
Thank you

Hi @TahaTesser
I can't reproduce the Fatal Exception on my side, the error that I get is from my Firebase Crashlytics logs
Thanks

Any updates...facing same issue

Pinging this thread to keep it going. I have this same issue. Right now it looks like I'll have to revert All of our firestore plugins

Only slightly different stack traces from recent reports (above)

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
       at io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.lambda$null$8$FlutterFirebaseFirestorePlugin(FlutterFirebaseFirestorePlugin.java:67)
       at io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$Om-QqNeCto0p2tej6MhbBamtjUw.onEvent(-.java:6)
       at com.google.firebase.firestore.Query.lambda$addSnapshotListenerInternal$2(Query.java:27)
       at com.google.firebase.firestore.Query$$Lambda$3.onEvent(Query.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener.lambda$onEvent$0(AsyncEventListener.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run(AsyncEventListener.java:6)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at com.google.android.gms.internal.tasks.zzb.dispatchMessage(zzb.java)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6938)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
       at io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.a(FlutterFirebaseFirestorePlugin.java:67)
       at io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$TkTiyB-AIynA_CQ6V9vWC2Jw39c.onEvent(-.java:6)
       at com.google.firebase.firestore.DocumentReference.a(DocumentReference.java:87)
       at com.google.firebase.firestore.DocumentReference$$Lambda$3.a(DocumentReference.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener.a(AsyncEventListener.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run(AsyncEventListener.java:6)
       at android.os.Handler.handleCallback(Handler.java:794)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.google.android.gms.internal.tasks.zzb.dispatchMessage(zzb.java)
       at android.os.Looper.loop(Looper.java:176)
       at android.app.ActivityThread.main(ActivityThread.java:6651)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)

Also having the issue. One interesting fact is that it only happens on Android 10 in my case.
image

FlutterFirebaseFirestorePlugin.java line 67

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void f.a.c.a.j.a(java.lang.String, java.lang.Object)' on a null object reference
       at io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.a(FlutterFirebaseFirestorePlugin.java:67)
       at io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$TkTiyB-AIynA_CQ6V9vWC2Jw39c.onEvent(-.java:6)
       at com.google.firebase.firestore.DocumentReference.a(DocumentReference.java:87)
       at com.google.firebase.firestore.DocumentReference$$Lambda$3.a(DocumentReference.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener.a(AsyncEventListener.java:6)
       at com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run(AsyncEventListener.java:6)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at com.google.android.gms.internal.tasks.zzb.dispatchMessage(zzb.java)
       at android.os.Looper.loop(Looper.java:224)
       at android.app.ActivityThread.main(ActivityThread.java:7519)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

We see the bug on more than just android 10, so it must be a coincidence for you i guess?

Same issue here

io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.a (FlutterFirebaseFirestorePlugin.java:67)
io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$Om-QqNeCto0p2tej6MhbBamtjUw.onEvent (-.java:6)
com.google.firebase.firestore.Query.a (Query.java:27)
com.google.firebase.firestore.Query$$Lambda$3.a (Query.java:6)
com.google.firebase.firestore.core.AsyncEventListener.a (AsyncEventListener.java:6)
com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run (AsyncEventListener.java:6)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
com.google.android.gms.internal.tasks.zzb.dispatchMessage (zzb.java)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7615)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)

I'm on cloud_firestore: ^0.14.1+2

Appreciate there is an issue here but we're going to need more than stack traces. Does anyone have a reproducible snippet of code which causes this?

Unfortunately I haven't been able to reproduce the issues, and the users who are experiencing this issue haven't reported the bug. I'm keeping a very close eye on this on our app. The main thing I hear from other threads on this issue is that it has something to do with coming from the background. like if you close the app with the back button and reopening the app

Having the same issue with following Stack trace and lline number:

FlutterFirebaseFirestorePlugin.java – line 385
io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.lambda$null$11

io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin.lambda$null$11 (FlutterFirebaseFirestorePlugin.java:385)
io.flutter.plugins.firebase.firestore.-$$Lambda$FlutterFirebaseFirestorePlugin$TkTiyB-AIynA_CQ6V9vWC2Jw39c.onEvent (-.java:6)
com.google.firebase.firestore.DocumentReference.lambda$addSnapshotListenerInternal$2 (DocumentReference.java:504)
com.google.firebase.firestore.DocumentReference$$Lambda$3.a (DocumentReference.java:6)
com.google.firebase.firestore.core.AsyncEventListener.lambda$onEvent$0 (AsyncEventListener.java:42)
com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run (AsyncEventListener.java:6)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
com.google.android.gms.internal.tasks.zzb.dispatchMessage (zzb.java:6)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7386)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)

I'm on cloud_firestore: ^0.14.1+3

Was this page helpful?
0 / 5 - 0 ratings