Comments (5)
Hello, are you reproducing this issue using the latest versions?
from flutterfire.
Hello, I havent tried the latest versions, I can not upgrade Flutter due to some packages, so I can not upgrade Firebase
from flutterfire.
Hi @Lyokone, now I have tried with flutter 3.22.0, and firebase_core 3.1.0 (latest version), and its still the same result.
I did flutter clean, flutter pub get, flutter create --platforms web ., flutterfire configure, even changed Firebase project and registered a new web app, but nothing works. Am I missing something?
This is the dart file
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:test_web/firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.web);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() async {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
This is the output error where changed the version of firebase js as expected
FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app).
https://www.gstatic.com/firebasejs/10.11.1/firebase-app.js 2220:29 getApp
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Versi¢n 10.0.19045.4529], locale es-CO)
• Flutter version 3.22.0 on channel stable at C:\Users\57305\fvm\versions\3.22.0
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f68f (6 weeks ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
from flutterfire.
Let me see if I can reproduce using a Windows machine
from flutterfire.
@DavidAriza No issue on my side using your example. At this point I'm just assuming a bad development environment. Not sure if it's updating Chrome or corrupted Flutter installation. But initializing Web on Windows or any other platform is working fine;
from flutterfire.
Related Issues (20)
- [firebase_auth]: Cannot auth twitter from web HOT 8
- [firebase_messaging]: getToken() does not work on Safari, works on Chrome and Firefox. 'Request contains an invalid argument' HOT 13
- Deprecated imperative apply of Flutter's Gradle plugins HOT 4
- [flutterfire]: CDN: trunk URL couldn't be downloaded: HOT 1
- [AUTH]: Inconsistent behavior when switching from emulators to server HOT 2
- [firebase_crashlytics]: flutter macOS does not terminate the app after stop debuging HOT 6
- Found some security issues HOT 3
- [firebase_auth] linkWithCredential() throws email-already-in-use exception in flutter app
- Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ) intialize issue HOT 1
- [firebase_auth] authStateChanges() stream fires when read/write into firestore HOT 4
- 🐛 [firebase_massaging] Example flutter ios build is too old
- firebase_code: Duplicate Classes HOT 6
- Firebase Phone MFA not working with some numbers HOT 1
- [📚] Old Doc doesn't have sum() and average() example for flutter. HOT 1
- [Firebase storage]: iOS only - Unable to establish connection to channel, happens in Workmanager or isolate only HOT 1
- [Firebase_auth]: <When I use signInWithEmailAndPassword without first using the createUserWithEmailAndPassword method, I get the error message [firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithEmailAndPassword".> HOT 11
- 🐛 [crashlytics][release] Information from recordFlutterFatalError shows up as 'Instance of 'DiagnosticsProperty<void>' HOT 1
- [firebase_app_check] App check token does not print on Android real devices HOT 9
- [firebase_auth]: [web] referencing FirebaseAuthException after running release version of app throws exception. HOT 2
- [firebase_messaging]: After turning off the device and turn back on, onBackgroundMessage is not fired on iOS. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterfire.