inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.14k stars 492 forks source link

JavaScript Error upon opening Inky with another User in Linux #899

Open ConfusedMerlin opened 6 months ago

ConfusedMerlin commented 6 months ago

Greetings,

found a (non fatal) bug by accident.

What? It says

A JavaScript error occurred in the main process

and

Uncaught Exception: EACCES: persmission denied, mkdir '/tmp/Inky_complie/-Untitled_link_xxxx'

Where?

Linux Debian Bullseye with 6.x Kernel Using whatever Inky was up to date in your repo five days ago from now

How I tend to start Inky / Inkle from the shell at my device. Today I had a root shell open and forget about it belonging to root. Some time later, I came back to that shell and thought "well, that may be a good place to call Inky from"... and did so. It turned up, and just when I hit "open" and was confused by the file selection dialogue ( as it suddenly did know about all devices mount points and stuff ) I noticed, that I did open it in a root shell.

Well... I closed that. And called it again with my normal user. This should have worked, but instead I ended up with that error message.

how to solve thankfully, that seems like an easy to navigate around error; I just deleted the /tmp/Inkly_complie folder from another root shell. And now it starts again.

That happend, because the tmp folders Inky folder was created with the user I started it first today... which was root. And of course, the normal user may not mkdir inside a folder that does belong to root.

What now I will leave that here for others to note... and I would like to suggest, that you have a look at what happens upon closing the application. I dunno if you have a good hook for that on closing, but removing that temp dir may work, or giving it 777 upon creation could do well too. Or something else I did not think about yet.