0 votes
by (810 points)
My Mac unexpectedly updated itself to Safari 11 the other day when I wasn't paying quite enough attention, and the SugarCube story I'd been working on without issues until now stopped opening in Safari, with the error SecurityError (DOM exception 18).  I tried both SugarCube 1 and 2, and both gave the same error; it just looks nicer in SugarCube 2.

I googled and only found an old error with SugarCube that was similar but not the same thing.  I did find an answer eventually by looking for non-Twine-related advice about the error; since I'm opening the generated files manually I now need to select "Disable local file restrictions" from the Safari Develop menu to get the story to work.  It's not an issue when the story is hosted on a web server.

If you don't have the Develop menu on, you need to turn it on in order to access the relevant setting.

1 Answer

0 votes
by (68.6k points)
What version of SugarCube v2 are you using?  I'm betting that it's v2.18.0 or older and not one of the two most recent releases (v2.19.0 & v2.20.0) which should have addressed the issue you're having.

SugarCube v1 has pretty much reached end-of-life.
by (810 points)
I started with whatever is in my current version of Twee2, but after the story broke I downloaded 2.20.0 for Twine 2.1 manually and used that one instead, but still got the error.  It's possible Twee2 is doing something wrong when applying the story format, though I'm not sure how setting the Developer preference would have fixed that.
by (68.6k points)
Is the error message in the console—there should be one—the same as the one from the popup or does it offer more information?
by (810 points)
It turned out my update to SugarCube 2.20.0 didn't take, and I was seeing the previous output file from the older SugarCube 2 version when I thought I had the updated one.  Once I fixed that problem, I got the expected message about the degraded Safari experience instead of the error.

The story started out in Sugarcane long ago, which is why I'm still using SugarCube 1.  I haven't noticed a difference between 1 and 2 except in style (I'm used to 1), and now this issue.  I don't really expect problems upgrading because the scripting for this story is very basic, but I haven't thoroughly tested the SugarCube 2 version or come up with the CSS to make it look like 1 yet.
...