Changes are not saved anymore
Hi all,
somehow inky doesn't save any changes I do in my ink file anymore. I tried with different computers and am using the latest version of inky...
Any ideas what I could do?
Best regards, Mehalon
Edit: The issue seems to occur only for some ink files. Can ink files be corrupted somehow?
Can you try checking if the .ink file is marked read only or copying the contents into a duplicate .ink file and see what happens?
Hey! We've had more than one report of this happening, though we haven't managed to reproduce it ourselves. Which version of Windows are you on? And is it the 32bit or 64bit version of Inky?
Hi, I'm using Windows 10 in a 64bit version. Will try to copy&paste the text into a new file and see if that works.
Happened to me too... Windows 7 on both 32 and 64-bit versions. Happened on a file test.ink but not any others. Doesn't seem to matter what the contents are: if I paste the same content into another file it works fine, and if I paste content from another file into test.ink (or put it in there with another editor) it still won't save. If I delete test.ink and create a new one (either from Inky or vim or cat or copy or whatever) it still won't save.
So I'm not sure if the file got screwed up at some point and Inky is caching information that somehow causes a file by that name never to save, or if it just doesn't like that particular name. I'm suspecting that it's something about the name because I've seen it happen with a file that only ever had known good code in it... I have a main folder (we'll call it .), containing Inky-win32-ia32 and Inky-win32-x64. I probably crashed ./test.ink and Inky-win32-x64/test.ink, but I only ever put good code in Inky-win32-ia32/test.ink. Yet none of them will save. If, however, I use foo/test.ink or bar/test.ink they save fine. So I have no idea what's going on. But on the off chance that any of this helps you...
I believe this has been around for a while: I just upgraded because I saw the problem in the old version I had (which I think was Inky 0.7.2).
Had the exact same thing happen when saving the file as test.ink in my documents folder. Couldn't open it nor could I save any other files in that folder. Once I tried saving another ink file outside of that, on my desktop, It worked fine. Not sure what the bug is here, maybe something to do with the test.ink name or if a save goes bad on a directory it corrupts the cache for that directory. Not sure but the workaround is to save it in another location for me at least.
I'm definitely still seeing this in the latest version.
Windows 10, 64-bit, here. I have a project with a lot of include files, and when I open it in inky, I can usually get it to save maybe once or twice, but after that, it silently fails to save. When I try to close Inky, it detects that there are unsaved changes, and it shows the "Would you like to save changes before exiting?" dialog. If I hit "Save," the dialog goes away, and absolutely nothing happens.
This is somewhat exasperating, because it's easy to lose work.
This may help! When I fail to save, I get the following error in the dev tools console:
Uncaught Empty file content in aceDocument!
InkFile.save @ D:\dev\Inky-win32-x64\resources\app.asar\renderer\inkFile.js:174
includeFiles.forEach.f @ D:\dev\Inky-win32-x64\resources\app.asar\renderer\inkProject.js:254
mainInk.save.success @ D:\dev\Inky-win32-x64\resources\app.asar\renderer\inkProject.js:254
fs.writeFile @ D:\dev\Inky-win32-x64\resources\app.asar\renderer\inkFile.js:187
(anonymous) @ D:\dev\Inky-win32-x64\resources\app.asar\node_modules\graceful-fs\graceful-fs.js:43
(anonymous) @ fs.js:135
OK, yeah, that gave me the clue I needed. Here's how to reproduce the bug: 1.) Delete the contents of an included ink file. 2.) Try to save.
...AND BUG!
Until this bug is fixed, the easiest workaround is to drop a comment in any file you're not ready to fill in yet. This can also be used to rescue a project that is not saving, so that you don't lose your work.
So, would, "inky can't handle saving empty files" cover it?
On Thu, Oct 18, 2018 at 8:06 AM Tess Snider [email protected] wrote:
OK, yeah, that gave me the clue I needed. Here's how to reproduce the bug: 1.) Delete the contents of an included ink file. 2.) Try to save.
...AND BUG!
Until this bug is fixed, the easiest workaround is to drop a comment in any file you're not ready to fill in yet. This can also be used to rescue a project that is not saving, so that you don't lose your work.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/inkle/inky/issues/150#issuecomment-430898671, or mute the thread https://github.com/notifications/unsubscribe-auth/AA40o-ZMWsn_rizOfgmMFTqDjQy8rnsdks5umCiBgaJpZM4T88W2 .
I think I'd say it's more like "Inky can't save files if there is an empty file anywhere in the project."
It's not just the empty file(s) it can't save -- it can't save ANY file at all, when there is an empty file present.
Thanks! That’s super useful. On Thu, 18 Oct 2018 at 8:29 am, Tess Snider [email protected] wrote:
I think I'd say it's more like "Inky can't save files if there is an empty file anywhere in the project."
It's not just the empty file(s) it can't save -- it can't save ANY file at all, when there is an empty file present.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/inkle/inky/issues/150#issuecomment-430904442, or mute the thread https://github.com/notifications/unsubscribe-auth/AA40o6s6e1bUsj7Wy0y8KCorJJ5NseOVks5umC28gaJpZM4T88W2 .
Bumping this. Indeed, empty files are "created" virtually when they're INCLUDED, but cause failure in saving any file in the future from the aforementioned line. If nothing else, swallowing errors on file saving with no indication to the user is irresponsible at best, and has definitely caused us to lose work here.
I'm starting a branch to fix this issue, and I'd like feedback on how best to handle this.
Right now, InkFile.prototype.save takes a callback with a single boolean parameter: success. In the case that fs.writeFile fails, this is invoked with false, else true. The uncaught throw only happens if the file is empty. So our options are such:
- If the file is empty, simply invoke the callback with
false(fine, still doesn't report to user if a write fails for a non-empty status) - If the file is empty, throw and silently mask in calling code (bad, still no reporting)
InkFile.prototype.savegives more detailed reporting to the callback, indicating if a failure occurred because the file was empty or because an IO error occurred. Show dialog in the event that a non-empty failure happened, allowing the user to perform salvage on their unsaved work. (preferred)- EDIT: The above, but
InkFile.prototype.saveis refactored to return aPromisein prep for a larger refactor usingasync/awaitto do asynchronous work. AFileEmptyErrorexception type is created to differentiate to the consuming code why something is amiss.
Let me know what you think, and thanks again!
i just used Inky for the first time. I wrote for about five hours, saving intermittendly, about once an hour, and of course right before closing the program. Only the first ever save was saved. 90+% of what I wrote is gone.
Safe to say I won't use inky again.