flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🐛 [firebase_core] NoSuchMethodError: method not found exceptions on web

Open stx opened this issue 1 year ago • 2 comments

Bug report

Since upgrading to the last Flutterfire releases, we're seeing this error randomly on production:

minified:QB: NoSuchMethodError: method not found: 'ga9Q' on null
  at <fn>(../../../../programs/flutter_3_0_5/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.20.0/lib/src/firebase_app.dart:66:3)
  at _StringAllMatchesIterator.moveNext(main.dart.js:3143:51)
  at _StringAllMatchesIterator.moveNext(org-dartlang-sdk:///lib/_internal/js_runtime/lib/string_helper.dart:104:5)
  at bg1.$1(org-dartlang-sdk:///lib/_internal/js_runtime/lib/string_helper.dart:92:8)
  at Object.bhv(main.dart.js:34:1)
  at _ForwardingStreamSubscription._addError(main.dart.js:24:6)
  at agn.q1(org-dartlang-sdk:///lib/async/stream_pipe.dart:126:8)
  at b4q.$0(main.dart.js:521:21)
  at _SyncBroadcastStreamController._sendDone(main.dart.js:276:3)
  at aq.qv(org-dartlang-sdk:///lib/async/broadcast_stream_controller.dart:398:24)

which appears to point to this code in the FirebaseApp class (presumably other is null when this exception occurs?)

  @override
  // ignore: avoid_equals_and_hash_code_on_mutable_classes
  bool operator ==(Object other) {
    if (identical(this, other)) return true;
    if (other is! FirebaseApp) return false;
    return other.name == name && other.options == options;
  }

We have no idea where this is coming from, why or how to reproduce it.

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.0.5, on macOS 13.0 22A5295i darwin-arm, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.69.2)
[✓] 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.17.6
Flutter SDK 3.0.5
tessie 4.7.15+297

dependencies:
- auto_size_text 3.0.0 [flutter]
- cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- clipboard 0.1.3 [flutter]
- cloud_firestore 3.4.3 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 3.3.3 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- collection 1.16.0
- cupertino_icons 1.0.5
- drift 1.7.1 [async convert collection js meta stream_channel sqlite3]
- email_validator 2.1.17
- expandable 5.0.1 [flutter]
- file_picker 5.0.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32]
- firebase_analytics 9.3.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 3.6.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_dynamic_links 4.3.3 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_messaging 12.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_branch_sdk 6.0.0 [flutter flutter_web_plugins plugin_platform_interface js]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_map 2.1.1 [async collection flutter http latlong2 meta polylabel positioned_tap_detector_2 proj4dart tuple vector_math]
- flutter_map_location_marker 4.1.3 [flutter flutter_compass flutter_map geolocator latlong2]
- flutter_map_marker_cluster 0.5.0 [flutter flutter_map flutter_map_marker_popup latlong2]
- flutter_native_splash 2.2.7 [args flutter flutter_web_plugins image js lint meta path universal_io xml yaml]
- flutter_native_timezone 2.0.0 [flutter_web_plugins flutter js]
- flutter_secure_storage 5.0.2 [meta flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows]
- flutter_spinkit 5.1.0 [flutter]
- font_awesome_flutter 9.0.0 [flutter]
- geocoding 2.0.4 [flutter geocoding_platform_interface]
- get_it 7.2.0 [async collection]
- go_router 4.2.4 [collection flutter flutter_web_plugins logging meta]
- google_place 0.4.7 [http]
- http 0.13.4 [async http_parser meta path]
- in_app_review 2.0.4 [flutter in_app_review_platform_interface]
- intl 0.17.0 [clock path]
- latlong2 0.8.1 [intl]
- local_auth 2.1.1 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows]
- location 4.4.0 [flutter location_platform_interface location_web]
- logger 1.1.0
- lottie 1.4.0 [archive flutter path vector_math]
- modal_bottom_sheet 2.1.0 [flutter]
- moor_flutter 4.1.0 [moor sqflite path flutter]
- package_info_plus 1.4.3 [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.1
- 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]
- pinput 2.2.11 [flutter smart_auth]
- purchases_flutter 3.10.0 [flutter freezed_annotation json_annotation]
- qr_flutter 4.0.0 [flutter qr]
- recase 4.0.0
- reorderable_grid_view 2.2.2 [flutter]
- rxdart 0.27.5
- sentry_flutter 6.9.0 [flutter flutter_web_plugins sentry package_info_plus meta]
- share_plus 4.0.10 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
- 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]
- sqlite3_flutter_libs 0.5.9 [flutter]
- syncfusion_flutter_charts 20.2.40 [flutter intl vector_math syncfusion_flutter_core]
- syncfusion_flutter_core 20.2.40 [vector_math flutter]
- syncfusion_flutter_datepicker 20.2.40 [flutter intl syncfusion_flutter_core]
- syncfusion_flutter_gauges 20.2.40 [flutter syncfusion_flutter_core intl]
- timeago 3.2.2
- universal_html 2.0.8 [async csslib charcode collection html meta source_span typed_data universal_io]
- universal_platform 1.0.0+1
- 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]
- url_strategy 0.2.0 [flutter_web_plugins]
- video_player 2.4.5 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- visibility_detector 0.3.3 [flutter]
- webview_flutter 3.0.4 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]

dev dependencies:
- build_runner 2.2.0 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- dart_code_metrics 4.17.0 [analyzer analyzer_plugin ansicolor args collection crypto file glob html meta path source_span xml yaml]
- drift_dev 1.7.0 [charcode collection recase meta path json_annotation stream_transform args logging cli_util yaml io drift sqlite3 sqlparser analyzer analyzer_plugin source_span package_config pub_semver build build_resolvers build_config dart_style source_gen]
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters charcode clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math]
- flutter_launcher_icons 0.9.3 [args image path yaml]
- sentry_dart_plugin 1.0.0-beta.2 [yaml injector ansicolor package_config system_info2]
- test 1.21.1 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core]

transitive dependencies:
- _fe_analyzer_shared 43.0.0 [meta]
- analyzer 4.3.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- analyzer_plugin 0.10.0 [analyzer collection dart_style pub_semver yaml]
- animated_stack_widget 0.0.4 [flutter]
- ansicolor 2.0.1
- archive 3.1.11 [crypto path]
- args 2.3.1
- async 2.8.2 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.3.0 [analyzer async convert crypto glob logging meta path]
- build_config 1.1.0 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.0.9 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml]
- build_runner_core 7.2.3 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.4.0 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface]
- characters 1.2.0
- charcode 1.3.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- cli_util 0.3.5 [meta path]
- clock 1.1.0
- cloud_firestore_platform_interface 5.7.0 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.8.3 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- cloud_functions_platform_interface 5.1.12 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.3.1 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- code_builder 4.2.0 [built_collection built_value collection matcher meta]
- convert 3.0.2 [typed_data]
- coverage 1.2.0 [args logging package_config path source_maps stack_trace vm_service]
- crypto 3.0.1 [collection typed_data]
- csslib 0.17.2 [source_span]
- dart_style 2.2.3 [analyzer args path pub_semver source_span]
- fake_async 1.3.0 [clock collection]
- ffi 2.0.1
- file 6.1.2 [meta path]
- file_utils 1.0.1 [globbing path]
- firebase_analytics_platform_interface 3.3.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.4.2 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_auth_platform_interface 6.5.2 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 4.2.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_dynamic_links_platform_interface 0.2.3+8 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.1.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.1.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- fixnum 1.0.1
- flutter_blurhash 0.7.0 [flutter]
- flutter_compass 0.7.0 [flutter]
- flutter_map_marker_popup 3.1.0+1 [flutter animated_stack_widget flutter_map latlong2 provider]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_secure_storage_linux 1.1.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 1.1.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.0.0 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.0.2 [flutter flutter_web_plugins flutter_secure_storage_platform_interface js]
- flutter_secure_storage_windows 1.1.2 [flutter flutter_secure_storage_platform_interface]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- freezed_annotation 1.1.0 [collection json_annotation meta]
- frontend_server_client 2.1.3 [async path]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- geolocator 9.0.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- geolocator_android 4.0.2 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.1 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- glob 2.1.0 [async collection file path string_scanner]
- globbing 1.0.0 [path]
- graphs 2.1.0 [collection]
- html 0.15.0 [csslib source_span]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image 3.2.0 [archive meta xml]
- in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform]
- injector 2.0.0
- io 1.0.3 [meta path string_scanner]
- js 0.6.4
- json_annotation 4.6.0 [meta]
- lint 1.10.0
- lists 1.0.1 [meta]
- local_auth_android 1.0.8 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_ios 1.0.7 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.0.4 [flutter intl plugin_platform_interface]
- local_auth_windows 1.0.1 [flutter local_auth_platform_interface]
- location_platform_interface 2.3.0 [flutter meta plugin_platform_interface]
- location_web 3.1.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta]
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- mgrs_dart 2.0.0 [unicode]
- mime 1.0.2
- moor 4.6.1+1 [async convert collection drift meta stream_channel sqlite3]
- nested 1.0.0 [flutter]
- node_preamble 2.0.1
- octo_image 1.0.2 [flutter flutter_blurhash]
- package_config 2.1.0 [path]
- 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_provider_android 2.0.17 [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.0 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- polylabel 1.0.1 [collection]
- pool 1.5.1 [async stack_trace]
- positioned_tap_detector_2 1.0.4 [flutter]
- process 4.2.4 [file path platform]
- proj4dart 2.0.0 [mgrs_dart wkt_parser meta]
- provider 6.0.3 [collection flutter nested]
- pub_semver 2.1.1 [collection meta]
- pubspec_parse 1.2.0 [checked_yaml collection json_annotation pub_semver yaml]
- qr 2.1.0 [meta]
- quiver 3.1.0 [matcher]
- sentry 6.9.0 [http meta stack_trace uuid]
- share_plus_linux 3.0.0 [share_plus_platform_interface file flutter meta url_launcher]
- share_plus_macos 3.0.1 [share_plus_platform_interface flutter]
- share_plus_platform_interface 3.0.3 [flutter meta mime plugin_platform_interface]
- share_plus_web 3.0.1 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
- share_plus_windows 3.0.1 [share_plus_platform_interface flutter meta url_launcher]
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- 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.0.0 [flutter]
- 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]
- shelf 1.3.2 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 3.0.1 [path shelf shelf_static]
- shelf_static 1.1.1 [convert http_parser mime path shelf]
- shelf_web_socket 1.0.2 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- smart_auth 1.0.5 [flutter flutter_web_plugins]
- source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml]
- source_map_stack_trace 2.1.0 [path stack_trace source_maps]
- source_maps 0.10.10 [source_span]
- source_span 1.8.2 [collection path term_glyph]
- sqflite 2.0.3 [flutter sqflite_common path]
- sqflite_common 2.2.1+1 [synchronized path meta]
- sqlite3 1.7.2 [collection ffi js meta path]
- sqlparser 0.22.0 [meta collection source_span charcode]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- sync_http 0.3.0
- synchronized 3.0.0+2
- system_info2 2.0.4 [file_utils path]
- term_glyph 1.2.0
- test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- test_core 0.4.13 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api]
- timing 1.0.0 [json_annotation]
- tuple 2.0.0 [quiver]
- typed_data 1.3.0 [collection]
- unicode 0.3.1 [lists]
- 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.12 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- video_player_android 2.3.8 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.5 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.3 [flutter plugin_platform_interface]
- video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface]
- vm_service 8.2.2
- watcher 1.0.1 [async path]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- webdriver 3.0.0 [archive matcher path stack_trace sync_http]
- webkit_inspection_protocol 1.1.0 [logging]
- webview_flutter_android 2.9.2 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 1.9.1 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 2.9.2 [flutter path webview_flutter_platform_interface]
- win32 2.7.0 [ffi]
- wkt_parser 2.0.0
- xdg_directories 0.2.0+1 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]

stx avatar Aug 03 '22 16:08 stx

did u get this error in Debug mode ? did u noticed minified: at the beginning of the error ?

please set:

Android: buildTypes { release { minifyEnabled false shrinkResources false } }

Web:

remove firebase-core.js script from index.html in web folder

and try again ..

also we need sample code !

imeDevelopers avatar Aug 06 '22 16:08 imeDevelopers

Labeling this for further insights from the team, as, it seems to be coming from production and without any replicable steps or code.

darshankawar avatar Aug 08 '22 06:08 darshankawar

Do the error still happen?

Lyokone avatar Dec 09 '22 08:12 Lyokone

Hey @stx. 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!

google-oss-bot avatar Dec 20 '22 02:12 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@stx 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.

google-oss-bot avatar Dec 29 '22 02:12 google-oss-bot