Skip to content

[firebase_messaging] ios 14.0.1 functions are not triggered inside notification callback #3976

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

Closed
dhavalagile opened this issue Oct 28, 2020 · 9 comments · Fixed by #4012
Closed
Labels
plugin: messaging type: bug Something isn't working

Comments

@dhavalagile
Copy link

dhavalagile commented Oct 28, 2020

_fireBaseMessaging.configure(
onMessage: (Map<String, dynamic> message) {
print("onMessage :: $message");
},
onResume: (Map<String, dynamic> message) {
print("onResume :: $message");
},
onLaunch: (Map<String, dynamic> message) {
print("onLaunch :: $message");
},
);

Firebase Messaging callback not called. for ios 13 devices it working fine

@dhavalagile dhavalagile added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 28, 2020
@markusaksli-nc
Copy link
Contributor

markusaksli-nc commented Oct 29, 2020

Hi @dhavalagile
Can you please provide your flutter doctor -v and flutter pub deps -- --style=compact output?
Does the notification arrive but the callback doesn't work? Is your configure() called correctly?
Thank you

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 29, 2020
@dhavalagile
Copy link
Author

dhavalagile commented Oct 29, 2020

Hi @mraleph

Output for flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-IN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.48.0)
[✓] Connected device (4 available)

! Doctor found issues in 1 category.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 29, 2020
@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 29, 2020
@dhavalagile
Copy link
Author

dhavalagile commented Oct 30, 2020

Hi @mraleph

I had checked in detail notification comes when an app in the background or killed. and not callback received in flutter side configure callback for notification.

_fireBaseMessaging.configure(
onMessage: (Map<String, dynamic> message) {
print("onMessage :: $message");
},
onResume: (Map<String, dynamic> message) {
print("onResume :: $message");
},
onLaunch: (Map<String, dynamic> message) {
print("onLaunch :: $message");
},
);

I had used this dependency

firebase_messaging: any
firebase_auth: any

firebase_auth used for phone verification.
If I removed firebase_auth and remove phone verification it will working.

Please check the issues for channel communication in details.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 30, 2020
@markusaksli-nc
Copy link
Contributor

@dhavalagile Could you please provide your flutter pub deps -- --style=compact output?

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 30, 2020
@dhavalagile
Copy link
Author

@markusaksli-nc

Dart SDK 2.10.2
Flutter SDK 1.22.2
carbaby_customer 1.0.0+1

dependencies:

  • after_layout 1.0.7+2 [flutter]
  • barcode_scan 3.0.1 [protobuf flutter]
  • carousel_slider 2.2.1 [flutter]
  • connectivity 0.4.9+3 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web]
  • cupertino_icons 0.1.3
  • device_info 0.4.2+7 [flutter device_info_platform_interface]
  • dio 3.0.10 [http_parser path]
  • firebase_auth 0.18.2 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
  • firebase_core 0.5.1 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
  • firebase_crashlytics 0.2.1 [flutter stack_trace firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface]
  • firebase_messaging 7.0.0 [meta platform flutter firebase_core]
  • flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
  • flutter_datetime_picker 1.4.0 [flutter]
  • flutter_exif_rotation 0.2.7 [flutter]
  • flutter_facebook_login 3.0.0 [flutter collection]
  • flutter_linkify 3.1.3 [flutter linkify]
  • flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math]
  • flutter_plugin_android_lifecycle 1.0.9 [flutter]
  • flutter_slidable 0.5.7 [flutter]
  • flutter_spinkit 4.1.2+1 [flutter]
  • geolocator 5.3.2+2 [flutter meta equatable google_api_availability location_permissions vector_math]
  • google_maps_flutter 0.5.30 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
  • google_places_picker 2.1.0+2 [flutter]
  • image 2.1.12 [archive xml]
  • image_picker 0.6.7+6 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
  • intl 0.16.1 [path]
  • overlay_support 1.0.5 [flutter async]
  • package_info 0.4.3 [flutter]
  • path_provider 1.6.14 [flutter path_provider_platform_interface path_provider_macos path_provider_linux]
  • permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface]
  • photo_view 0.5.0 [flutter]
  • provider 4.3.2+2 [flutter nested collection]
  • qr_flutter 3.2.0 [flutter qr]
  • rxdart 0.24.1
  • share 0.6.5+2 [meta mime flutter]
  • shared_preferences 0.5.10 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web]
  • sign_in_with_apple 2.5.4 [meta flutter]
  • tuple 1.0.3 [quiver]
  • url_launcher 5.7.6 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows]
  • webview_flutter 1.0.5 [flutter]

dev dependencies:

  • 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]

transitive dependencies:

  • archive 2.0.13 [crypto args path]
  • args 1.6.0
  • async 2.5.0-nullsafety.1 [collection]
  • boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
  • characters 1.1.0-nullsafety.3
  • charcode 1.2.0-nullsafety.1
  • clock 1.1.0-nullsafety.1
  • collection 1.15.0-nullsafety.3
  • connectivity_for_web 0.3.1+2 [connectivity_platform_interface flutter_web_plugins flutter]
  • connectivity_macos 0.1.0+4 [flutter]
  • connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface]
  • convert 2.1.1 [charcode typed_data]
  • crypto 2.1.4 [collection convert typed_data]
  • device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface]
  • equatable 1.2.5 [collection meta]
  • fake_async 1.2.0-nullsafety.1 [clock collection]
  • file 5.2.1 [intl meta path]
  • firebase 7.3.0 [http http_parser js]
  • firebase_auth_platform_interface 2.1.2 [flutter meta firebase_core plugin_platform_interface]
  • firebase_auth_web 0.3.1+2 [flutter flutter_web_plugins firebase meta http_parser intl firebase_core firebase_auth_platform_interface js]
  • firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
  • firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js]
  • firebase_crashlytics_platform_interface 1.1.0 [flutter meta collection firebase_core plugin_platform_interface]
  • fixnum 0.10.11
  • flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
  • google_api_availability 2.0.4 [flutter]
  • google_maps_flutter_platform_interface 1.0.4 [flutter meta plugin_platform_interface stream_transform]
  • http 0.12.2 [http_parser path pedantic]
  • http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
  • image_picker_platform_interface 1.1.0 [flutter meta http plugin_platform_interface]
  • js 0.6.2
  • linkify 2.1.0
  • location_permissions 3.0.0+1 [flutter meta]
  • matcher 0.12.10-nullsafety.1 [stack_trace]
  • meta 1.3.0-nullsafety.3
  • mime 0.9.7
  • nested 0.0.4 [flutter]
  • path 1.8.0-nullsafety.1
  • path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
  • path_provider_macos 0.0.4+3 [flutter]
  • path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface]
  • pedantic 1.9.0
  • permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
  • petitparser 2.4.0 [meta]
  • platform 2.2.1
  • plugin_platform_interface 1.0.2 [meta]
  • process 3.0.13 [file intl meta path platform]
  • protobuf 1.0.1 [fixnum]
  • qr 1.3.0 [meta]
  • quiver 2.1.3 [matcher meta]
  • shared_preferences_linux 0.0.2+2 [file flutter meta path path_provider_linux shared_preferences_platform_interface]
  • shared_preferences_macos 0.0.1+10 [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]
  • sky_engine 0.0.99
  • 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]
  • typed_data 1.3.0-nullsafety.3 [collection]
  • url_launcher_linux 0.0.1+3 [flutter]
  • url_launcher_macos 0.0.1+8 [flutter]
  • url_launcher_platform_interface 1.0.8 [flutter meta plugin_platform_interface]
  • url_launcher_web 0.1.4+1 [url_launcher_platform_interface flutter flutter_web_plugins meta]
  • url_launcher_windows 0.0.1+1 [flutter]
  • vector_math 2.1.0-nullsafety.3
  • xdg_directories 0.1.0 [path process flutter]
  • xml 3.6.1 [collection convert meta petitparser]

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 30, 2020
@markusaksli-nc
Copy link
Contributor

@dhavalagile Is it possible for you to provide a minimal complete reproducible code sample to demonstrate this issue?

As I understand the problems go away when removing firebase_auth?

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 30, 2020
@dhavalagile
Copy link
Author

@markusaksli-nc
yes problems go away when removing firebase_auth.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 30, 2020
@markusaksli-nc markusaksli-nc added plugin: messaging and removed Needs Attention This issue needs maintainer attention. labels Oct 30, 2020
@fromlabs
Copy link

Same as @markusaksli-nc , callbacks are triggered only when removing firebase_auth.

@dhavalagile
Copy link
Author

Hi @fromlabs ,

Have you identify why this unwanted behaviour happens. firebase_auth and messaging is most useful plugins for app development.

@firebase firebase locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: messaging type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants