π [firebase_auth] Attempt to get length of null array
Bug report
Describe the bug
I have received this crash report from Crashlytics :
Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:248)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:241)
at java.util.ArrayList.add(ArrayList.java:467)
at com.google.firebase.auth.internal.zzx.zzc(zzx.java:64)
at com.google.firebase.auth.FirebaseAuth.zzH(FirebaseAuth.java:83)
at com.google.firebase.auth.zzo.zza(zzo.java:3)
at com.google.android.gms.internal.firebase-auth-api.zzrw.zzb(zzrw.java:31)
at com.google.android.gms.internal.firebase-auth-api.zzui.zzj(zzui.java)
at com.google.android.gms.internal.firebase-auth-api.zzuf.zzn(zzuf.java:33)
at com.google.android.gms.internal.firebase-auth-api.zzth.zzn(zzth.java:2)
at com.google.android.gms.internal.firebase-auth-api.zzqf.zzb(zzqf.java:4)
at com.google.android.gms.internal.firebase-auth-api.zzuq.zza(zzuq.java:140)
at com.google.android.gms.internal.firebase-auth-api.zztw.zzf(zztw.java:20)
at com.google.android.gms.internal.firebase-auth-api.zzrm.zzp(zzrm.java:18)
at com.google.android.gms.internal.firebase-auth-api.zzti.zzj(zzti.java:26)
at com.google.android.gms.internal.firebase-auth-api.zzrw.zzc(zzrw.java:11)
at com.google.android.gms.internal.firebase-auth-api.zzuj.run(zzuj.java:8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
On Android from my live app in production. This happened only once on this phone :

Steps to reproduce
Impossible to reproduce this on my side, it's even the first time i see this crash from all the years i am using Firebase Auth.
Expected behavior
The app should not crash.
Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[β] Flutter (Channel stable, 3.3.1, on macOS 12.5.1 21G83 darwin-x64, locale fr-FR)
[β] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[β] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[β] Chrome - develop for the web
[β] Android Studio (version 2021.2)
[β] VS Code (version 1.71.0)
[β] Connected device (2 available)
[β] HTTP Host Availability
β’ No issues found!
Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 2.18.0
Flutter SDK 3.3.1
listeen 1.5.6
dependencies:
- app_tracking_transparency 2.0.2+4 [flutter]
- auto_size_text 3.0.0 [flutter]
- calendar_view 0.0.4 [flutter auto_size_text]
- cloud_firestore 3.4.6 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cupertino_icons 1.0.5
- curved_navigation_bar 1.0.3 [flutter meta]
- firebase_analytics 9.3.3 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_app_check 0.0.7 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 3.7.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.21.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.8.9 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_database 9.1.3 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- firebase_in_app_messaging 0.6.0+23 [firebase_core firebase_core_platform_interface firebase_in_app_messaging_platform_interface flutter meta]
- firebase_performance 0.8.2+4 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_colorpicker 1.0.3 [flutter]
- flutter_cupertino_date_picker 1.0.26+2 [flutter]
- flutter_email_sender 5.1.0 [flutter]
- flutter_image_compress 1.1.2 [flutter]
- flutter_interactive_keyboard 0.2.0 [flutter]
- flutter_local_notifications 9.9.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_native_timezone 2.0.0 [flutter_web_plugins flutter js]
- flutter_widgetkit 1.0.3 [flutter]
- flutterfire_ui 0.4.3+7 [cloud_firestore collection crypto desktop_webview_auth email_validator firebase_auth firebase_core firebase_database firebase_dynamic_links flutter flutter_facebook_auth flutter_localizations flutter_svg google_sign_in sign_in_with_apple twitter_login]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- google_mobile_ads 2.0.1 [meta flutter visibility_detector]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- http 0.13.5 [async http_parser meta path]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- in_app_review 2.0.4 [flutter in_app_review_platform_interface]
- package_info_plus 1.4.3+1 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path 1.8.2
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- percent_indicator 4.2.2 [flutter]
- provider 6.0.3 [collection flutter nested]
- purchases_flutter 4.2.1 [flutter freezed_annotation json_annotation]
- reorderables 0.5.0 [flutter]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.6 [crypto]
dev dependencies:
- flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 2.0.1 [lints]
- flutter_native_splash 2.2.8 [args flutter flutter_web_plugins html image js lint meta path universal_io xml yaml]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
transitive dependencies:
- archive 3.3.1 [crypto path]
- args 2.3.1
- async 2.9.0 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- cli_util 0.3.5 [meta path]
- clock 1.1.1
- cloud_firestore_platform_interface 5.7.3 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.8.6 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.16.0
- cross_file 0.3.3+1 [js meta]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dbus 0.7.8 [args ffi meta xml]
- desktop_webview_auth 0.0.9 [crypto flutter http]
- email_validator 2.1.17
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.4 [meta path]
- firebase 9.0.3 [http http_parser js]
- firebase_analytics_platform_interface 3.3.3 [firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.4.2+3 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_app_check_platform_interface 0.0.4+15 [firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.0.6+4 [firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_auth_platform_interface 6.6.0 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 4.3.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.2.15 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_platform_interface 0.2.2+3 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.1+5 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js]
- firebase_dynamic_links 4.3.6 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.3+11 [firebase_core flutter meta plugin_platform_interface]
- firebase_in_app_messaging_platform_interface 0.2.1+15 [firebase_core flutter meta plugin_platform_interface]
- firebase_performance_platform_interface 0.1.1+15 [firebase_core flutter plugin_platform_interface]
- firebase_performance_web 0.1.1+4 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js]
- flutter_facebook_auth 4.4.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web]
- flutter_facebook_auth_platform_interface 3.2.0 [flutter plugin_platform_interface]
- flutter_facebook_auth_web 3.2.0 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface]
- flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_svg 1.1.4 [flutter meta path_drawing vector_math xml]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- freezed_annotation 2.1.0 [collection json_annotation meta]
- google_sign_in 5.4.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- google_sign_in_android 6.1.0 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.5.0 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.3.0 [flutter plugin_platform_interface quiver]
- google_sign_in_web 0.10.2 [flutter flutter_web_plugins google_sign_in_platform_interface js]
- hive 2.2.3 [meta crypto]
- html 0.15.0 [csslib source_span]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image 3.2.0 [archive meta xml]
- image_picker_android 0.8.5+2 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.6 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface]
- in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform]
- intl 0.17.0 [clock path]
- js 0.6.4
- json_annotation 4.6.0 [meta]
- lint 1.10.0
- lints 2.0.0
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- meta 1.8.0
- nested 1.0.0 [flutter]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 2.0.0 [package_info_plus_platform_interface ffi flutter win32]
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.0.20 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.2 [ffi flutter path path_provider_platform_interface win32]
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- process 4.2.4 [file path platform]
- quiver 3.1.0 [matcher]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sign_in_with_apple 3.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js]
- sky_engine 0.0.99
- source_span 1.9.0 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.1 [source_span]
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.8.0 [path]
- twitter_login 4.2.3 [flutter crypto http]
- typed_data 1.3.1 [collection]
- universal_io 2.0.4 [collection crypto meta typed_data]
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.2
- visibility_detector 0.3.3 [flutter]
- win32 2.7.0 [ffi]
- xdg_directories 0.2.0+2 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]
Thanks for the report @Tom3652 Looking at the error log, it seems similar to https://github.com/firebase/flutterfire/issues/8517#issuecomment-1120294772 which was closed in favor of https://github.com/firebase/flutterfire/issues/8444 that in turn was fixed. See if these issues help for your reference. Also, make sure the FirebaseSdkVersion you are using is the latest one per mentioned https://github.com/firebase/flutterfire/issues/9107.
Hi @darshankawar you are right it seems to be the same issue. You are probably right i have not made an app update on Android since 26 of june. I will make some tests and release a new version today with the latest firebase sdk version, thanks !
Hey @Tom3652. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@Tom3652 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.