Skip to content
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

FCM: notification gets to the device, getting warning messaging_notification_received with no listeners registered. #209

Closed
DavideValdo opened this issue Jun 26, 2017 · 7 comments

Comments

@DavideValdo
Copy link

DavideValdo commented Jun 26, 2017

Testing out FCM from the Notifications panel in Firebase.
Notification is delivered to my iPhone, but all I'm getting is that warning.

This logs the message object correctly:

    firebase.messaging().onMessage((message) => {
      console.debug(message);
    })

Any hints?

react-native-cli: 2.0.1
react-native: 0.45.1
yarn: v0.24.5
react-native-firebase: 2.0.0
XCode: 8.3.3
iOS 10.3.2

@havaliza
Copy link

What you mentioned makes sense with what I described in issue #204

@DavideValdo
Copy link
Author

Thank you.
I did try your workaround, but it seems like it's a different problem.
I now get an additional message in console from infoLog.js:

infoLog.js:17 Failed to symbolicate warning, "Sending `messaging_notification_received` with no listeners registered.": TypeError: Network request failed
    at XMLHttpRequest.xhr.onerror (fetch.js:441)
    at XMLHttpRequest.dispatchEvent (event-target.js:172)
    at XMLHttpRequest.setReadyState (XMLHttpRequest.js:546)
    at XMLHttpRequest.__didCompleteResponse (XMLHttpRequest.js:381)
    at XMLHttpRequest.js:485
    at RCTDeviceEventEmitter.emit (EventEmitter.js:181)
    at MessageQueue.__callFunction (MessageQueue.js:245)
    at MessageQueue.js:101
    at MessageQueue.__guard (MessageQueue.js:213)
    at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:100)

@DavideValdo
Copy link
Author

DavideValdo commented Jun 28, 2017

After a clean install, I can get the alert when app is in the background.
For Android, I was expecting to get the alert automatically when app is in the foreground as well.
Is not showing the alert expected behavior?

@Ehesp
Copy link
Member

Ehesp commented Jun 28, 2017

@DavideValdo the notification wont show when the app is open, which is intended. Currently there's a work around in place by putting show_in_foreground: true in the payload.

@DavideValdo
Copy link
Author

DavideValdo commented Jul 1, 2017

Current status:

  1. Local notifications with show_in_foreground work only on Android, on iOS i still get 'messaging_notification_received' with no listeners registered warning, even if the app is in background. *Anybody had better luck with this?
  2. Remote notifications working with app in background both iOS and Android, but show_in_foreground is just ignored on both platforms when testing via cURL

@DavideValdo
Copy link
Author

Seems like a different issue anyway, closing this and opened #223

@Harryki
Copy link

Harryki commented Oct 20, 2017

i have not known this issue here, my mystery has been solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants