Issue metadata
Sign in to add a comment
|
Custom tabs not able to open Firebase push notification (FCM) and blocks Chrome from opening as well
Reported by
kelvincs...@gmail.com,
Jun 9 2017
|
||||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: 1. Open a web page that is set up to receive FCM (firebase) messages/notifications 2. Push a notification through Firebase messaging API (or Firebase console) 3. Tap on the resulting push notification on the phone 4. Observe that neither the custom tab or Chrome browser opens the URL specified in the FCM click_action. What is the expected behavior? I expect that tapping on the firebase push notification will launch the website in a custom tab or Chrome browser. In the past, tapping on a Firebase push notification/message (FCM) would open Chrome with the URL specified in the click_action attribute. What went wrong? It seems custom tabs does not open when the user taps on a Firebase push notification. Chrome does not open either. Custom tabs does not support opening the URL in the FCM click_action attribute, but also might be blocking Chrome from opening as well. Did this work before? Yes 58 Chrome version: 58.0.3029.83 Channel: n/a OS Version: OS X 7.1.2 Flash Version: Shockwave Flash 25.0 r0
,
Jun 9 2017
,
Jun 30 2017
Matt, any idea?
,
Jun 30 2017
,
Jul 5 2017
Could you provide a code example of what you are sending to the FCM API? Sadly the behavior will change depending on API call so would be extremely helpful.
,
Jul 5 2017
Hi Matt. Here is how I'm making the call to the FCM API.
var firebaseAdmin = require('firebase-admin');
firebaseAdmin.messaging().sendToTopic(topic, payload).then(function(response) {
console.log("Successfully sent message:", response);
resolve(response);
}).catch(function(error) {
console.log("Error sending message:", error);
reject(error);
});
,
Jul 5 2017
Could you provide an example payload?
,
Jul 5 2017
Hi Matt. I am using strings for the notification in my payload.
var topic = 'my fun topic';
var payload = {
notification: {
title: 'my fun title',
body: 'my sample body',
click_action: 'https://my-example-site.appspot.com/pages/my-page'
}
};
,
Jul 6 2017
What I think is happening: If you use the quickstart demo it's a little easier to see the behavior: https://github.com/firebase/quickstart-js/tree/master/messaging Steps to repro: 1. Get the demo working form quickstart-js 2. Open a custom tab 3. Using DevTools / Chrome://inspect, get the demo working on your phone 4. Send a notification with a click_action payload (The demo cURL command on the quickstart-js repo will do) 5. Hit home button on android device 6. Click on the notification 7. Notice nothing happens 8. Open tab and notice a message is received What is happening is the logic in the messaging SDK is looking for open clients and focusing them. In the custom tab case, this is focusing the current tab, but it's not bring the app to the foreground on the device. If you repeat the above steps but kill the app before clicking the notification, chrome is opened as you'd expect.
,
Mar 12 2018
kelvincswatson@ -- Could you please update your Chrome to latest Stable #65.0.3325.109 and let us know you observations. Also, please revert to the Comment #9. Thanks!
,
Apr 11 2018
No feedback was received in the last 30 days from the reporter, so archiving this issue. Please re-open or file a new bug if necessary. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kelvincs...@gmail.com
, Jun 9 2017