Closed HiskelKelemework closed 2 years ago
I'm getting a similar error with firebase performance
.pub-cache/hosted/pub.dartlang.org/firebase_performance_web-0.1.0+6/lib/src/internals.dart:14:20: Error: Method not found: 'guardWebExceptions'.
return internals.guardWebExceptions(
^^^^^^^^^^^^^^^^^^
Failed to compile application.
updating my flutter version and all firebase related packages to the latest versions solved the problem. updating firebase_core should be enough for your problems.
Bug report
Flutter web app broken possibly because of the new firebase_analytics version I've inspected the firebase_analytics exception.dart file and there is no guardWebExceptions method. The app started showing the following error
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics_web-0.4.0+7/lib/utils/exception.dart:10:20: Error: Method not found: 'guardWebExceptions'. return internals.guardWebExceptions( ^^^^^^^^^^^^^^^^^^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-1.0.6/lib/src/utils/web_utils.dart:185:46: Warning: Operand of null-aware operation '!' has type 'Map<dynamic, dynamic>' which excludes null.
It was working fine without errors the yesterday. so I'm guessing this has to do with the new version of the package.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix. Please link to the public repository URL.
Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` [β] Flutter (Channel stable, 2.8.0, on macOS 11.5.2 20G95 darwin-x64, locale en-ET) [!] Android toolchain - develop for Android devices (Android SDK version 31.0.0) β cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. β Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [!] Xcode - develop for iOS and macOS (Xcode 12.5.1) ! Flutter recommends a minimum Xcode version of 13.0.0. Download the latest version or update via the Mac App Store. [β] Chrome - develop for the web [β] Android Studio (version 2020.3) [β] VS Code (version 1.64.2) [β] Connected device (1 available) ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` Dart SDK 2.15.0 Flutter SDK 2.8.0 chatUi 2.5.0-nullsafety.3 dependencies: - algolia 1.0.1 [meta http uuid] - auto_route 0.6.9 [flutter meta] - auto_size_text 2.1.0 [flutter] - carousel_slider 4.0.0 [flutter] - cloud_functions 1.0.3 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - cloudinary_public 0.9.0 [flutter http] - crypto 2.1.5 [collection convert typed_data] - dev 1.0.0 [flutter gestures] - equatable 2.0.3 [collection meta] - faunadb_http 0.13.1 [http json_annotation] - file_picker 4.2.5 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path] - firebase_analytics 9.1.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 1.1.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.12.0 [firebase_core_platform_interface firebase_core_web flutter meta] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_bloc 8.0.1 [flutter bloc provider] - flutter_dotenv 5.0.0 [flutter] - flutter_facebook_auth 1.0.2+2 [flutter] - flutter_svg 0.21.0+1 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - google_fonts 2.0.0 [flutter http path_provider crypto] - google_sign_in 4.5.9 [google_sign_in_platform_interface flutter meta google_sign_in_web] - hovering 1.0.4 [flutter] - http 0.13.3 [async http_parser meta path pedantic] - image_picker 0.7.4 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface image_picker_for_web] - intl 0.17.0 [clock path] - lint 1.5.3 - progress_state_button 1.0.3 [flutter] - provider 6.0.2 [collection flutter nested] - shared_preferences 2.0.7 [flutter meta shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - star_menu 1.0.4 [flutter] - start_jwt 0.2.0 [crypto cryptoutils] - stream_chat 1.5.3 [async collection dio freezed_annotation http_parser json_annotation logging meta mime rxdart uuid web_socket_channel] - stream_chat_flutter_core 1.5.3 [flutter meta rxdart stream_chat] - stripe_payment 1.1.3 [flutter] - swipe_gesture_recognizer 0.0.2 [flutter] - transparent_image 2.0.0 - url_launcher 6.0.3 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web] - uuid 2.2.2 [crypto convert] dev dependencies: - auto_route_generator 0.6.10 [build source_gen analyzer path build_runner auto_route] - build_runner 1.11.5 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - faker 2.0.0 [crypto] - 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 platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters charcode clock collection crypto fake_async file matcher meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] - mockito 4.1.4 [analyzer build code_builder collection dart_style matcher meta source_gen test_api] dependency overrides: - crypto 2.1.5 [collection convert typed_data] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - json_annotation 3.1.1 - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - test_api 0.4.8 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - uuid 2.2.2 [crypto convert] transitive dependencies: - _fe_analyzer_shared 14.0.0 [meta] - analyzer 0.41.2 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.1.6 [crypto path] - args 2.1.1 - async 2.8.2 [collection meta] - bloc 8.0.2 [meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 1.6.2 [analyzer async convert crypto glob logging meta path] - build_config 0.4.6 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.10 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 1.5.3 [analyzer build crypto graphs logging meta path package_config pool pub_semver] - build_runner_core 6.1.10 [async build build_config build_resolvers collection convert crypto glob graphs logging meta path package_config pedantic pool timing watcher yaml] - built_collection 5.1.0 - built_value 8.1.0 [built_collection collection fixnum meta] - characters 1.2.0 - charcode 1.3.1 - checked_yaml 1.0.4 [json_annotation source_span yaml] - cli_util 0.3.2 [meta path] - clock 1.1.0 - cloud_functions_platform_interface 5.0.21 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.0.3 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 3.7.0 [built_collection built_value collection matcher meta] - collection 1.15.0 - convert 2.1.1 [charcode typed_data] - cryptoutils 0.4.0 [collection] - dart_style 1.3.12 [analyzer args path pub_semver source_span] - dio 3.0.10 [http_parser path] - fake_async 1.2.0 [clock collection] - ffi 1.1.2 - file 6.1.2 [meta path] - firebase_analytics_platform_interface 3.1.0 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.0+7 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 4.3.1 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 1.0.6 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.2.4 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - fixnum 1.0.0 - flutter_plugin_android_lifecycle 2.0.5 [flutter] - freezed_annotation 0.12.0 [collection json_annotation meta] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - gestures 1.0.0 [flutter] - glob 2.0.1 [async collection file path pedantic string_scanner] - google_sign_in_platform_interface 1.1.2 [flutter meta quiver] - google_sign_in_web 0.9.2 [google_sign_in_platform_interface flutter flutter_web_plugins meta js] - graphs 0.2.0 - http_multi_server 2.2.0 [async] - image_picker_for_web 2.0.0 [image_picker_platform_interface meta flutter flutter_web_plugins] - image_picker_platform_interface 2.1.0 [flutter meta http plugin_platform_interface] - io 0.3.5 [meta path string_scanner] - js 0.6.3 - logging 0.11.4 - matcher 0.12.11 [stack_trace] - meta 1.7.0 - mime 0.9.7 - nested 1.0.0 [flutter] - package_config 1.9.3 [path charcode] - path 1.8.0 - path_drawing 0.5.0 [vector_math meta path_parsing flutter] - path_parsing 0.2.0 [vector_math meta] - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 2.0.0 [flutter] - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface] - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.11.0 - petitparser 4.1.0 [meta] - platform 3.0.2 - plugin_platform_interface 2.0.2 [meta] - pool 1.5.0 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.0.0 [collection] - pubspec_parse 0.1.8 [checked_yaml json_annotation pub_semver yaml] - quiver 2.1.5 [matcher meta] - rxdart 0.25.0 - shared_preferences_linux 2.0.2 [file meta flutter path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 2.0.2 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.2 [flutter flutter_web_plugins meta shared_preferences_platform_interface] - shared_preferences_windows 2.0.2 [flutter file meta path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.1.4 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 0.2.4+1 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 0.9.10+3 [analyzer async build dart_style glob meta path pedantic source_span] - source_span 1.8.1 [collection path term_glyph] - 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 - term_glyph 1.2.0 - timing 0.1.1+3 [json_annotation] - typed_data 1.3.0 [collection] - url_launcher_linux 2.0.0 [flutter] - url_launcher_macos 2.0.0 [flutter] - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins] - url_launcher_windows 2.0.0 [flutter] - vector_math 2.1.1 - vm_service 7.3.0 - watcher 1.0.0 [async path pedantic] - web_socket_channel 1.2.0 [async crypto stream_channel] - webdriver 3.0.0 [archive matcher path stack_trace sync_http] - win32 2.0.5 [ffi] - xdg_directories 0.2.0 [meta path process] - xml 5.1.0 [collection meta petitparser] - yaml 3.1.0 [collection source_span string_scanner] ```