Useful or not, from you.
react-native-firebase The event "firebase.messaging().onMessage" is not called on a real device

Issue

In the background the notification arrives correctly, but if you have the application open and you are using a real device, the event "firebase.messaging().OnMessage" is not called

firebase.messaging().onMessage(() => {
	alert('Notification received!');
});

Environment

  1. Application Target Platform: Both

  2. Development Operating System: macOS Sierra

  3. React Native version: 0.56.0

  4. React Native Firebase version: 4.3.8

  5. Firebase Module: Cloud messaging

That's a useful answer
Without any help

I'm using the web (NOT React Native)

version 7.3.0 Chrome 78

The callback I register to firebase.messaging().onMessage isn't called when tab in the foreground.

I tried to send a notification message and data message (neither work)

(I can confirm that setBackgroundMessageHandler does work) (I can also confirm that when sending notification message and the tab is in the bg, it pops up)

Any idea? I need to handle the case when i receive a message and the tab is in the foreground.