0

Could not open file error

Key 8 years ago updated 8 years ago 5

I have experienced an error on multiple occasions where Textastic says it can't open a particular file. It says "The document {name_here} could not be opened". I can open other files, just not ones that I get the errors for.


There doesn't seem to be a pattern to the files that it can't open, but I think they have been a mixture of JS and PHP files. The only thing that fixes the problem is to quit and re-open Textastic; then I can open that file.


(Using latest version)

Could it be an encoding problem? Which text encoding do the files have?


Does the error have any additional details? Do you see something in the Console app (system log) when this happens?

It just happened to me again, so I checked the file encoding which is Unicode (UTF-8) with Unix line endings.


The console shows this error: 

4/26/13 10:28:48.616 PM sandboxd[1851]: ([804]) Textastic(804) deny file-read-data /path/to/file/fileName.js


The full log report for the error is here: http://temp-share.com/show/YgFHvBZSy


For some unknown reason, the Mac OS X sandbox daemon denies Textastic to read the file. Did you use the open panel to open the file?

Here's a thing you could try, maybe the the sandbox profile is corrupt:


  • quit Textastic
  • delete the following directory: ~/Library/Containers/com.textasticapp.textastic-mac (this will delete all of Textastic's preferences, sandbox data and custom bundles/templates)
  • restart Textastic and try again

I'll try this the next time it happens, but quitting the app and re-opening it solves the problem for a short time anyway so it will be difficult to tell initially if it worked. Also, I believe I opened the file using an Alfred workflow, but that's how I've been opening all of the files so I don't know why it would be that.