Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Ensure shields are loaded before the first tab launches. #6261

Closed
cuba opened this issue Oct 26, 2022 · 1 comment · Fixed by #6417
Closed

Ensure shields are loaded before the first tab launches. #6261

cuba opened this issue Oct 26, 2022 · 1 comment · Fixed by #6417

Comments

@cuba
Copy link
Contributor

cuba commented Oct 26, 2022

Description:

When launching the application (after it is terminated) shields may not be applied momentarily.

Steps to Reproduce

  1. Go to a website with visible blocking. For example https://dev-pages.brave.software/filtering/scriptlets.html or https://youtube.com (we block ads here)
  2. Kill the app
  3. Launch the app

Actual result:
Shields not applied applied:

  1. https://dev-pages.brave.software/filtering/scriptlets.html does not show true for all values
  2. Youtube shows ads when watching a video

Expected result:
Should apply shields right away (for that first tab):

  1. https://dev-pages.brave.software/filtering/scriptlets.html should show true for all values
  2. Youtube should not show ads when watching a video

Reproduces how often: [Easily reproduced, Intermittent Issue]
Easily reproducible

Brave Version:
1.45

Device details:
N/A

Additional Information

Caused by independently loading shields and the first tab. This is a race condition and usually the tab loads faster than the shields. Need to improve loading the shields (and block the first tab) from cache.
This is tricky because we don't want to block the app from launching the first tab (so it doesn't look slow) for the sake of loading shields

Youtube navigation doesn't solve the issue because it's a single page application. you need to refresh YouTube to solve the ads problem. Most people are not aware of this and stay and navigate YouTube which gives them ads all the time if this is the first page they go to after launching the app.

@cuba cuba self-assigned this Oct 28, 2022
@iccub iccub added this to the 1.45.1 milestone Nov 17, 2022
iccub added a commit that referenced this issue Nov 17, 2022
…6417)

Co-authored-by: Jacob Sikorski <jacob.sikorski@gmail.com>
Co-authored-by: Soner Yuksel <grkmyksl@gmail.com>
iccub added a commit that referenced this issue Nov 17, 2022
…6417)

Co-authored-by: Jacob Sikorski <jacob.sikorski@gmail.com>
Co-authored-by: Soner Yuksel <grkmyksl@gmail.com>
@Uni-verse
Copy link
Contributor

Uni-verse commented Nov 17, 2022

Verification completed using version 1.45.1 (22.11.17.19) on the following device(s):

iPhone 12 Pro - iOS 16.x
iPhone XR - iOS 15.x
iPhone X - iOS 14.x
iPads iPadOS

Using STR in #6261 (comment)

Example Example Example
IMG_4120 IMG_4121 IMG_4122
IMG_0779 IMG_0780 IMG_0784

Notes: Additional test notes - #6411 (comment)

# for free to subscribe to this conversation on GitHub. Already have an account? #.