When running Firebase on android, there is no problem, but when debugging on the web (chrome or edge), it doesn’t work… in the Debug Console a DART_SDK.JS problem notification appears, like this:
"Locations: No module for http://localhost:53xxx/dart_sdk.js"
This notification only appears when running at Firebase.initializeApp();
My Code:
void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp( MaterialApp( title: "Firebase", home: MyApp() ) ); }
3
Answers
The problem is that you need to configure some extra things for web to work in your initializeApp method
Anyone initializing with web information and still getting this error on
Flutter 3.3.1 • channel stable
Framework • revision 4f9d92f (20 hours ago) • 2022-09-06 17:54:53 -0700
Engine • revision 3efdf03e73
Tools • Dart 2.18.0 • DevTools 2.15.0
->Try changing channel to flutter channel stable
for that run these commands in flutter terminal
Try to run the application without debugging.
Flutter new release 3.3.4 maybe is not stable yet.
Reference link for the error : Locations: No module for http://localhost:/dart_sdk.js