Howdy, Stranger!

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

[BUG] Your browser couldn't save the state of the game.

OSX 10.7.5, Firefox 25.0.1. Just downloaded and opened Twine 1.4.1. When I test or build any of my old stories, or a new blank one, it gives me the following Javascript alert before I can play the game:
Your browser couldn't save the state of the game.
You may continue playing, but it will no longer be possible to undo moves from here on in.

This happens in Sugarcane and Responsive, but not in Jonah. It happens in Firefox, but not Chrome or Safari. I haven't upgraded to Firefox 26 because it borks plugins I need. I'm not running anything that blocks Javascript in Firefox. Any ideas?


  • I changed how the HTML5 History stores the game state in 1.4.1, because Firefox imposes a (strict but reasonable) limit on how much data can be stored in the browser history.

    If you're getting this error, I'd like to see the built HTML in question.
  • Attached is a new game, built without changing anything. Thanks for looking into this.

    Edit: In other stories with links, I indeed cannot undo choices. Firefox is set to remember history, and I have cleared old history recently, so it shouldn't be too full.

    I tried Sharpe's loop tutorial HTML which he generated in 1.4.1, and the same alert came up (,759.0.html). Apparently it's a problem with my Firefox, then. What setting do I need to change?

    Edit 2: It works fine in Firefox 26. Problem solved, though if you have any ideas why it went awry in 25, and how I could prevent it happening if someone tries to play a Twine 1.4.1 game in Firefox 25...
  • Hrmm... anyone else able to verify this?
  • Yes, this alert also appeared for a playtester of mine, running Firefox on OSX. Not sure on the exact versions, but they were probably not current for either. I can't say what effect this had on the gameplay. I don't think the player tried to backtrack at all.

    The alert does not appear when I run it on Windows 7, Firefox 26. Or on Chrome 32.
  • I'm getting the same problem in Windows 7.

    Warning message screen shot attached.

    In Sugarcane: When opening the page or restarting

    Windows 7: 
    Firefox 25 : Warning message pops up
    IE 10 : Warning message pops up
    Chrome 32: works OK

    OSX  10.9.1
    Safari 7.01 OK
    Chrome 32 OK
    Firefox 36: OK

  • I also get the same popup while testing my story. I'm using Responsive. Every time I refresh the page after a modification, it brings me back the Start, and I get that popup when I click a first link.

    I'm on latest version of Chrome, on Mac OSX Mavericks.

    Also, whenever I click the browser's Back button in my story, it always brings me back to the Start, which is pretty annoying.
  • Sorry, I always glanced over this thread thinking it was about Sugar Cube. I've encountered this error often in Windows 7 with Internet Explorer, both really out of date versions at school and the latest testing on my laptop.

    I'll PM you one of the three or four other HTML files that I can't remember that have this error. I can't post it here because it contains copyrighted material from SJ Games without including the proper notices yet.
  • I think I found a fix. I went in Chrome's Developer tool and found a bunch of stuff in "Local storage" and "session storage". So I deleted everything and now I don't have the error message and my browser's Back button works again! :D

    So, if you have this issue, go in your browser's developer tools, go in Resources > Local Storage (and Session Storage) > Localhost and delete everything.
  • It seems that the Browser create one new entry in Session Storage every time the page is refreshed or the story is restarted (by using the Restart link).

    I had about 40 before I had to deleted them again. Maybe it's filling the allowed space?

  • What's weird is that clicking the Restart button doesn't empty the Session Storage. It created another entry.

    I'm now pretty sure the error is caused when a lot of passages are visited, and the Session Storage becomes full.

    But using the Restart button should empty the storage, right?
  • Could this line from Manipulating_the_browser_history have anything to do with the problem?

    history.replaceState() operates exactly like history.pushState() except that replaceState() modifies the current history entry instead of creating a new one.

    Because I noticed that the following is using "pushState" but testing for "replaceState"

    var restart = History.prototype.restart = function () {
    if (typeof window.history.replaceState == "function") {
    this.pushState(true, window.location.href.replace(/#.*$/,''));
    else {
    window.location.hash = "";
  • I am a newbie, to twine 1.4. my sugarcane html build works perfectly on firefox 44, but i get the "your browser couldn't save the state of the story" when i open it in chrome 48. I really want to allow the user to go back using their chrome "back" function.

    and perhaps be able to 'bookmark' eventually.

    I couldn't find the Localhost in Resources > Local Storage (and Session Storage) > ... of chrome. And everything i found there was empty ...

    any suggestions ?
  • In Chromium v45, the HTML5 History mechanism was intentionally broken by its developers for local filesystem hosted files (i.e. those served via the file:// scheme). So, your Sugarcane-based story will need to be playable online (i.e. served via the http:// or https:// schemes) someplace to enable it to work in Chromium-based browsers (e.g. Chrome, Opera).
  • denichapon wrote: »
    any suggestions ?
    Chromium has been changed to limit access to the web-browser's History system to any HTML file opened locally, access is still allowed for HTML files access via a web-server. This effects recent versions of both Chrome and Opera.

    Unfortunately the Sugarcane story format relies on the web-browser's History system to save the state of the story, which it can no longer access so it fails with the error measge you saw.

    One possible solution to your problem is to change to the SugarCube story format which has been modified to so that it will keep working if access to the web-browser's History system is not allowed, although it will display a warning message.
Sign In or Register to comment.