-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'app' of undefined #2455
Comments
Hi @YashMobileFirst |
i just create a new flutter project and changes i made is add cloud_firestore to pubspec.yaml flutter doctor -v [✓] Flutter (Channel dev, v1.18.0-8.0.pre, on Mac OS X 10.13.6 17G66, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✗] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 3.6) [✓] Connected device (3 available) flutter run --verbose #0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3) |
Hi @YashMobileFirst
Please follow this guide Thank you |
In my project i add firebase web configuration in my index.html but still same result :( |
I just tested the issue and adding the proper configuration solved the issue |
whenever i run the project on chrome it shows me and i just add cloud_firestore to pubspec.yaml
TypeError: Cannot read property 'app' of undefined
at Object.app$ [as app] (http://localhost:61456/packages/firebase/src/top_level.dart.lib.js:72:56)
at new cloud_firestore_web.FirestoreWeb.new (http://localhost:61456/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:793:57)
at Function.registerWith (http://localhost:61456/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:738:71)
at Object.registerPlugins (http://localhost:61456/packages/fluttertestwebapp/generated_plugin_registrant.dart.lib.js:13:38)
at main$ (http://localhost:61456/web_entrypoint.dart.lib.js:15:35)
at main$.next ()
at runBody (http://localhost:61456/dart_sdk.js:43130:34)
at Object._async [as async] (http://localhost:61456/dart_sdk.js:43158:7)
at main$ (http://localhost:61456/web_entrypoint.dart.lib.js:14:18)
at :1:8
at Object.runMain (http://localhost:61456/dwds/src/injected/client.js:8343:15)
at http://localhost:61456/dwds/src/injected/client.js:22338:19
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:61456/dwds/src/injected/client.js:3636:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:61456/dwds/src/injected/client.js:10851:12)
at Object._asyncStartSync (http://localhost:61456/dwds/src/injected/client.js:3600:20)
at main__closure1.$call$body$main__closure (http://localhost:61456/dwds/src/injected/client.js:22350:16)
at main__closure1.call$1 (http://localhost:61456/dwds/src/injected/client.js:22282:19)
at StaticClosure._rootRunUnary [as call$2$5] (http://localhost:61456/dwds/src/injected/client.js:3958:16)
at _CustomZone.runUnary$2$2 (http://localhost:61456/dwds/src/injected/client.js:12167:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:61456/dwds/src/injected/client.js:12095:14)
at _ControllerSubscription._sendData$1 (http://localhost:61456/dwds/src/injected/client.js:11645:19)
at _DelayedData.perform$1 (http://localhost:61456/dwds/src/injected/client.js:11799:59)
at _PendingEvents_schedule_closure.call$0 (http://localhost:61456/dwds/src/injected/client.js:11848:14)
at Object._microtaskLoop (http://localhost:61456/dwds/src/injected/client.js:3801:21)
at StaticClosure._startMicrotaskLoop (http://localhost:61456/dwds/src/injected/client.js:3807:11)
at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (http://localhost:61456/dwds/src/injected/client.js:10723:9)
at invokeClosure (http://localhost:61456/dwds/src/injected/client.js:1172:26)
at MutationObserver. (http://localhost:61456/dwds/src/injected/client.js:1191:18)``
My pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
cloud_firestore:
dev_dependencies:
flutter_test:
sdk: flutter
The text was updated successfully, but these errors were encountered: