2

I've been getting this error anytime I try to run my application. I've tried everything from upgrading flutter to adding dependency_overrides but nothing has worked.

/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.6.9/lib/src/internals.dart:11:20: Error: Method not found: 'guardWebExceptions'.
  return internals.guardWebExceptions(
                   ^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_web-3.2.9/lib/src/utils/errors.dart:20:20: Error: Method not found: 'guardWebExceptions'.
  return internals.guardWebExceptions(
                   ^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/method_channel_firestore.dart:112:15: Error: Member not found: 'Error.throwWithStackTrace'.
        Error.throwWithStackTrace(
              ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Member not found: 'Error.throwWithStackTrace'.
    Error.throwWithStackTrace(exception, stackTrace);
          ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:17:9: Error: Member not found: 'Error.throwWithStackTrace'.
  Error.throwWithStackTrace(
        ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
      ^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Member not found: 'Error.throwWithStackTrace'.
    Error.throwWithStackTrace(exception, stackTrace);
          ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:17:9: Error: Member not found: 'Error.throwWithStackTrace'.
  Error.throwWithStackTrace(
        ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
      ^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:19:11: Error: Member not found: 'Error.throwWithStackTrace'.
    Error.throwWithStackTrace(exception, stackTrace);
          ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:22:9: Error: Member not found: 'Error.throwWithStackTrace'.
  Error.throwWithStackTrace(
        ^^^^^^^^^^^^^^^^^^^
/C:/Source/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:14:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(
      ^

What I noticed was that despite my updates, the sdk version in my pubspec.yaml file remains the same. According to other solutions, it should be ''>=2.16.0 <3.0.0'' to work.

environment:
  sdk: ">=2.15.0 <3.0.0"

And if I try to manually change it, it throws this error

The current Dart SDK version is 2.15.0.

Because purple requires SDK version >=2.16.0 <3.0.0, version solving failed.
pub get failed (1; Because purple requires SDK version >=2.16.0 <3.0.0, version solving failed.)

This is the output I get after typing flutter --version

Flutter 2.10.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c860cba910 (3 days ago) • 2022-03-25 00:23:12 -0500
Engine • revision 57d3bac3dd
Tools • Dart 2.16.2 • DevTools 2.9.2
Robinson T
  • 101
  • 2
  • Is it possible you have a second dart installation on your computer? Flutter comes with a version of dart so you don't need to install dart separately. What do you see if you enter `dart --version` into the command line? – mmcdon20 Mar 27 '22 at 23:42
  • Thank you very much! I did have multiple dart installations on my system. Once I deleted the rest and selected the correct SDK path, it worked. – Robinson T Mar 28 '22 at 02:14

1 Answers1

0

Add this to your pubsepc.yaml file

dependency_overrides:
  firebase_storage_platform_interface: 4.0.14

above

dev_dependencies:
  flutter_test:
    sdk: flutter
Dr.House
  • 784
  • 5
  • 11