question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Brave Shields not disabling under local html files (reopen)

See original GitHub issue

Description

(Reopen due to posting previous issue on an earlier release, but still seem to have the issue)

After developing a web application offline using localStorage, I got an error from the console, disallowing my web app to read/write to localStorage, but then after going to Brave Settings and setting Cookie Control from “block 3rd party cookies” to “Allow all Cookies”, my program started working.

I was unable to use the Brave Shields icon in the URL bar to allow all cookies because the icon was disabled, most likely because I was viewing an html file locally on my computer. I believe the disabled icon was supposed to mean that the shields were disabled, even though they actually were not.

Steps to Reproduce

  1. Open Brave Browser
  2. Go to brave://settings and set Brave Shields Defaults -> Cookie Control to “Block 3rd Party Cookies”
  3. Create an html file (call it doc.html) locally with this script using localStorage:
<!doctype HTML>
<html>
	<head>
		<title>Test</title>
		<script>
			if (typeof(Storage) !== "undefined") {
	  			localStorage.setItem("hello", "world");
	  		}
		</script>
	</head>
	<body>
	</body>
</html>
  1. Open that html file with Brave Browser

Actual result:

Open the console (ctrl-shift-C -> ‘Console’ tab) and observe the error:

Uncaught DOMException: Failed to read the ‘localStorage’ property from ‘Window’: Access is denied for this document.

The 3rd party cookie blocking on brave shield defaults prevents a local html file from writing to localStorage, even though it appears that Brave Shields should be disabled according to the disabled Brave Shields icon to the far right of the URL bar.

Expected result:

Expected Brave Shields to be disabled and allow localStorage to be written.

Reproduces how often:

Every time.

Brave version (brave://version info)

Brave | 0.68.142 Chromium: 77.0.3865.90 (Official Build) (64-bit) Revision | 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830} OS | Windows 8.1 (Build 9600)

Version/Channel Information:

I only tested it on the official release.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Taomyncommented, Oct 23, 2020

Any chance of a fix for this because all the HTML reports I generate and receive as local files I am forced to have to use Microsoft Edge to open them.

2reactions
DHNishicommented, Dec 8, 2019

I also can reproduce this issue using local HTML files. I was unable to discover any means of working around this issue through the Site Settings nor through trying to modify Brave Shields’ settings (other than enabling third party cookies across the board).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shields setting and local files - Brave Community
I am working on a project, building a drag and drop website builder contained in a html page. When I open the page...
Read more >
- JOINT HEARING TO RECEIVE LEGISLATIVE ...
Through DAV's National Service Program, veterans are offered professional benefits counseling and claims assistance at no cost to the veteran. DAV members have ......
Read more >
disable third party browser extensions
Disable Auto-Refresh in Chrome (Brave and Opera) Let's start with Google Chrome, the most popular browser. Third-party cookies are those that do not...
Read more >
vUH - River Thames Conditions
Google not searching 2015, Isola caprera cala serena, Apacer nox, ... anf in busta paga, Kwallon yau, Lithops fulleri care, H2 database file...
Read more >
Your Firefox extensions are all disabled? That's a bug! - gHacks
Update: Mozilla started to roll out a fix for Release, Beta, and Nightly versions of Firefox. The fix uses Mozilla Studies, and you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found