Browser: Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL

11,712

Solution 1

just tried something similar and I got the same error with Chrome. when I run the code from a webserver works fine.

create a dir in webapps in tomact put web-inf from root in project dir create a startup file which start page of your project http://localhost:8080//index.jsp

Solution 2

I am also getting the same error while testing my project on Google Chrome. But it is working on Firefox, Opera and Safari on Mac.

If anyone is encountering the same issue, test your project on other broswers.

You can find this issue discussed on ChromeReleases Blog.

Share:
11,712
safron6
Author by

safron6

Updated on June 05, 2022

Comments

  • safron6
    safron6 almost 2 years

    I just got this error on a on desktop only website which uses an IDE to render the page. It works on FireFox some, but the controls necessary to generate all of the JavaScript is not there as in Chrome. Perhaps I could add a cross compatibility line but I do not know what. The reason why is this strange error I never have had before on the debugger... Please help with resolution.

    Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///C:/Users/J/Desktop/Rain_Watch%20Webpage/default.html' cannot be created in a document with origin 'null'.
    jquery.min.js:2 Uncaught Error: jHERE already initialized, expected method.