Closed markszenteTB closed 3 years ago
It seems you found the origin of the bug I mention at #4097.
@markszenteTB
Thanks for identifying the root-cause of the issue and the impact on firebase_messaging
. Could you file a new issue specific to firebase_auth
and how didReceiveRemoteNotification
being handled in auth files is causing the issue you mentioned above ?
We can then link this and https://github.com/FirebaseExtended/flutterfire/issues/4097 issues to it for better tracking.
Hey @markszenteTB. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@markszenteTB if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Hello, This is still a bug, I have submitted a new issue for Firebase_Auth as suggested
@diegogarciar I agree this is a pretty big issue. What is the issue you created in Firebase_Auth, just to make it easier to track?
It was referenced in this thread, is this one #4412
Bug report
Describe the bug
I have experienced a two issues on iOS.
onMessage
does not get called whencontentAvailable
is set totrue
(using Firebase Functions), even when the app is in foreground.onBackgroundMessage
does not get called, ever. No matter if it's a notification, notification + data or merely data, whethercontentAvailable
istrue
orfalse
, it just doesn't. The notification appears correctly (when it's not data only), but the callback is not called.In both cases, method calls are not being called through the platform channel.
Update: having taken a deeper look at
FLTFirebaseMessagingPlugin.m
, I think it's thedidReceiveRemoteNotification
that's at fault here, for some reason not yet obvious to me. While debugging the Runner through Xcode, the following warning is displayed when receiving a notification withcontentAvailable
:Update number 2: Okay, some progress. I am now certain this is not a bug with _firebasemessaging (sorry, false alarm). Rather, it is caused by _firebaseauth. That package, for some reason, also handles
didReceiveRemoteNotification
in multiple files, such as inFIRAuth.m
andFLTFirebaseAuthPlugin.m
. While debugging, I deleted the method from those files, and voilà, the callbacks work as intended. However, it is far from being a fix in itself, but it may help someone more familiar with _firebaseauth resolve this issue.Expected behavior
The callbacks should get called.
Additional context
Here's an excerpt from my
info.plist
:Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` [✓] Flutter (Channel stable, 1.22.4, on macOS 11.0 20A2411 darwin-arm, locale en-HU) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location. You may also want to add it to your PATH environment variable. [✓] Xcode - develop for iOS and macOS (Xcode 12.2) [!] Android Studio (not installed) [✓] Connected device (1 available) ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` dependencies: - age 0.0.1 [flutter meta] - cloud_firestore 0.14.4 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web] - cloud_functions 0.7.2 [meta flutter firebase_core firebase_core_platform_interface cloud_functions_platform_interface cloud_functions_web] - cupertino_icons 1.0.0 - device_info 1.0.0 [flutter device_info_platform_interface] - firebase_analytics 6.3.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_auth 0.18.4 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.5.3 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_messaging 8.0.0-dev.11 [meta flutter firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web] - firebase_storage 5.2.0 [flutter firebase_core firebase_core_platform_interface firebase_storage_web firebase_storage_platform_interface quiver] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_app_badger 1.1.2 [flutter] - flutter_bloc 6.1.1 [flutter bloc provider] - flutter_easyloading 2.2.1 [flutter flutter_spinkit] - flutter_icons 1.1.0 [flutter] - flutter_linkify 4.0.2 [flutter linkify] - flutter_rating_bar 3.2.0+1 [flutter] - flutter_redux 0.6.0 [meta redux flutter] - flutter_statusbarcolor 0.2.3 [flutter] - flutter_xlider 3.4.0 [flutter] - fontisto_flutter 3.1.2 [flutter] - google_fonts 1.1.1 [flutter http path_provider crypto pedantic] - image_picker 0.6.7+14 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - json_annotation 3.1.1 - lottie 0.6.0 [flutter archive characters charcode collection logging meta path vector_math] - modal_bottom_sheet 1.0.1-dev [flutter] - package_info 0.4.3+2 [flutter] - photo_view 0.10.3 [flutter] - provider 4.3.2+2 [flutter nested collection] - scrollable_positioned_list 0.1.8 [flutter meta] - shared_preferences 0.5.12+4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows] - url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] dev dependencies: - build_runner 1.10.7 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] - json_serializable 3.5.1 [analyzer build build_config json_annotation meta path source_gen] transitive dependencies: - _fe_analyzer_shared 14.0.0 [meta] - analyzer 0.41.1 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.5.0-nullsafety.1 [collection] - bloc 6.1.0 [meta] - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner] - build 1.5.2 [analyzer async convert crypto logging meta path glob] - build_config 0.4.4 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.4 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 1.4.4 [analyzer build crypto graphs logging meta path package_config pool pub_semver] - build_runner_core 6.1.2 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pedantic pool timing watcher yaml] - built_collection 4.3.2 [collection quiver] - built_value 7.1.0 [built_collection collection fixnum quiver] - characters 1.1.0-nullsafety.3 - charcode 1.2.0-nullsafety.1 - checked_yaml 1.0.2 [json_annotation source_span yaml] - cli_util 0.2.0 [path] - clock 1.1.0-nullsafety.1 - cloud_firestore_platform_interface 2.2.1 [flutter meta collection firebase_core plugin_platform_interface] - cloud_firestore_web 0.2.1+2 [flutter flutter_web_plugins http_parser meta firebase_core firebase_core_web cloud_firestore_platform_interface js] - cloud_functions_platform_interface 3.0.3 [flutter meta firebase_core plugin_platform_interface] - cloud_functions_web 3.1.1 [firebase_core firebase_core_web cloud_functions_platform_interface flutter flutter_web_plugins http_parser meta js] - code_builder 3.5.0 [built_collection built_value collection matcher meta] - collection 1.15.0-nullsafety.3 - convert 2.1.1 [charcode typed_data] - crypto 2.1.5 [collection convert typed_data] - dart_style 1.3.10 [analyzer args path source_span] - device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - fake_async 1.2.0-nullsafety.1 [clock collection] - ffi 0.1.3 - file 5.2.1 [intl meta path] - firebase 7.3.3 [http http_parser js] - firebase_analytics_platform_interface 1.0.3 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_auth_platform_interface 2.1.4 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.2+2 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js] - firebase_core_platform_interface 2.1.0 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+1 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - firebase_messaging_platform_interface 1.0.0-dev.7 [flutter meta firebase_core plugin_platform_interface] - firebase_messaging_web 0.1.0-dev.2 [flutter flutter_web_plugins meta firebase_core firebase_core_web firebase_messaging_platform_interface js service_worker] - firebase_storage_platform_interface 1.0.2 [flutter meta collection firebase_core plugin_platform_interface] - firebase_storage_web 0.1.1+1 [async crypto firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 0.10.11 - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_spinkit 4.1.2+1 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math] - glob 1.2.0 [async collection node_io path pedantic string_scanner] - graphs 0.2.0 - http 0.12.2 [http_parser path pedantic] - http_multi_server 2.2.0 [async] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image_picker_platform_interface 1.1.1 [flutter meta http plugin_platform_interface] - intl 0.16.1 [path] - io 0.3.4 [charcode meta path string_scanner] - js 0.6.2 - linkify 3.0.0 - logging 0.11.4 - matcher 0.12.10-nullsafety.1 [stack_trace] - meta 1.3.0-nullsafety.3 - mime 0.9.7 - nested 0.0.4 [flutter] - node_interop 1.2.1 [js] - node_io 1.2.0 [file node_interop path] - package_config 1.9.3 [path charcode] - path 1.8.0-nullsafety.1 - path_provider 1.6.24 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+6 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.2 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.3 [meta] - pool 1.4.0 [async stack_trace] - process 3.0.13 [file intl meta path platform] - pub_semver 1.4.4 [collection] - pubspec_parse 0.1.5 [checked_yaml json_annotation pub_semver yaml] - quiver 2.1.5 [matcher meta] - redux 4.0.0+3 - service_worker 0.2.4 [js] - shared_preferences_linux 0.0.2+4 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 0.0.1+11 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shared_preferences_windows 0.0.1+3 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows] - shelf 0.7.9 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel] - sky_engine 0.0.99 - source_gen 0.9.9 [analyzer async build dart_style glob meta path pedantic source_span] - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph] - stack_trace 1.10.0-nullsafety.1 [path] - stream_channel 2.1.0-nullsafety.1 [async] - stream_transform 1.2.0 - string_scanner 1.1.0-nullsafety.1 [charcode source_span] - term_glyph 1.2.0-nullsafety.1 - test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - timing 0.1.1+2 [json_annotation] - typed_data 1.3.0-nullsafety.3 [collection] - url_launcher_linux 0.0.1+4 [flutter] - url_launcher_macos 0.0.1+9 [flutter] - url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.5+1 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+3 [flutter] - vector_math 2.1.0-nullsafety.3 - watcher 0.9.7+15 [async path pedantic] - web_socket_channel 1.1.0 [async crypto stream_channel] - win32 1.7.4 [ffi] - xdg_directories 0.1.2 [meta path process] - yaml 2.2.1 [charcode collection string_scanner source_span] ```