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

Issue 610710 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Push notification icons cannot be customized if progressive app not running

Project Member Reported by stillers@google.com, May 10 2016

Issue description

Version: Chrome/50.0.2661.89
OS: Android

What steps will reproduce the problem?

(1) Install a progressive web app that supports push notifications with custom icons.
(2) "Close" the app. (So that it does not appear in the list of recent screens.)
(3) Send a push notification to the app.

What is the expected output?

Custom notification icon appears.

What do you see instead?

Default (grey) notification icon.

Note that if the app is not closed, the custom notification icon appears.

In the attached screenshot, the only difference between the two notifications is that the app was closed between the 2:39 and the 2:40 notifications.
 
screenshot1.png
82.7 KB View Download

Comment 1 by peter@chromium.org, May 10 2016

Cc: dominickn@chromium.org
Owner: mvanouwe...@chromium.org
Status: Assigned (was: Untriaged)
With (1), you mean Add to Homescreen, right?

Comment 2 by stillers@google.com, May 10 2016

Yes, install via "Add to Home screen" menu item.

Some other observations:

*  Chrome does not attempt to fetch the image when the progressive app is not running. (That is, it's not a case of Chrome fetching it, but not displaying it--for some reason it never tries to fetch it.)

* The service worker is not attempting to intercept the fetch event--the image request is a standard network request.

Comment 3 by peter@chromium.org, May 10 2016

Labels: -Pri-3 allpublic Pri-2
Your second observation is a known bug, covered by Issue 592188 /  Issue 605917 .

Comment 4 by stillers@google.com, May 11 2016

I think there might be a difference between specifying the icon by relative and absolute URL.

This seems to work always work:

self.registration.showNotification("test", {
  body: "something",
  icon: "http://localhost:8080/icon.jpg"
});

This does not (if the PWA is not "running"):

self.registration.showNotification("test", {
  body: "something",
  icon: "/icon.jpg"
});

(However, at least in my testing it seems necessary to completely clear Chrome's cache (at the OS level) between the two states to demonstrate this difference--simply changing the service worker code is not necessarily sufficient.)

Comment 5 by peter@chromium.org, May 11 2016

Since you observe this on localhost, does the failing case trigger a request to your server at all?

Comment 6 by stillers@google.com, May 11 2016

That's correct, Chrome does not fetch the icon image from the server when the PWA is not running.
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 9 by sheriffbot@chromium.org, Jul 24 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Project Member

Comment 11 by sheriffbot@chromium.org, Aug 30

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment