Push notification icons cannot be customized if progressive app not running |
|||||||
Issue descriptionVersion: 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.
,
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.
,
May 10 2016
Your second observation is a known bug, covered by Issue 592188 / Issue 605917 .
,
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.)
,
May 11 2016
Since you observe this on localhost, does the failing case trigger a request to your server at all?
,
May 11 2016
That's correct, Chrome does not fetch the icon image from the server when the PWA is not running.
,
Jun 2 2016
,
Jun 22 2016
,
Jul 24 2017
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
,
Aug 30 2017
,
Aug 30
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 |
|||||||
Comment 1 by peter@chromium.org
, May 10 2016Owner: mvanouwe...@chromium.org
Status: Assigned (was: Untriaged)