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 is disabled on sites when it's opened in a new background tab #16362

Closed
srirambv opened this issue Jun 11, 2021 · 8 comments · Fixed by brave/brave-core#9105
Closed
Assignees
Labels
bug feature/shields/panel Front-end design and functionality of the Shields panel. OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes regression release-notes/include

Comments

@srirambv
Copy link
Contributor

srirambv commented Jun 11, 2021

Description

Shields is disabled on sites when it's opened in a new background tab

Steps to Reproduce

  1. Open any GH issue
  2. Ctrl+click on any links to open in new tab
  3. Switch to the newly opened tabs in background, shields look disabled, can't click on it but shows blocked count
  4. Reload page fixes it

Actual result:

Screenshot-20210611050225-214x103

Expected result:

Shields should never be disabled unless user disables it

Reproduces how often:

Easy

Brave version (brave://version info)

Brave 1.25.70 Chromium: 91.0.4472.77 (Official Build) (64-bit)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Maybe not checked
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

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

Miscellaneous Information:

@iefremov also mentioned he reproduced it but not sure about steps

@srirambv srirambv added bug QA/Yes regression feature/shields/panel Front-end design and functionality of the Shields panel. OS/Desktop labels Jun 11, 2021
@GeetaSarvadnya
Copy link

Reproduced on Windows 10 x64 - 1.26.55 Chromium: 91.0.4472.88

@srirambv
Copy link
Contributor Author

Console logs the following error when a tab is open in background.

[1972:1972:0611/082452.532794:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[1972:1972:0611/082452.533031:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Tabs cannot be edited right now (user may be dragging a tab).", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)

Trying to open dev tools causes shields to be come active again.

@rebron rebron added the priority/P2 A bad problem. We might uplift this to the next planned release. label Jun 11, 2021
@GeetaSarvadnya
Copy link

The issue is reproducible in Windows 10 x64 - 1.25.72

image

mkarolin added a commit to brave/brave-core that referenced this issue Jun 12, 2021
Fixes brave/brave-browser#16362

This is an upstream bug, see: crbug.com/1213925

The fix has been merged to upstream main and cr92, but not cr91.
This is the upstream patch applied to cr91.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/d9c16df2c22fd827e760f0ee20a1f977c717c849
https://chromium.googlesource.com/chromium/src/+/19555526c6fa4520598ccce63b031ffa91a5ad1c

commit d9c16df2c22fd827e760f0ee20a1f977c717c849
Author: Solomon Kinard <solomonkinard@chromium.org>
Date:   Thu Jun 3 17:08:55 2021 +0000

    [Extensions][Tabs] Allow tabs.query and tabs.get while drag in progress

    TapStripModel acquisition was restricted in crrev.com/c/2891080.
    Obtaining TapStripModel for read only purposes while drag in progress
    should be ok. This CL aims to restore that behavior to undo the
    regression.

    Bug: 1213925
@srirambv
Copy link
Contributor Author

Just a note, this also happens when launching the browser fresh. Sometimes happens with inactive tabs becoming active upon launch

@mkarolin mkarolin self-assigned this Jun 14, 2021
@mkarolin mkarolin added this to the 1.27.x - Nightly milestone Jun 14, 2021
@stephendonner stephendonner changed the title Shields is disabled on sites when its opened in a new background tab Shields is disabled on sites when it's opened in a new background tab Jun 15, 2021
@stephendonner
Copy link

stephendonner commented Jun 15, 2021

Verified PASSED using

Brave 1.27.63 Chromium: 91.0.4472.101 (Official Build) nightly (x86_64)
Revision af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}
OS macOS Version 11.4 (Build 20F71)

Steps:

  1. new profile
  2. loaded this issue: https://github.com/brave/brave-browser/issues/16362
  3. context-clicked on the PR link and chose Open Link in New Tab
  4. confirmed the URL loaded
  5. confirmed Shields were active and clickable
example example
Screen Shot 2021-06-14 at 5 00 18 PM Screen Shot 2021-06-14 at 5 00 27 PM

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.27.63 Chromium: 91.0.4472.101 (Official Build) nightly (64-bit)
--- | --
Revision | af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}
OS | Windows 10 OS Version 2009 (Build 19042.1055)

Quickly went through the case outlined via #16362 (comment) and ensured that loading inactive tabs after a restore correctly displays the shields icon. Uplifting brave/brave-core#9114 & brave/brave-core#9113 as both cases passed.

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 16, 2021

Verification passed on

<!--StartFragment-->
Brave | 1.25.73 Chromium: 91.0.4472.106&nbsp;(Official Build)&nbsp;(64-bit)
-- | --
Revision | 574f7b38e4e7244c92c4675e902e8f8e3d299ea7-refs/branch-heads/4472@{#1477}
OS | Windows&nbsp;10 OS Version 2004 (Build 19041.1052)

<!--EndFragment-->


Verification passed on

Brave 1.25.73 Chromium: 91.0.4472.106 (Official Build) (64-bit)
Revision 574f7b38e4e7244c92c4675e902e8f8e3d299ea7-refs/branch-heads/4472@{#1477}
OS Ubuntu 18.04 LTS

@oviniciusfeitosa
Copy link

Same problem here.

Ubuntu 22.04
Brave Browser 101.1.38.109 

@purefan
Copy link

purefan commented Aug 2, 2022

+1 for Ubuntu 22.04 with Brave 1.41.100 Chromium 103.0.5060.132 Official build 64-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/shields/panel Front-end design and functionality of the Shields panel. OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes regression release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants