1

I have coded a chat app which uses firebase. When I first ran it as an android app and a web app, it worked for a month. Recently, however, not only does the android app take forever to load when firebase is initialised, but also when I try to sign in from the web app, it gives an error:

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ [firebase_functions/internal] internal
│
│
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ #0 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw_
│ #1 packages/cloud_functions_web/https_callable_web.dart 46:7 call
│ #2 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 60:31 <fn>
│ #3 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1690:54 runBinary
│ #4 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 174:22 handleError
│ #5 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 778:46 handleError
│ #6 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 799:13 _propagateToListeners
│ #7 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 609:5 [_completeError]
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ ⛔ Sign in error,
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

I do not understand what is wrong as the error message is not specific enough. I have checked my firebase configurations on the website but nothing seems off. Here is my firebase authentication code:

final creds =
 await firebase.FirebaseAuth.instance.signInWithEmailAndPassword(
 email: _emailController.text,
 password: _passwordController.text,
 );

Can someone tell me how to fix this? If you would like to clarify something please let me know.

asked Jun 2, 2022 at 4:24

1 Answer 1

0

It seems related to this flutterfire issue/2558#issuecomment-824781256

Please ensure you're using the following step in your flutter project web as per the documentation

  1. Install the required command line tools
  2. Configure your apps to use Firebase flutterfire configure
  3. Initialize Firebase in your app
    • From your Flutter project directory, run the following command to install the core plugin: flutter pub add firebase_core
    • Configure flutter project flutterfire configure
    • In your lib/main.dart file, import the Firebase core plugin and the configuration file you generated earlier:
      import 'package:firebase_core/firebase_core.dart';
      import 'firebase_options.dart';
      
    • Also in your lib/main.dart file, initialize Firebase using the DefaultFirebaseOptions object exported by the configuration file:
      await Firebase.initializeApp(
       options: DefaultFirebaseOptions.currentPlatform,
      );
      
    • Rebuild your Flutter application: flutter run
  4. Add Firebase plugins
    • From your Flutter project directory, run the following command:
      flutter pub add cloud_functions
      
      then configure it
      flutterfire configure
      
      and once complete, rebuild your Flutter project:
      flutter run
      

Sometimes my old flutter projects with firebase just stop working suddenly, upgrading it to the latest flutter stable and update the packages to the latest most of the time will fix it.

answered Jun 8, 2022 at 4:27
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.