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

uBlock is not loading adminSettings at first run again #1660

Closed
8 tasks done
anulman opened this issue Jul 14, 2021 · 4 comments
Closed
8 tasks done

uBlock is not loading adminSettings at first run again #1660

anulman opened this issue Jul 14, 2021 · 4 comments
Labels
Chromium specific to Chromium/Chrome external issue involving an external factor invalid not a uBlock issue

Comments

@anulman
Copy link

anulman commented Jul 14, 2021

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

Description

If Chromium reloads after crashing, uBlock may not load adminSettings during its first run (see #1547). I notice that uBO caches lastVersion at script start; what if we deferred setting it until after the Promise.all instead?

A specific URL where the issue occurs

N/A

Steps to Reproduce

  1. Set a custom filter list in /etc/chromium/policies/managed/ublock_policy.json
  2. Load Chromium, then kill it before uBO finishes initializing
  3. Load Chromium again, this time letting uBO finish initiaizing
  4. uBO will not load the filters until Chromium next reboots

Expected behavior

I expected uBO to have restarted itself after it finished initializing the first time

Actual behavior

uBO did not restart itself, presumably because lastVersion had been set (making lastVersion !== '0.0.0')

uBlock Origin version

1.36.2

Browser name and version

Mighty (Chromium 91.0.4472.114)

Operating System and version

Ubuntu 18.04.4

@gwarser gwarser added the something to address something to address label Jul 14, 2021
@gorhill
Copy link
Member

gorhill commented Jul 14, 2021

Please file an issue with Chromium devs for the issue of managed storage content not being served properly to extensions. The restart is merely a trickery to workaround an issue which is a browser issue -- the browser should properly return the content of the managed storage when an extension ask for it. I don't see trying to push further the trickery to be a good idea, assuming such approach can still technically be worked on.

@gwarser gwarser added the Chromium specific to Chromium/Chrome label Jul 14, 2021
@anulman
Copy link
Author

anulman commented Jul 14, 2021

Will do; they already have a bug about this.

Do you foresee any danger in moving vAPI.storage.set('lastVersion', foo) to after the Promise.all though?

@uBlock-user uBlock-user added external issue involving an external factor invalid not a uBlock issue and removed something to address something to address labels Jul 14, 2021
@gorhill
Copy link
Member

gorhill commented Jul 14, 2021

Do you foresee any danger

onVersionReady() is meant to execute code once needed sometimes when a version change, so moving out version saving would just create a potential issue affecting everybody just to address the other narrower potential issue here.

@anulman
Copy link
Author

anulman commented Jul 15, 2021

Thank you for the context!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chromium specific to Chromium/Chrome external issue involving an external factor invalid not a uBlock issue
Projects
None yet
Development

No branches or pull requests

4 participants