Opening tabs from extension notifications stacks and incrementally opens more and more identical tabs
Reported by
abios...@gmail.com,
Jul 26 2016
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2808.0 Safari/537.36
Steps to reproduce the problem:
1. Navigate to the login tab & login
2. Follow some games (follow LoL, CS:GO and Dota 2 to generate the most notifications)
3. Wait for something to go live and click the notification
3.1 Click all notifications that pop up to see how they "stack" and open more and more identical tabs
What is the expected behavior?
Our extension sends out notifications to users when different esports events/content goes live. Each notification has links to the esports content in question and, if clicked, opens a new tab with that content.
What went wrong?
The issue that we are facing is that notifications seem to stack over time. As a user receives notifications over time and click them each newly clicked notification opens an incrementing number of tabs with the same content. As an example: the sixth time you click your way to an esports stream via one of our notifications six identical tabs with that information will open simultaneously, and seven tabs the seventh time you click a notification.
WebStore page: https://chrome.google.com/webstore/detail/abios-esports-match-ticke/opaikbihdaombgcfglhnmpjjpmjmglnm
Did this work before? Yes not sure about exact time line
Chrome version: 54.0.2808.0 Channel: canary
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
The issue present on all OS (Mac, Win & Ubuntu) and browser versions we have tested.
,
Jul 27 2016
,
Jul 27 2016
This most likely is an issue with your extension. I see that you have the following flow: 1) When receiving a message from GCM, parse the data, store |data.id| as the stringified notification Id. (background.js:178) 2) Create the notification passing in this |id|. (background.js:235) 3) Attach a listener for onButtonClicked events *for each shown notification*. (background.js:247) The number of log messages displayed (background.js:248) is going to grow linearly to the number of shown notifications because you keep attaching listeners. That's not great. My gut feel would be that the |data.id| value in your GCM message is set to the same value, which means that this listener gets the same |nid| every time, thus creating a number of new tabs depending on the number of received notifications as well.
,
Jul 27 2016
Hi, thanks for looking into the issue. The problem does not appear if you click the same notification multiple times (that will only open new tabs as expected) but rather when you click different notifications over time. That is when the number of tabs opened per click start to stack up. If you click new notification only once, you will see that for every new notification that you receive, additional identical tabs will open. See this example where I get 4 and then 5 notifications from only clicking the notification once (corresponding to the 4th and 5th time I click the notification) https://puu.sh/qgbP6/d2a15988d8.gif I don't think any jsfiddle/sample url will help in this case, but if you give me your facebook name I can push test notifications to your extension.
,
Jul 27 2016
Yes, that's why I suggested that you may be sending the notifications with the same |data.id| value. Because you attach a listener each time a notification is created, that would trigger exactly this behaviour. Could you verify that each notification you send has a unique value in its |data.id| payload?
,
Jul 27 2016
Hi sorry, didn't see your first answer. I will double check our IDs but the IDs/notifications we primarily send are for matches that go live (and of those have unique IDs) and when streamers go live (and their ID will be unique to them self but remain the same each time they go live) ..and we have the issue with both match and stream notifications. As far as we understand it from the documentation, if a notification has the same ID as a previous one, the previous is deleted in favour for the new one: "If it matches an existing notification, this method first clears that notification before proceeding with the create operation."
,
Aug 5 2016
Thank you for providing more feedback. Adding requester "durga.behera@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 8 2016
abiosant@ : Could you please update further based on comment # 5 & 6 to further triage it.
,
Aug 8 2017
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by durga.behera@chromium.org
, Jul 27 2016Labels: M-54 Needs-Feedback