flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

Latest flutterfire_ui could not build in web

Open richard457 opened this issue 4 years ago • 7 comments

When run flutter build web --release

cloud_firestore_web-2.6.10/lib/src/internals.dart:11:20:
Error: Method not found: 'guardWebExceptions'.
  return internals.guardWebExceptions(
                   ^^^^^^^^^^^^^^^^^^
Error: Compilation failed.

This is because some firestore packages are updated within the package.

richard457 avatar Feb 28 '22 17:02 richard457

Similar Issue here: Target dart2js failed: Exception: ../../../flutter_windows_2.8.1-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_web-3.2.10/lib/src/utils/errors.dart:20:20: Error: Method not found: 'guardWebExceptions'. return internals.guardWebExceptions( ^^^^^^^^^^^^^^^^^^ Error: Compilation failed.

dreamsandcode avatar Feb 28 '22 21:02 dreamsandcode

@richard457 Try this: https://stackoverflow.com/questions/71261321/flutter-app-running-on-web-failing-with-error

You can try to add 6 dependencies, as mentioned in the answer. It should resolve the issue with guardWebException. It worked in my case.

@dreamsandcode You should also try adding these dependencies in pubspec.yaml

ghost avatar Mar 01 '22 11:03 ghost

@richard457 Check this comment and upgrade as mentioned in it and see if it helps to resolve the issue.

darshankawar avatar Mar 01 '22 11:03 darshankawar

Make sure to add:

dependencies:
 firebase_core: ^1.13.1

rrousselGit avatar Mar 02 '22 13:03 rrousselGit

Make sure to add:

dependencies:
 firebase_core: ^1.13.1

This was the solution for me. I previously had 1.12.0. Thank you @rrousselGit

JordanRoberts1 avatar Mar 03 '22 18:03 JordanRoberts1

firebase_core: ^1.12.0 -> firebase_core: ^1.13.1
cloud_firestore: ^3.1.8 -> cloud_firestore: ^3.1.10
firebase_analytics: ^9.1.0 -> firebase_analytics: ^9.1.2

Then do:

flutter clean
flutter run

This works for me, greetings!

Garciconx avatar Mar 09 '22 02:03 Garciconx

Make sure to add:

dependencies:
 firebase_core: ^1.13.1

This helped me a lot, thanks

capps096github avatar Mar 29 '22 20:03 capps096github