cordova-plugin-firebasex icon indicating copy to clipboard operation
cordova-plugin-firebasex copied to clipboard

onMessageReceived() not called when notification tapped and app is completed closed

Open nvahalik opened this issue 3 years ago • 6 comments

Bug report

CHECKLIST

  • [x] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.

I cannot find any references to handling of onMessageReceived() when the app is closed.

  • [x] I have checked that no similar issues (open or closed) already exist.

Note: https://github.com/dpa99c/cordova-plugin-firebasex/issues/607 was closed due to being stale.

Current behavior:

  1. Close out of the application complete on an iOS device.
  2. Receive a push notification which contains an actionable payload.
  3. Tap on push notification.
  4. onMessageReceived() is not called.

Expected behavior:

I expect onMessageReceived() to be called.

Steps to reproduce:

See above.

Screenshots

Environment information

  • Cordova CLI version
  • Cordova platform version
    • iOS 5.1.1
  • Plugins & versions installed in project (including this plugin)
branch-cordova-sdk 4.2.0 "branch-cordova-sdk"
cordova-clipboard 1.3.0 "Clipboard"
cordova-ios-plugin-no-export-compliance 0.0.5 "iOS No Export Compliance"
cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-camera 4.2.0-dev "Camera"
cordova-plugin-camera-preview 0.10.0 "cordova-plugin-camera-preview"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-firebasex 10.2.0 "Google Firebase Plugin"
cordova-plugin-health 1.1.5 "Cordova Health"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.5.3 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.3 "LocalNotification"
cordova-plugin-media-capture 3.0.3 "Capture"
cordova-plugin-nativeaudio 3.1.1 "Cordova Native Audio"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-purchase 10.3.0 "Purchase"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-telerik-imagepicker 2.3.3 "ImagePicker"
cordova-plugin-vibration 3.1.1 "Vibration"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 6.0.3 "SocialSharing"
cordova-sqlite-storage 4.0.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"
  • Dev machine OS and version, e.g.
    • OSX - Intel Mac mini on Big Sur (but we use Ionic for builds).

Runtime issue

  • Device details
    • iPhone 12 (iOS 14.6).

Related code:

N/A

Console output

console output

// Paste any relevant JS/native console output here



Other information:

None that I am aware of.

nvahalik avatar Jun 09 '21 15:06 nvahalik

faced similar issue, i guess your problem is related with the co-installation with cordova-plugin-local-notification Remove the plugin and try again.

If you confirm that this solved your issue, please report here.

mreis1 avatar Jun 23 '21 16:06 mreis1

@nvahalik Have you tried my suggestion ?

mreis1 avatar Jul 06 '21 14:07 mreis1

@mreis1 No, I haven't had the time to try it.

nvahalik avatar Jul 06 '21 14:07 nvahalik

@nvahalik please could you try the suggestion? i'm working on a similar project and i want it to work fine early =)

carpiodanielj avatar Sep 15 '21 23:09 carpiodanielj

I've the same issue. I don't use cordova-plugin-local-notification.

cyrilfr avatar Nov 04 '21 13:11 cyrilfr

Facing the same issue. We dont use "cordova-plugin-local-notification". The callback is called when app is in background or foreground. But it is not called when app is killed. When the user taps the notification when the app is killed, the app relaunches. However, the callback is never called. Possibly because it has not been initialised yet, there should be a way to get all pending taps.

theavijitsarkar avatar Oct 03 '23 11:10 theavijitsarkar