firebase / flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

πŸ› [Firebase_messaging] INVALID_LED_DETAILS, Must specify both ledOnMs and ledOffMs to configure the blink cycle on older versions of Android before Oreo #7904

Closed Junama closed 2 years ago

Junama commented 2 years ago

When a notification arrives while the app is open, this error appears

This happen when a user comment my post for example, and in flutter notifices me that error, but the info is comming properly. Exactly whe the info arrives, this error happen , and the notifitacion doesn't show.

Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { print("Handling a background message: ${message.messageId}"); }

--My code-- void main() async { WidgetsFlutterBinding.ensureInitialized();

await FCMConfig.instance.init(
defaultAndroidChannel: AndroidNotificationChannel( 'General', 'General', importance: Importance.high, playSound: true, ledColor: Colors.green, enableLights: true, sound: RawResourceAndroidNotificationSound('notification'),

),
  //onBackgroundMessage:_firebaseMessagingBackgroundHandler,
  alert: true,
  sound: true,
  provisional: true,

);

--dependencies-- description: A new Flutter application. publish_to: 'none' version: 1.2.9+43

environment: sdk: ">=2.7.0 <3.0.0"

dependencies: flutter: sdk: flutter

flutter_localizations: sdk: flutter

cupertino_icons: ^0.1.3 eva_icons_flutter: 3.0.0 rxdart: ^0.24.1 shared_preferences: ^2.0.5 font_awesome_flutter: ^8.8.1 http: ^0.13.1 fluttericon: ^1.0.7 screenshot: ^0.3.0 flutter_staggered_grid_view: ^0.3.0 flutter_swiper: ^1.1.6 flutter_inner_drawer: ^0.5.7+2 provider: ^4.3.1 fl_chart: ^0.20.1 flutter_map: ^0.14.0 geolocator: ^7.7.0 url_launcher: ^6.0.0 like_button: ^1.0.1 lottie: ^1.2.1 image_picker: ^0.7.4 grouped_list: ^3.3.0 percent_indicator: ^2.1.5 flutter_phoenix: ^0.1.0

permission_handler: ^5.0.1+1

status_alert: animate_do: ^1.7.2 mapbox_search: ^2.1.0+1 cached_network_image: ^2.4.1

mapbox_search:

git:

url: git@github.com:juampiq6/mapbox_search.git

ref: FixMissingAddressAttribute

flutter_typeahead: ^3.2.4 flutter_map_marker_cluster: ^0.4.0 fluster: ^1.1.0 flappy_search_bar: ^1.7.2 date_picker_timeline: ^1.2.3 flutter_masked_text: ^0.8.0 flutter_launcher_icons: ^0.9.2

uni_links: ^0.4.0 flutter_spinkit: ^4.1.2 device_calendar: git: url: https://github.com/builttoroam/device_calendar.git ref: develop firebase_core: ^1.10.0

1.0.4

firebase_crashlytics: ^0.4.0+1

firebase_crashlytics: ^2.0.1 pretty_qr_code: ^1.0.1 firebase_auth: ^3.1.3 firebase_messaging: ^11.1.0 firebase_analytics: ^8.1.2 google_sign_in: ^5.1.1 flutter_facebook_auth: ^3.5.3 sign_in_with_apple: ^2.5.2 crypto: ^3.0.1 credit_card_slider: ^1.0.1 share: ^2.0.4 path_provider: ^2.0.2 snapping_sheet: ^3.1.0 fcm_config: ^3.1.4 webview_flutter: ^2.1.1 easy_mask: ^1.1.5 figma_squircle: ^0.5.2 lazy_load_scrollview: ^1.3.0 latlong2: ^0.8.0 confetti: ^0.5.5

darshankawar commented 2 years ago

@Junama Can you provide your flutter doctor -v ? What Android device and OS are you using that shows this error ? Since the error message says older versionof Android before Oreo, can you try an Android device older than Oreo or latest one and see if you still get same error on it ?

Also, can you try the plugin example on the same device and see if you still get same error ?

Junama commented 2 years ago

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Versión 10.0.22000.434], locale es-AR) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Chrome - develop for the web [√] Android Studio (version 2020.3) [√] VS Code (version 1.63.2) [√] Connected device (3 available)

I using my phone, its a Motorola One Action, Android 11

darshankawar commented 2 years ago

Also, can you try the plugin example on the same device and see if you still get same error ?

@Junama

google-oss-bot commented 2 years ago

Hey @Junama. 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!

google-oss-bot commented 2 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@Junama 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.