+1 vote
by (130 points)
Hi all,

Last year I made and successfully published and shared several twines. I am trying to reuse one of them for class this year (I am a teacher) and tested the saved file this morning. It loads as a blank page. I searched through the advice here and tried to reload it into the web-based Twine. That works -- I can see it and play the game. But when I try to publish the file, nothing happens. That is, gear --> "publish to file" results in nothing: no dialogue box for saving, no active downloads, etc. It's like I didn't click on anything.

I'll take advice on either resurrecting the old working HTML file or making the web-based version publish!

I'm running OSx 10.12.6 and this happens in both Safari and Firefox.


1 Answer

0 votes
by (63.1k points)

First, what format are you using? 

Here's a few things to try: 

  1. Make sure a starting point is set. I would even go as far as changing the starting point and changing it back to see if that helps. 
  2. Try changing the format to something else and then changing it back. It's possible the format has been updated since the last time you used Twine, and that can lead to issues where the build process isn't selecting the correct format. 
  3. If the game uses a Twine 1 tws file, you will need to load it into Twine 1 for it to build correctly in most cases. You may need to manually edit the file in a text editor and change the story format's name to match the format as you have it named in the targets directory/format menu. This line of code is near the top, several lines down. 
I imagine its not #3 since it shouldn't really test play at all in twine 2, but I thought it might be worth pointing out. #1 and #2 will fix most importing issues. 
If none of these work, try to figure out which version of Twine you used the first time. Then visit the repo downloads page and grab the correct version and try that. 
Finally, if you're still unable to get it working, you can upload it to a file sharing service such as Dropbox or Drive, then post the link here and let us take a crack at it. 
by (130 points)

Okay, so that kind of worked! Documenting for future users:

* changing the start page to new page and then resetting it allowed me to save, but I still got a white page on reopen

* changing story format to Harlowe 1 kept blank reload

* changing story format to what I *think* was the original (Sugarcube 2) allowed me to reopen in what I think was play mode, but I got an error:

Apologies! A fatal error has occurred. Aborting.

Error: SecurityError (DOM Exception 18): The operation is insecure..

Stack Trace:
global code@file:///Users/jax/Downloads/The%20Gracchi%20(1).html:257:30732

* Changing back to default format (Harlowe 2) now makes the game boot as a blank black page instead of a blank white page; same with Harlowe 1.

by (63.1k points)

You can't just switch between SugarCube and Harlowe, they have different syntax.

The DOM exception error seems to be an error with new releases of Safari. Which version of Twine and SugarCube are you using? Try upgrading to the latest release of each of you haven't already, most importantly, try to install SugarCube 2.20.0, note that you'll need the application release of Twine 2, not the web version. You may still get an error in Safari, but the game should at least run, as long as that's the correct format.

by (130 points)
I've never installed the program. Both last year and this year I used the web-based version, which is why I don't know what the file was originally made in.
by (63.1k points)
I might not have been clear. I'm saying that you should try fetching the downloadable/installable version and install the most recent version of SugarCube 2, which is v2.20.0. Then select that format, and import your file. Your file will throw an error and run in a less than ideal manner in Safari (but it will still work), and run fine in every other modern browser.

The source of the error above came from a fairly recent change in how Safari in specific handles web storage, and I believe that deficiency has since been worked around by SugarCube's most recent version. However, you cannot install SugarCube versions other than the bundled ones in the web version of Twine 2, hence why you need to grab the downloadable release.

If your story was originally written in SugarCube 2, and you do what I describe here, and then do what I describe in #1 and #2 of the original answer, this should fix the issue. It's more work than it should be, but the changes Safari implemented have broken a great deal of web apps, not just Twine, for what it's worth.

I can't guarantee this will fix it, but it seems like your problem is two-fold. You seem to have the normal importing issues and the Safari bug going on here. It's also possible that the format you used initially was actually SugarCube 1, so maybe try that first to see if it works and maybe save yourself some time. If you do, I recommend trying to get things working in Firefox first, so you don't need to worry about the Safari issue right now.
by (159k points)

However, you cannot install SugarCube versions other than the bundled ones in the web version of Twine 2

You can install SugarCube 2.x updates in the web-browser based release of the Twine 2 application as long as you are running it locally, I do this with each new version of SugarCube.

You just can't add non-hosted story formats to the hosted web-browser based release of the Twine 2 application.

by (63.1k points)
Thanks for telling me that, @greyelf, I didn't know that and never tried.
by (130 points)
Hi all,

Okay, I'm now a little confused. So I need to download both the regular Twine program and SugarCube? I tried downloading just SugarCube and couldn't get it to run.

Meanwhile, on my work computer running OS 10.11, the original Twine works just fine -- and in Safari to boot! So is this actually an operating system problem? Any ideas?

by (63.1k points)
edited by

It's likely still Safari. Could be a different version was installed on that machine. Could also have to do with the OS having limited support for some of Safari's updates. I still think you might want to get this to SugarCube 2.20.0 so that other users won't have this issue, but I don't know if that's that big a deal to you. 

SugarCube is not a standalone application, it's a format for use with the Twine application (and a few other editing / build systems, like Twee and TweeGo). In other words, Twine is the editor, and SugarCube is the engine. 

There are detailed instructions on how to install the format into the Twine 2 app in the downloads section of the motoslave.net website I linked above. So the whole process is: 

  1. Download the application version of Twine 2 for your system and install it. Make sure it works (just run it to see if it crashes; hopefully it won't). 
  2. Download SugarCube 2.20.0 and follow the installation instructions
  3. Import the html file or archive file containing your story into Twine 2. 
  4. After the import, open the story. Go to the Story Formats option, and change to any random format that isn't currently selected and isn't SugarCube 2.20.0. Confirm the change. Immediately change the option again, this time select SugarCube 2.20.0. 
  5. Change the start passage to a random passage, then change it to the actual start passage you want. 
  6. Attempt to test play the game. 
  7. Assuming it works, attempt to build the project and open it in Safari. You may or may not see a different error message, probably something about running in a "degraded" mode, but it should still work well enough. 

This is all, of course, assuming that the format you used was in fact SugarCube 2. For reference, SugarCube macros look like <<this>>, while Harlowe macros look like (this:); maybe that can help you remember which you used. 

by (130 points)

Okay. Sorry to have run us down a rabbit hole. It was originally made in Harlowe 1.2.4 -- I saw it in the code tags when I opened the original HTML file in my text editor.

format="Harlowe" format-version="1.2.4" 

I understand that part of the problem with Safari might just be Safari, but then I still don't understand why I couldn't run the original program in Firefox either. 

by (63.1k points)
Sorry, lost track of this. Your guess is as good as mine at this point. If it's working consistently now, I'd just chalk it up to the whims of the cruel browser gods. If it's not working consistently still, or stops working, let us know.