Problem with a cordova-firebase-plugin

when my application is in foreground and receives a notification from firebase it closes with the following error: “Unfortuntely your app has stopped”. Anyone can tell me why this happens and how to handle notifications when my application is in foreground. I would be very grateful to those who gave me an answer. Thank you.