mo-ah-dawood / fcm_config

10 stars 12 forks source link

don't user web i need use fcm config web #2

Closed s2yed closed 3 years ago

s2yed commented 3 years ago

e https://dart.dev/null-safety/unsound-null-safety Debug service listening on ws://127.0.0.1:59217/07rtsbZ5dSc=/ws TypeError: Cannot read property 'messaging' of undefined at new firebase_messaging_web.FirebaseMessagingWeb.new (http://localhost:59120/packages/firebase_messaging_web/firebase_messaging_web.dart.lib.js:189:41) at Function.registerWith (http://localhost:59120/packages/firebase_messaging_web/firebase_messaging_web.dart.lib.js:56:73) at Object.registerPlugins (http://localhost:59120/packages/wafeer/generated_plugin_registrant.dart.lib.js:33:49) at main (http://localhost:59120/web_entrypoint.dart.lib.js:44:35)

mo-ah-dawood commented 3 years ago

I added the web to example you can follow it web has some config in index.html and sw file must be exits

s2yed commented 3 years ago

Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling] E/flutter (28064): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: Cannot add new events while doing an addStream E/flutter (28064): #0 _BroadcastStreamController.addStream (dart:async/broadcast_stream_controller.dart:276:24) E/flutter (28064): #1 Stream.pipe (dart:async/stream.dart:698:27) E/flutter (28064): #2 FirebaseMessaging._onMessageController. (package:firebase_messaging/src/messaging.dart:60:21) E/flutter (28064): #3 _runGuarded (dart:async/stream_controller.dart:773:24) E/flutter (28064): #4 _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:207:7) E/flutter (28064): #5 _ControllerStream._createSubscription (dart:async/stream_controller.dart:786:19) E/flutter (28064): #6 _StreamImpl.listen (dart:async/stream_impl.dart:473:9) E/flutter (28064): #7 LocaleNotification.init (package:fcm_config/src/locale_notifications.dart:50:51) E/flutter (28064):