klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
2k stars 295 forks source link

Test/Play issues with Twine Online (Firefox) #549

Closed Callikat closed 2 years ago

Callikat commented 5 years ago

I mentioned this on the Discord earlier, but was referred to put it here too. I'm having a bizarre issue while working Twine on my Firefox browser. Notably, the play and test buttons work once, but refuse to work at any point after that. The buttons act like they're being clicked, but they don't open the test/play tabs.

Some points I was asked:

I have no idea if it's relevant but I'm on Windows 10, on a laptop. I am online at the moment, it hasn't been tested offline.

mcdemarco commented 5 years ago

I got similar behavior in Firefox 66.0.3 (64-bit) on MacOS 10.12.6 (Sierra). Here's a screenshot of some more log info, including the Vuex warning mentioned by Callikat and some explicit errors I got when I kept trying. It's possible the content blocking warnings about cloudflare are causing the problem, e.g.,

Request to access cookie or storage on “https://cdnjs.cloudflare.com/ajax/libs/vuex/1.0.1/vuex.min.js” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.

A screenshot of the console is attached.
firefox-error

klembot commented 5 years ago

Hmm, I am not getting the same error on the same exact version of Firefox on MacOS. I do see the issue where hitting Play, closing the tab, and hitting Play again does nothing.

I'm wondering if this is a Firefox setting I don't have turned on, or something I turned off?

mcdemarco commented 5 years ago

Do you get the content blocking warnings but not the errors, or neither? I don’t remember setting up content blocking to try to unset it, but I can look around.

klembot commented 5 years ago

I get neither right now.

mcdemarco commented 5 years ago

I turned off the content blocking (I had a custom setup for some reason, but even the "Strict" setup caused the warnings), which removed the content blocking warnings, but I still get the vuex already installed warning and the errors.

mcdemarco commented 5 years ago

I tried a few more things, some of them involving a local build of master, and was able to reproduce the play-once issue with a new story (in Firefox and Safari), and the play-reopens-the-story-list issue with a fresh import (of an old Sugarcube 2.20.0 story), in Firefox, Safari, and Chrome.

I didn't investigate the play-once issue, but the other issue seems to be happening in loadFormat() in story-format.js, where version is null and throws the error, and name is actually a local path on my machine: "/Users/mcd/.../sugarcube/SugarCube-2/"

Most, if not all, of the stories in my story list at the twinery are old imports, so I suspect the source of the problem is the same there, but I don't have an easy way to check that.

mcdemarco commented 5 years ago

I noticed another instance of this behavior in the downloadable freestanding version of Twine 2.3.1. One of my old stories was set to use Paloma, but the story format list seems to have entirely reset itself to the current built-in story formats at some point, so Paloma was not found. Instead the story list window opened. The error on the console was:

twine.js:29 [vue-router] Uncaught error during transition: 
M @ twine.js:29
twine.js:29 Uncaught Error: No format is available named Paloma
    at loadFormat (twine.js:6)
    at VueComponent.ready (twine.js:23)
    at VueComponent.t._callHook (twine.js:6)
    at VueComponent.e (twine.js:6)
    at VueComponent.r (twine.js:6)
    at VueComponent.t.$emit (twine.js:6)
    at VueComponent.t._callHook (twine.js:6)
    at e (twine.js:6)
    at VueComponent.t.$before (twine.js:6)
    at twine.js:29

It seems like this error should be caught before the attempt to render the story. Even if the format really should have been around somewhere, accidents happen.

klembot commented 5 years ago

Hmm... I tried adding Paloma to the web version and reloading, but the list seemed to stay stable. This is a stab in the dark, but maybe this specific issue was related to the version of Paloma changing but its URL did not? (Which is behavior that Twine should support, to be clear.)

mcdemarco commented 5 years ago

Hmm... I tried adding Paloma to the web version and reloading, but the list seemed to stay stable. This is a stab in the dark, but maybe this specific issue was related to the version of Paloma changing but its URL did not? (Which is behavior that Twine should support, to be clear.)

Yes, it's likely the version changed but the URL did not. Twine 2.2.1 is reporting the current version now, though, so I'm not sure how to check that more thoroughly.

mcdemarco commented 5 years ago

Here's a screenshot from the Firefox local storage inspector with the Twinery at 2.3.2, showing a local path to SugarCube rather than a normal story format name:

BadFormatNoCookie

(The open the story list once then fail to open behavior of both the test and play buttons is unchanged in this version.)

klembot commented 5 years ago

That's definitely a bug, but I'm not sure at first glance how this could have happened.

klembot commented 2 years ago

This looks like a bug with Twine 2.3 or earlier, and because of that I'm closing it. Please re-open or create a new issue if you find this is still a problem in 2.4.

mcdemarco commented 2 years ago

This seems fixed.