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

Issue 631457 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

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.
 
Cc: durga.behera@chromium.org
Labels: M-54 Needs-Feedback
abiosant@ : Thanks for the report.I have tried the issue following the below steps on Mac 10.11.5 and Stable 54.0.2809.0.

Steps:
=====
1> Load the extension
2> Login using facebook account
3> followed few games
4> After some time got 1 notification and clicked on it(watch/go to page)
  4.1> When clicked on watch opened one tab, when clicked again opened another tab(same as previous tab).Similar observation when clicked on Go to page.
  4.2> The above steps performed on the same notification until the notification pop-up was vanished.
5> Another Notification came after some more time and observed same behavior as seen for 1st notification.

Could you please help understanding the issue further.
And waiting for the notifications takes much of our time, it would be better if you have any jsfiddle/sample url to replicate it in easier way.
Components: UI>Notifications

Comment 3 by peter@chromium.org, 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.

Comment 4 by abios...@gmail.com, 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.

Comment 5 by peter@chromium.org, 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?

Comment 6 by abios...@gmail.com, 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."
Project Member

Comment 7 by sheriffbot@chromium.org, Aug 5 2016

Labels: -Needs-Feedback Needs-Review
Owner: durga.behera@chromium.org
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
Labels: -Needs-Review Needs-Feedback
Owner: ----
abiosant@ : Could you please update further based on comment # 5 & 6 to further triage it.
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 8 2017

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