New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 731471 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



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 description

Steps 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
 
Another possibility is that custom tabs is intercepting the FCM but not opening, and causing Chrome to not open either.
Components: -Blink Blink>PushAPI

Comment 3 by peter@chromium.org, Jun 30 2017

Owner: mattgaunt@chromium.org
Matt, any idea?

Comment 4 by peter@chromium.org, Jun 30 2017

Components: -Blink>PushAPI UI>Notifications
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.
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);
});


Could you provide an example payload?
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'
  }
};
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.


Components: UI>Browser>Mobile>CustomTabs
Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback
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!
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 11 2018

Status: Archived (was: Unconfirmed)
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