When I start my project whose codes I shared, the chrome emulator does not work and I get the following error ;
In main.dart;
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
In generated_plugin_registrant.dart ;
import 'package:cloud_firestore_web/cloud_firestore_web.dart';
import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
FirebaseFirestoreWeb.registerWith(registrar);
FirebaseCoreWeb.registerWith(registrar);
registrar.registerMessageHandler();
}
Debug Console Error ;
ChromeProxyService: Failed to evaluate expression 'completer.complete': InternalError: No frame with index 14. ChromeProxyService: Failed to evaluate expression 'FirebaseAppPlatform': InternalError: No frame with index 14. ChromeProxyService: Failed to evaluate expression 'context.callMethod': InternalError: No frame with index 14. ChromeProxyService: Failed to evaluate expression '_UnaryFunction': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression 'return': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression ''dart:async': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression ''package': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression '_UnaryFunction': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression 'Function': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression 'registerPlugins': InternalError: No frame with index 112. ChromeProxyService: Failed to evaluate expression '_UnaryFunction': InternalError: No frame with index 112.
How can I solve this problem ?