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

Issue 727023 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

browserAction.setPopup + webRequest.onErrorOccurred = BUG

Reported by ilyaigpe...@gmail.com, May 27 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. Install extension.
2. On chrome://extensions open background page of the extension.
3. Open http://no-such-page-foo.com (as a page that produces error).
4. Click browserAction icon and see non-default test page.
5. Check background page logs to see it did install popup.
6. Hit F5 or reload page by other way.
7. Click browserAction icon and see default popup.
8. Check background page logs to see it did try to install popup.

What is the expected behavior?
After reloading a page with error setPopup invoked on error MUST set non-default popup.

What went wrong?
After reloading a page with error setPopup invoked on error didn't work and default popup is opened after clicking the extension icon.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 58.0.3029.110  Channel: stable
OS Version: 10.0
Flash Version: 

If you replace `webRequest.onErrorOccurred` with `webNavigation.onErrorOccurred` then you will get rid of the bug.

I guess `<all_urls>` filter doesn't work for a refreshed internal error page for some reason.
 
set-popup-on-error.zip
1.3 KB Download
Components: Platform>Extensions
Labels: Needs-Triage-M58
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
ilyaigpetrov@Thanks for the issue.

Tested the issue on windows 7 using chrome version 58.0.3029.110 with the steps from comment #0.
Could you please find the attached screen cast and confirm if anything missed here.
After reloading the page the the browserAction icon should display as "I'm the Non default pop up".Is this the expected behaviour.
Please confirm to triage the issue further.

Thanks,
727023.mp4
1.6 MB View Download
Hi, kavvaru@.

> After reloading the page the the browserAction icon should display as "I'm the Non default pop up". Is this the expected behaviour.

After reloading popup MUST contain message "Welcome to the TEST!" -- it is the non-default popup. This message is also seen before reload.
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 5 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kavvaru@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: kkaluri@chromium.org
Labels: OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Windows 10, Ubuntu 14.04 and Mac 10.12.5 with chrome Stable #59.0.3071.86, Canary #61.0.3123.0 and also in earlier version M45-#45.0.2454.101, hence marking it as untriaged.

These are the steps followed.

1. Install extension.
2. On chrome://extensions open background page of the extension.
3. Open http://no-such-page-foo.com (as a page that produces error).
4. Click browserAction icon and Observed the "Welcome to the TEST" pop up
5. Hit F5 or reload page by other way.
6. Click browserAction icon and observed the default popup.

Attaching the screen-cast for reference.

Note:
-----
Builds are less than M45 are crashing while launching chrome.
727023.mp4
583 KB View Download
Owner: rdevlin....@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Devlin for browserAction interaction.
Status: WontFix (was: Assigned)
I finally had a moment to sit down and take a look at this.  The TL;DR is that I don't think there's really a bug here, but there is some non-determinism.

What's happening is that the webRequest onErrorOccurred event can fire either before or after the tab finishes its navigation (since it happens as the network requests are being made, rather than being based on the outcome of a navigation).  We also clear tab-specific values for page and browser actions when the tab navigates.  What this means is that the two following flows are possible:

- clear tab-specific values for action popups
- receive webRequest.onErrorOccurred, call browserAction.setPopup

or the inverse:

- receive webRequest.onErrorOccurred, call browserAction.setPopup
- clear tab-specific values for action popups

It appears that, funnily enough, whether the commit is a reload or a fresh navigation can influence the ordering here (since there are no guarantees).

I don't think we want to spec out the relationship between a webRequest error in the main frame being dispatched and when we clear the tab values for a specific tab, and I don't think there should be any strong guarantees between the two APIs.  If we *were* to change something, we could hypothetically clear the values for the tab when navigation begins, but that can fail in certain cases as well (like a navigation abort).

I think for this use case, the right thing to do is to use the webNavigation API, which is a little more deterministic with respect to tabs (and, as the reporter pointed out, works properly in this case).  webRequest monitors network requests, but is somewhat independent from tab loading.

Sign in to add a comment