typora-issues
typora-issues copied to clipboard
"The file is locked"
Frequently, when saving Markdown files in Typora, I get an error dialog saying "The document ... could not be saved. The file is locked". This occurs semi-randomly, but occurs almost without fail after a few minutes of editing a note.
Steps to reproduce the behavior:
- Create a new Markdown note
- Make a few changes to the text
- Save
- Make a few more changes
- Save again.
- Repeat steps 4 and 5 until you get the "File is locked" message
Expected behavior File should simply be saved, and allow me to carry on working.
Screenshots / Screencasts
If applicable, add screenshots / scre
encasts to help explain your problem.
Sample Markdown File Please attach or send us [email protected] the sample md file that may reproduce this.
Desktop (please complete the following information):
- OS: macOS Monterey 12.5
Typora Version Version 1.3.7 (6424)
Additional context I originally thought this issue was caused by DEVONthink, but the same issue occurs even when editing Markdown files not created within DEVONthink.
Can those files be edited and saved by the built-in TextEdit.app ?
I ran into the same issue when I added a custom icon to my-file-with-custom-icon.md (attachment) file.
Can those files be edited and saved by the built-in TextEdit.app ?
Interestingly, TextEdit.app has the same issue. 🤭
Repro steps:
- Create new file with Typora
- Ensure that everything works as expected by editing and saving the file multiple times in a row
- Quit Typora
- Download "Diamond free sticker" icon PNG (512px) from:
- https://www.flaticon.com/free-sticker/diamond_6426900
- Follow macOS User Guide step for changing the icon of the file:
- https://support.apple.com/guide/mac-help/change-icons-for-files-or-folders-on-mac-mchlp2313/mac
- Open the file again with Typora
- Edit the file and save it multiple times in a row until "The file is locked" error appears
If I restored the original icon of the file (by following the macOS User Guide above), then the issue disappeared.
OS macOS Monterey 12.5.1 (21G83)
Typora Version Typora 1.3.7
@abnerlee I just checked and TextEdit has the same issue. Once a file is locked, TextEdit complains as well (with the same error message). I, too, have custom icons on notes... I use DEVONthink to create Markdown notes, and have a series of note templates each with their own custom icon, representing the note-type, which ends up on the note "instances" themselves.
Interestingly, neither DEVONthink’s built-in (though rather minimal) Markdown editor, nor Visual Studio Code have any issues at all saving "locked" files.
It is expected that Typora behaviors same as TextEdit.app, which follows macOS spec (or bug).
In my test, I can write data to that file uses low-level code (like node or VM do, and if I use vi, the custom icon will gone...), but that would break macOS's built-in auto-save and version control features...
@abnerlee I understand the desire to "be the same as TextEdit.app", but have to mention that I have stopped using Typora (temporarily) entirely—using VSCode instead—as I simply cannot work with the constant "file is locked" issues.
I (personally) would rather see behaviour like VSCode and DEVONthink have (which don’t lock up), even if it means that Typora is "non-standard". Anything you can do to help resolve this issue, while maintaining the "balance" you’re after, will be much appreciated.
Any comment on the prospects of getting a fix?
If I duplicate a file, it works, and I can edit and save this new file.
however, if i create a new file, i edit it , but can not save this new file.
@derekzone Can TextEdit.app save this file?
I have the same issue around files being 'locked' and now Typora is telling me it doesn't have access to standard folders like Desktop and Documents. I can use Intellij IDEA and TextEdit.app to edit the 'locked' file without issue. The file is under source code control using git.