skip to Main Content

The following error is thrown when I tried to run a windows application

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unsupported operation: DefaultFirebaseOptions have not been configured for windows - you can reconfigure this by running the FlutterFire CLI again.
#0      DefaultFirebaseOptions.currentPlatform (package:user_authentication/firebase_options.dart:36:9)
#1      main (package:user_authentication/main.dart:11:37)
#2      _runMain.<anonymous closure> (dart:ui/hooks.dart:134:23)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

I even tried to run flutterfire configure command from the root directory
Flutterfire cli not showing windows as an option for platform to support

i Found 2 Firebase projects. Selecting project my-cool-firebase.
? Which platforms should your configuration support (use arrow keys & space to select)? ›
✔ android
  ios
  macos
✔ web

2

Answers


  1. I had the same issue. I am assuming when you run flutterfire configure command, it isn’t showing windows & linux option. For some reason dart pub global activate flutterfire_cli this command wasn’t working for me. What solved my issue is

    1. I Added flutterfire_cli package manually to pubspec.yaml using flutter pub add flutterfire_cli

    2. Then I Run dart pub global activate flutterfire_cli

    after you done those two steps, flutterfire configure --project=<your-project-name> should show windows and linux option.

    Login or Signup to reply.
  2. try to run flutter pub add firebase_core_desktop

    and then flutterfire configure

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search