Code Monkey home page Code Monkey logo

Comments (7)

Apophenia avatar Apophenia commented on June 20, 2024

I am running into the same thing in Windows 8 with a fresh install of Twine 2. I was unable to install it in the web editor or in Windows 8.

I thought maybe GitHub was doing something weird like misreporting the MIME type, so I cloned format.js to my Bitbucket and tried to DL it from there, but then the error said it was already installed(?). I don't know why it would throw that error, but it's another thing to add to the list that didn't fix it.

EDIT: Bitbucket actually does the same thing with the MIME type, looks like, so I'm going to try another workaround.

EDIT EDIT: Bitbucket pages give (this story format is already installed) error also, so still not sure what the deal is here.

from adventures.

Apophenia avatar Apophenia commented on June 20, 2024

Ok, so other folks have had this issue with MIME type as well. I haven't built from the source so I can't tell for sure if that's what's going wrong with the desktop apps, but maybe.

This Twine format was also having issues with MIME type when trying to load directly from GitHub:
lazerwalker/twison#9

The example here tried to download the format.js from GitHub pages, so I forked this repository and made it into a Pages repository (just set master as the pages source). This correctly set the MIME type. Buuuut, I still get the following error:

The story format at http://lyndseyjane.com/adventures/dist/format.js could not be added (this story format is already installed).

However, this doesn't seem to be true! When I look in the installed formats, it's just the default ones. No sign of Adventures. Same thing happens if I try to load from file in the Desktop version.

The story format at file:///C:/Users/Lyndsey/Desktop/format.js could not be added (this story format is already installed).

from adventures.

Longwelwind avatar Longwelwind commented on June 20, 2024

I had the same problem in the beginning of the development; Twine's saved story formats can be "corrupt". Twine will believe it has a saved story format for that name (because, I believe, it is stored in the localStorage), but it didn't save the file associated to the story format.

I think the "safest" way to install Adventures is to download the format.js file, and use the local file path (file://home/user/.../format.js for Unix/OSX, and C://Users/user/.../format.js for Windows).

I'll look into it and hopefully find a way to make an URL that Twine accepts.

from adventures.

Apophenia avatar Apophenia commented on June 20, 2024

Hmm, still got The story format at C://Users/Lyndsey/Desktop/format.js could not be added (this story format is already installed). in the desktop Windows app even when using it without the file prefix. I also deleted the entirety of C:\Users\Lyndsey\AppData\Local\Twine in case that's where local storage was hiding, but that didn't help either.

Just for fun, I opened Chrome Dev Tools on Twinery.org and manually cleared all of the storage (localHost, cookies, etc) and still got the "already installed" error even though the request for the JavaScript went through OK and received a 200 (but only on http://twinery.org, not https; trying to retrieve it from anywhere else gets a mixed content error over HTTPS).

I will try it on my Mac later and see if I get the same thing in the Desktop app.

from adventures.

Apophenia avatar Apophenia commented on June 20, 2024

Uninstalling and reinstalling Twine 2 for desktop also did not fix it, and there's nothing in %APPDATA% (C:\Users\Lyndsey\AppData\Roaming) to delete either.

from adventures.

Longwelwind avatar Longwelwind commented on June 20, 2024

It seems it is a combination of two problems:
We can't simply use the Github's URL, we have to use RawGit because of the MIME type.
And, there's a bug in Twine; when a new story format is imported, Twine should check if a story format with the same name and an identical version isn't already registered via this code:

if (store.state.storyFormat.formats.some(current => {
	return current.version === data.version;
})) {
	reject(new Error(
		locale.say('this story format is already installed')
	));
	return;
}

It only checks if a story format (with any name) has the same version. In Twine, Paperthin is registered with the version 1.0.0 which directly collides with Adventures.

I will update Adventures with the version 1.0.1, make a fork & a pull request for Twine and update the documentation. Thanks for reporting the issue!

from adventures.

Apophenia avatar Apophenia commented on June 20, 2024

Cool, I was able to install into twinery.org's web editor directly from my Github Pages fork's branch! It's working fine now. :)

from adventures.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.