Open Saoiray opened 5 months ago
cc @ryanbr @rebron
Thanks @Saoiray, we're looking into this but we haven't been able to repro so far.
@Saoiray are you on Windows?
Hey @ShivanKaul. Before I answer, let me emphasize I'm not personally experiencing this issue. I created the Github to report it as it's an ongoing issue that I keep seeing raise its ugly little head on Reddit, Brave Community, etc. That said, I am on Windows 11 Pro.
To give a brief rundown, this has happened randomly for over a year. Originally just launching Brave as administrator would resolve it completely. However, newer replies have said this only resolves it on a per session basis and the next time they launch Brave regularly the issue returns.
The more long-term solution at this time had been more like the one proposed at https://community.brave.com/t/brave-stopped-blocking-ads/538720/8 and is further explained at https://community.brave.com/t/brave-stopped-blocking-ads/538720/13
Beyond that, I know I've also seen it resolved just simply by telling people to do a new installation on top of their current browser to do a forced manual update, though this isn't 100% accurate.
In summary, I guess it just seems like at some point during updates Brave is losing privileges on devices. There never seems to be any shared firewall, internet security, or anything in common. Then as people experience this, they come to say things like Brave is no longer blocking ads.
But I get that randomness and not being able to directly reproduce might make this challenging. But I did at least try to provide variety of links so you guys can kind of see it happening and have data there. This includes an ongoing post at https://community.brave.com/t/the-adblocker-is-not-working/550312 if you or others want to try to get info from them while they are experiencing the issue.
So far all of these look like they're on Windows and are related to folder permissions.
So far all of these look like they're on Windows and are related to folder permissions.
Yeah, I mentioned primarily seeing it on Desktop. In terms of folder permissions, I guess struggle is determining why people are losing permissions. Perhaps it's related to what TEMP-ad was mentioning.
Btw, have one more shared today
https://community.brave.com/t/youtube-ads-on-brave-browser-need-assistance/552112
Hi folks - thanks for capturing all the incidents, @Saoiray
I'd like to propose some steps we can try with users in the future. If this works, we can consider putting a permissions check in place in Brave and then linking to a help article with steps similar to this.
If the person is NOT on Windows, I think there is a different problem. We should capture information about that in a new issue.
Find out if install was a system level install or a user level install.
%programfiles%\BraveSoftware\Brave-Browser\Application
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application
Let's check the profile directory.
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\
(or whichever channel affected), and hit enterUser Data
folder and pick Properties
.Security
tabGroup of user names
field. For example, my account is brian
If that is NOT set, add the user by clicking Edit
and then adding the user account.Advanced
button
Change
Check Names
to make sure it's valid, then hit OK
Replace all child object permission entries with inheritable permission entries from this object
and then click Apply
If the above does NOT fix the issue, we'll need to dig in more.
If someone is copying the directory over from another machine or restoring a backup, the folder might not have the current user as the owner of the directory.
If the above steps don't help, there might be another root cause too - which we'll need to find.
@bsclifton
I don't think that's the reason why this happens to many people. I know that because people haven't said anything about copying anything over, but adblocker just stopped working, and then I give the fix and they say it worked, which means it's just for some reason Brave got started as Administrator.
The issue can be replicated by starting any version as admin: All users installation, Per user or Standalone/Zipped/Portable, you will get the same problem, and this only affects the version numbers of the components, not other folders (apparently).
The best way to see this is by brave.exe --user-data-dir=%USERPROFILE%\Desktop\TEMP
in Terminal (Admin) and you will see any component version downloaded will look like this:
If you close brave and now start brave.exe --user-data-dir=%USERPROFILE%\Desktop\TEMP
without admin rights, you will see you can't update the components anymore and you can't even access the folders anymore without you doing it from a file manager with admin rights or Terminal (I use Far).
And that's because as you can see user can't read or write the folder, which causes the folder to be there, but since Brave can't access the folder without admin rights, it causes an error where it can't download a new version.
Of course, the inheritance has to be properly fixed, if not Brave can never access and download new versions of the components.
GUI:
You go to the Advanced Security Settings from the User Data
folder (TEMP in the case of --user-data-dir=), and just disable inheritance and remove all inherited permissions from this object
, and then instead of hitting apply, just just Enable the inheritance so it only does it once. This will force all files to app to get the proper inheritance from the %userprofile% for the three SYSTEM, Administrators and Users.
CMD
You start terminal with admin rights and use icacls "User Data" /t /reset
or TEMP or whatever folder you placed the User Data and done. or you CD the user data and icacls * /t /reset
and it will simply fix it by resetting and adding the proper inhiritance.
It started with https://github.com/brave/brave-browser/releases/tag/v1.53.43 when Chromium 114 got released in Nightly. You should see the same exact behavior in that version.
If you use https://github.com/brave/brave-browser/releases/tag/v1.53.42 the behavior is different, but it was never 'good'.
1.53.42 will work after starting the browser with admin rights, the problem is it is still not inheriting the permissions correctly, it the User permission will only be Read & Execute. Which means, it will be able to read and download new versions BUT it won't remove the old versions, which means you will accumulate all versions a component updates until you fix the inheritance issues, because the folder doesn't have permissions to write.
So the permissions were never set correctly to begin with as you can see, TrustedInstaller, CREATOR OWNER, ALL APPLICATIONS AND ALL PACKAGES, and no inherited permissions (Heredado de Objecto primario
= Inherited from None
), but they were better than what's going on now, at least the updates happened even if they didn't get removed on exit.
That's the whole story about this, easy to reproduce, easy to manually fix, and it is something being caused by whatever it is downloading the components and for some reason doing some strange magic by avoiding giving proper inheritance to the folder, it's only giving 2 of 3 permissions, which I have never seen happening, because you can't really do it, but I guess, and apparently, you can do somehow.
@TEMP-ad this is great information - thank you! I'll dig in some more and try to share an update
Hi folks - thanks for capturing all the incidents, @Saoiray
I'd like to propose some steps we can try with users in the future. If this works, we can consider putting a permissions check in place in Brave and then linking to a help article with steps similar to this.
If the person is NOT on Windows, I think there is a different problem. We should capture information about that in a new issue.
When issue happens
- Find out if install was a system level install or a user level install.
- System level means prompt elevated installer to Admin when doing the install.
- You can tell if it's system level because it'll be installed at
%programfiles%\BraveSoftware\Brave-Browser\Application
- User level will be installed to
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application
- Let's check the profile directory.
- Windows + R, paste in
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\
(or whichever channel affected), and hit enter- Once folder is open, right click
User Data
folder and pickProperties
.- Click
Security
tab- Make sure the user account the person is running is in the
Group of user names
field. For example, my account isbrian
If that is NOT set, add the user by clickingEdit
and then adding the user account.- If the user IS in that list, click the
Advanced
button- Ensure the user account the person is running is listed as the OWNER
If that user account is NOT the owner
- click
Change
- Enter the user account, hit
Check Names
to make sure it's valid, then hitOK
- Once that window closes, check the bottom left of the new window
- Tick the box
Replace all child object permission entries with inheritable permission entries from this object
and then clickApply
- If the above does NOT fix the issue, we'll need to dig in more.
Why can this happen?
If someone is copying the directory over from another machine or restoring a backup, the folder might not have the current user as the owner of the directory.
If the above steps don't help, there might be another root cause too - which we'll need to find.
This has worked for me where nothing else worked (other than running as admin but I don't want to), I did transfer my old profiles from my old machine at some point a while back but I'm surprised it only started falling appart recently.
For me I had the right permissions on the surface but checking the box and forcing permission update on all the subfolders seem to have fixed it.
None of @bsclifton nor ghost (deleted account) suggestions worked for me It still shows error in the Components dashboard to update adblocker components :(
Below my device and browser info
Please help me, in Ubuntu 24.04 LTS , facing the same problem,
Hi team!
I have fixed the issue in my case with the Adblock components with "update error" Browsing similar issues I found this ticket and comment https://github.com/brave/brave-browser/issues/21753#issuecomment-1073796716
Taking in account this part
I deleted that folder cffkpbalmllkdoenhmdmpbkajipdjfam
from C:\Users\[user_windows]\AppData\Local\BraveSoftware\Brave-Browser\User Data
and relaunch the browser
The browser created new folders with updated info of the components, these are the new created folders:
adcocjohghhfpidemphmcmlmhnfgikei
fcggndnjiecfkiomngolonakcmagfomn
gkboaolpopklhgplhaaiboijnklogmbc
iodkpdagapdfkphljnddpjlldadblomo
mfddibmblmbccpadfndgakiopmmhebop
Safe Browsing
Thats the solution for my case but hope this help as a reference for someone else
And now all the missing components from Adblock are updated correctly πΊ
cc @Saoiray
Update, the permission solution worked for a while but now it looks like even more components are failing and ads are back
Trying to get more information, but another person reporting at https://community.brave.com/t/component-update-error-and-extension-installation-issues/564289/
Actually, it's not just components not updating/working properly, but wrong permissions are also likely the root cause of users not being able to access their profiles.
Launching Brave as admin does result in the updater creating component folders with the wrong access permissions (so does launching Chrome by the way).
I'll check if it's the unzip service that creates those component folders with the wrong permissions β by the look of it, it should create them with the default security descriptor (code passes nullptr
to CreateDirectoryW()
), which means they should inherit the ACEs from their parent directory.
A simple test program like
CreateDirectoryW(LR"(C:\Users\szilard\Desktop\default_security_descriptor\test)", nullptr);
run as non-admin user or admin (or even Local System, for that matter), always yields the same ACLs for C:\Users\szilard\Desktop\default_security_descriptor\test
(inherited from C:\Users\szilard\Desktop\default_security_descriptor
, hence there's always an ACE for the user as well) β as expected.
The default security descriptors do differ (see below), but it shouldn't matter, as the access token is not inspected when creating directories.
Default security descriptor for non-admin:
D:(A;;GA;;;S-1-5-21-XXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-1000)(A;;GA;;;SY)(A;;GXGR;;;S-1-5-5-0-331003)
Default security descriptor for admin:
D:(A;;GA;;;BA)(A;;GA;;;SY)(A;;GXGR;;;S-1-5-5-0-331003)
Default security descriptor for Local System:
D:(A;;GA;;;SY)(A;;RCGXGR;;;BA)
Deciphering the SDDL syntax:
(A;;GA;;;S-1-5-21-XXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-1000)
:
Type: A (Access Allowed)
Flags: β
Permissions: GA (Generic All)
ObjectType: β
InheritedObjectType: β
Trustee (SID): S-1-5-21-XXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-1000 (non-admin user)
(A;;GA;;;BA)
:
Type: A (Access Allowed)
Flags: β
Permissions: GA (Generic All)
ObjectType: β
InheritedObjectType: β
Trustee (SID): BA (Built-in Administrators)
(A;;GA;;;SY)
:
Type: A (Access Allowed)
Flags: β
Permissions: GA (Generic All)
ObjectType: β
InheritedObjectType: β
Trustee (SID): SY (Local System)
(A;;GXGR;;;S-1-5-5-0-331003)
:
Type: A (Access Allowed)
Flags: β
Permissions: GXGR (Generic Execute, Generic Read)
ObjectType: β
InheritedObjectType: β
Trustee (SID): S-1-5-5-0-331003 (logon session)
I opened a ticket for Chromium folks here: https://issues.chromium.org/u/1/issues/365594097
It would be nice to find out why the affected users launch Brave as admin from time to time.
FWIW, I pinged a few users on Brave Community to get logs and contacted the Chromium team via DMs as well to raise some awareness β they're looking into it on their end.
Easily reproducible with Chrome:
https://github.com/user-attachments/assets/ad472b31-322b-475f-a3b7-6b107b465869
Issue logged upstream with more information here: https://issues.chromium.org/u/1/issues/365594097
The change that introduced the above behavior in Chromium: https://source.chromium.org/chromium/chromium/src/+/39f446846c5beb0ebfce00c78adc99bd83b10b2f:base/files/file_util_win.cc;dlc=1fe91ecf8212c7ffc27db1e9dc27c4acd3a8e859 β CreateNewTempDirectory()
(PathService::Get(DIR_PROGRAM_FILES, &parent_dir)
vs. GetSecureSystemTemp(&parent_dir)
).
Description
For quite some time now I have been seeing users complain about things like Widevine not being recognized or ads no longer being blocked. Typically those experiencing this issue will be able to go to brave://components and will see something that says Update Error and will display Version 0.0.0.0 for components. This is especially happening with the components associated with Shields.
In the past, this could be fixed by launching as administrator, but this doesn't seem to work anymore. There have been a variety of workarounds by users, but it seems like it should be more important to get devs to work on this. I've reported it to Mattches and others, but haven't seen any open Github issues or movement on finding solutions. Perhaps it's just internal only or I'm missing it, but wanted to bring here and hope we can get some eyes on it. Thanks
@rebron or @ShivanKaul either of you able to handle or pass to whoever can?
Steps to reproduce
Actual result
Expected result
Reproduces how often
Intermittent issue
Desktop Brave version (brave://version info)
This has been happening for a very long time across Desktop and Android, with primarily occurring on Desktop. Hope you don't mind me not putting in revision and all here.
Android device
Misc. Please see variety of links in Miscellaneous Information below as an example.
Channel information
Reproducibility
Miscellaneous information
Posts for example:
https://community.brave.com/t/the-adblocker-is-not-working/550312/2
https://community.brave.com/t/why-i-am-seeing-youtube-ads-in-brave-browser-again-and-also-component-update-error/546476
https://community.brave.com/t/fingerprinting-protection-no-longer-as-good/548139/11
https://www.reddit.com/r/brave_browser/comments/1cl3gtc/unable_to_drag_and_drop_files_in_youtube/
https://www.reddit.com/r/brave_browser/comments/1ck069h/ad_block_suddenly_doesnt_work/
https://community.brave.com/t/several-brave-components-are-not-updating/539258
https://community.brave.com/t/widevine-content-decryption-module-status-update-error-version-0-0-0-0/536020
https://community.brave.com/t/youtube-still-blocking-ads-component-issue/531055
https://community.brave.com/t/getting-ad-blocker-from-youtube/528672/6
https://community.brave.com/t/update-errors-on-components-page/519950
https://community.brave.com/t/brave-component-updates-fail-with-error/513846
https://community.brave.com/t/component-update-issue/510694
https://community.brave.com/t/youtube-ad-blocking-was-glitched/497287/5
https://community.brave.com/t/brave-shields-is-not-working/445208/8
https://community.brave.com/t/brave-ads-resources-error/271085
https://community.brave.com/t/brave-android-ad-block-doesnt-block-ads-brave-adblock-page-is-empty/215943
https://community.brave.com/t/brave-shields-ad-blocker-not-working-after-new-install/181478
https://community.brave.com/t/internal-component-fail-to-update/149628
https://community.brave.com/t/brave-stopped-blocking-ads/538720/17
Examples of suggested workarounds/solutions
https://community.brave.com/t/brave-stopped-blocking-ads/538720/32
https://community.brave.com/t/brave-stopped-blocking-ads/538720/8
https://community.brave.com/t/brave-stopped-blocking-ads/538720/13