Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shields not functional on private window until focus is changed #1437

Closed
srirambv opened this issue Oct 5, 2018 · 8 comments
Closed

Shields not functional on private window until focus is changed #1437

srirambv opened this issue Oct 5, 2018 · 8 comments

Comments

@srirambv
Copy link
Contributor

srirambv commented Oct 5, 2018

Description

Shields not functional on private window until focus is changed

Steps to Reproduce

  1. Install/upgrade 0.55.11
  2. Open a private tab and load a page
  3. Click shields button, doesn't work
  4. Switch focus to normal tab/other app and switch back to Private window, shields get enabled

Actual result:

https://youtu.be/FR0FaHis_7M

Expected result:

Shields should always work on Private window

Reproduces how often:

Easy

Brave version (chrome://version info)

Brave 0.55.11 Chromium: 70.0.3538.35 (Official Build) beta (64-bit)
Revision 28dcb499844fa40c28d5f62e337876cb936f79f5-refs/branch-heads/3538@{#678}
OS Linux

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? Yes issue on Dev/Beta
  • Does it reproduce on browser-laptop? N/A

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields?
  • Is the issue reproducible on the latest version of Chrome?

Additional Information

@srirambv srirambv added bug feature/shields The overall Shields feature in Brave. feature/private-browsing labels Oct 5, 2018
@srirambv srirambv added this to the Releasable builds 0.55.x milestone Oct 5, 2018
@simonhong
Copy link
Member

I'll take a look this issue next week. I recently worked on similar area.

@simonhong
Copy link
Member

simonhong commented Oct 11, 2018

After debugging, brave-extension didn't get window created callback when private window is created.
Because of this, data isn't properly initialized. It suspect that private window is initialized before brave-extension is initialized. When second private window is created, brave-extension gets window created callback properly. So, shields works normally.

@bbondy
Copy link
Member

bbondy commented Oct 12, 2018

Noticed this in the chrome extension API docs:

onStartup
Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode.

@bbondy
Copy link
Member

bbondy commented Oct 12, 2018

I don't think you can create a second window within the same incognito profile, so that is the exact event we need to fire for us in incognito. Or find another way. But at least that explains it.

@bbondy
Copy link
Member

bbondy commented Oct 12, 2018

chrome.windows.onCreated doesn't get called for the first window

@bbondy
Copy link
Member

bbondy commented Oct 12, 2018

@bbondy
Copy link
Member

bbondy commented Oct 12, 2018

I think a hack that would work is to have an interval that checks for new windows that it doesn't know about. Or even just a timeout to make sure that when a script runs through it will call that timeout one time and check to make sure it has all known windows.

@LaurenWags
Copy link
Member

LaurenWags commented Oct 14, 2018

Verified passed with

Brave 0.55.13 Chromium: 70.0.3538.54 (Official Build) beta(64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Mac OS X
  • Verified with STR from description

Verification passed on

Brave 0.55.13 Chromium: 70.0.3538.54 (Official Build) beta (64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Windows 7

Verification Passed on

Brave 0.55.14 Chromium: 70.0.3538.54 (Official Build) beta(64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants