window.localStorage raises an unspecified error when accessed in a local file

Confirmed Issue #8816771 • Assigned to Cameron F.


Marc L.
Sep 9, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 15 people

Sign in to watch or report this issue.

Steps to reproduce


To (try to) reproduce:

  1. Update to KB3176936,
  2. Open a local html file,
  3. In the console type "window.localStorage", it should raise an unexpected error (it used to be “undefined”).



0 attachments

    Comments and activity

    • Note that I’ve tested on two other windows 10, one which was not up-to-date and where the bug is not present and one "windows insider"’s computer (where the bug is there).

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Venkat K.”

      Changed Assigned To from “Venkat K.” to “AA”

      Changed Status to “Confirmed”

      Changed Assigned To from “AA” to “Shawn P.”

    • Note that unsurprisingly this happen also with "window.sessionStorage".

    • I can confirm that I have this issue. My Surface Pro 3 is on the Creators Update and has all monthly updates installed.

    • Same as Matthew B.
      I also face this issue (Desktop Dell PC on the Creators Update, all updates installed and multiple Windows 10 Mobile devices).

      I noticed this issue while developing UWP app. I cannot load my Html file (from app local storage) in the Webview as it uses JavaScript file (located also in the app local storage).
      I tested it in Edge (from Desktop) and it doesn’t work either.

      BUT it works if I use my HTML+JS files in a webview on a WindowsPhone 8.1 Winrt App.

      Could you fix it for Edge (Windows 10), please?

    • Another confirmation here.
      Seriously - this is over a year old now. How does Microsoft expect anyone to develop/test offline web pages/apps for Edge if basic stuff like this does not get fixed - given that it works fine in every other browser?
      Just giving a more meaningful error message would be an improvement…

    • Another confirmation here.
      Appears in Webview XAML application. Appeared after updating to creators update 1703. Only affects certain PCs and seems to be related to user settings.

    • This is really annoying as this bug causes Edge to fail on the very first Javascript tutorial on MDN (
      And it is even more disappointing to fail on this simple MDN tutorial as Microsoft announced the cooperation with MDN just some days ago (
      (I use build 17025).

    • Still running into this issue on December 1, 2017. Is there an ETA for a bug fix? It all works fine in Firefox and Chrome but I would like to include support for Edge. Thanks.

    • Still happening December 30, 2017. Even though session storage works.

      When I inspect the window object in the console window.localStorage = "TypeError: Permission denied".

      NB. I do not login to my machine with a local machine account. I log into my machine with my windows account.

      I hope this helps. If people are still looking at this issue.

    • Still having these kind of issues with examples from

      Works fine in any other browser, yields an “Unknown Error” in the script main.js (8,1) .

      git clone
      Open index.html in /web-storage with Edge.

      Will work fine in any other browser.

    • Microsoft Edge Team

      Changed Assigned To from “Shawn P.” to “Cameron F.”

    • This issue is more than 1.5 years old and it still persists. I guess I have to switch to an other browser for developing even the simplest things.

    • I can confirm: Insider Preview Build + Edge - still not working.

    • Another confirmation that localStorage from the file:// protocol is not working with April Update. Works on Firefox and Chrome.

    • Confirming this error for current version 42.17134.1.0.

    • This is still present in file:// protocol and as @Claudio F. said, in 42.17134.1.0 which is the current version. Can we have an estimate about when this issue will be fixed ? Or at least if it is already worked on or aimed at a later version ?

    • Continues to be a problem Jan 2019.

      Unfortunately, I don’t foresee this getting fixed due to MS dropping Edge and switching to Chromium.
      Shame MS is giving up on Edge, it is far and above what Chromium is giving us right now :(

    • It appears MS are not willing to make exceptions for window.localStorage even though almost every other browser and web component seems to do the job just fine and that on the file:// protocol testing to see if it is okay to use:

      we have to do: typeof(window.localStorage) which will return "undefined" otherwise

      if(window.localStorage) { } // or
      if(!!window.localStorage) { } // or
      if(isObject(window.localStorage)) { }

      will give the error SCRIPT16389: Unspecified error. eval code (2) (1,1)

      Now the problem is with other webapps if they return a null which is a type of "object", Leading to more problems as we can’t use window.localStorage outside of a typeof.

      It appears window.localStorage is been blocked access in Edge.

    • Has Microsoft acknowledged whether or not they consider this to be an actual bug (that will be fixed)?

      If they’re considering this to be a real bug, I’m a bit shocked that nothing has happened in 2+ years…

    • 26th of September, 2019

      1. I came up with idea to make my webapp Microsoft Edge compatible.
      2. I’ve tried to use localStorage and got
        "> var v = localStorage.getItem(‘version’)
        Unspecified error.

      localStorage.setItem('version’, 0)
      Unspecified error.
      Unspecified error.
      localStorage[‘version’] = 0
      Unspecified error."

      1. I quit.
      2. I will check in a month, until now I will continue to develop this for browsers that support localStorage.

    You need to sign in to your Microsoft account to add a comment.

    Sign in