Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Uncaught SecurityError: Failed to execute 'replaceState' on 'History'

edited September 2015 in Help! with 2.0
I am suddenly unable to open my Twine 2.0 story via Google Chrome; it had worked for weeks prior to this particular error. I believe it might be correlated with recently clearing my history, as all previous versions of the story fail to work within the browser as well. I'm using the Snowman 1.1 format.

When I 'Publish to File' and open the exported .html document, this error immediately shows up.
⚠ Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///C:/Users/Glitch/Desktop/StoryName.html' cannot be created in a document with origin 'null'. (file:///C:/Users/Glitch/Desktop/StoryName.html: 622)

This is all very esoteric to me. I would appreciate any help offered.


  • Chromium/Chrome made changes with v45 that broke all uses of the HTML5 History API in files when opened via the file:// scheme. If you want more details, search the forums.

    Snowman is one of the affected story formats. Short of not using Chromium/Chrome with locally opened files, you'll have to wait for @klembot to publish an update to Snowman.
  • Chrome recently change their security in relation to local HTML files ability to access History. You have a couple of choices:

    1. Switch to a different brand of web-browser.
    You can change back to Chrome once the developer of Snowman is able to release a new version with this fix, although that may take a while because that would require a new release of the Twine application.

    2. Open an instance of Chrome with the --allow-file-access-from-files parameter.
    WARNING: Doing this will partially change the security of Chrome, I suggest not using this instance of Chrome to access content on the internet.
  • Thank you both for getting back to me so quickly. I'll search the forums to learn more about what's going on, the situation seems rather unfortunate. Would anyone know how long it will be before the Twine developers push an update?

    The fix on Bitbucket seems far too intricate for me to work with right now, I might switch over to Firefox or Edge simply for the purpose of testing in-browser. I'll heed the advice not to modify Chrome's security measures and wait for Snowman to be updated.

    Thanks again, you two. As always, your help is greatly appreciated.
Sign In or Register to comment.