Open
Description
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
As the title states, in our app (and seemingly in general), if we send several notifications with the same collapse ID (So that the notifications collapse to a single one in the notification centre), in Android this works as expected, the notifications collapse into one but if the app is in the foreground the onMessage listener gets triggered with every push notification.
On iOS however, only the first of these notifications triggers the listener. All subsequent notifications do generate a notification in the notification centre, but the listener does not get triggered anymore, unless the collapse ID is changed.
Reproducing the issue
- Create an app with Firebase_messaging support on any Apple device
- Have an instance of
firebaseMessenger.onMessage.listen()
that prints a message to the console - From your back-end, send an FCM push notification with a certain
"apns-collapse-id"
- It triggers the listener
- Send another notification with the same
"apns-collapse-id"
- The listener does not get triggered anymore
Firebase Core version
3.10.0
Flutter Version
3.24.0
Relevant Log Output
n/a
Flutter dependencies
Expand Flutter dependencies
snippet
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
path_provider: ^2.0.12
http: ^1.1.0
community_charts_flutter: ^1.0.1
shared_preferences: ^2.0.17
flutter_material_color_picker: ^1.1.0+2
# validate: ^1.7.0 # not very good package
firebase_core: ^3.10.0
firebase_analytics: ^11.4.1
firebase_messaging: ^15.2.1
image_picker: ^1.0.4
flutter_image_compress: 1.1.3
permission_handler: ^11.3.1
image: ^4.2.0
# exif: ^1.0.1
#transparent_image: ^1.0.0
#image_gallery_saver: ^1.1.0
url_launcher: ^6.3.0
intl: ^0.19.0
font_awesome_flutter: ^10.4.0
flutter_launcher_icons: ^0.13.1 # for flutter icon
dio: ^5.0.0
audioplayers: ^6.0.0
devicelocale: ^0.7.0
flutter_html: ^3.0.0-beta.2
encrypt: ^5.0.1
flutter_secure_storage: ^8.0.0 # TODO
package_info_plus: ^8.0.0
store_redirect: ^2.0.1
youtube_player_flutter: ^9.1.1
math_expressions: ^2.3.1
photo_view: ^0.14.0
fluttertoast: ^8.2.1 # TEST from 4.
flip_card: ^0.7.0
flutter_time_picker_spinner: ^2.0.0 # COPIED FROM FUNCTION
connectivity_plus: ^6.0.3
pull_to_refresh: ^2.0.0
spritewidget: ^2.0.1
vibration: ^1.7.6
flutter_svg: 2.0.7
qr_code_scanner: ^1.0.1
mobile_scanner: ^6.0.2
flutter_math_fork: ^0.7.1
# better_player: ^0.0.84
get: ^4.6.5
pie_chart: ^5.3.2
badges: ^3.0.2
# marquee: ^2.2.3
auto_size_text: ^3.0.0
video_player: ^2.5.2
flutter_sound: ^9.6.0
device_info_plus: ^9.0.3
mockito: ^5.3.2
provider: ^6.0.5
audio_session: ^0.1.13
cached_network_image: ^3.2.3
flutter_chat_ui: ^1.6.6
geolocator: ^11.0.0
usage_stats: ^1.2.0
pedometer: ^4.0.1
noise_meter: ^5.0.2
vibration_web: ^1.6.5
webview_flutter: ^3.0.4
flutter_blue_plus: ^1.33.5
flutter_inappwebview: ^6.1.4
flutter_inappwebview_ios: ^1.1.2
flutter_scatter: ^0.2.0
eraser: ^2.0.2
network_info_plus: ^6.0.1
internal_audio_recorder: ^0.1.6
Additional context and comments
No response
Activity
MichaelVerdon commentedon Jan 31, 2025
Hello there, I have not been able to reproduce your issue, the listener still works with further notifications sent with the same "apns-collapse-id" when it is clicked on. I can suggest upgrading your dependencies but otherwise an MRE would be helpful.
google-oss-bot commentedon Feb 11, 2025
Hey @kilobitter. 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!
frankmer commentedon Feb 19, 2025
I have the same problem only on iOS, but no notification triggers onMessage.
I am using the following versions:
This is the sended message:
On older versions it worked!
google-oss-bot commentedon Feb 28, 2025
Hey @kilobitter. 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!