xcode The document "..." could not be saved - xcode

I use xcode 3.2.4 on snow leopard. Today when I tried to save a file on my project I get an error message saying: The document "nameOfFile.m" could not be saved. I tried reinstalling xcode but no luck. The file can be edited with other editors and I see the same behavior on all my projects as well as newly created projects. Any ideas?

Simply by rebooting the computer the issue was fixed.

We were having this problem in a lab environment where user files are mounted via NFS.
The client machines are running OS X 10.6.7 and the file server is running Debian Linux.
After much grief and reading /var/log/syslog on the client machine I discovered it was a subtle file locking / race condition issue with the file system. Evidently, when editing files in a "bundle" (e.g. as in an Xcode project), the OS is using some form of "safe writes" which involves writing transient data atomically to ~/Library/Caches/TemporaryItems/ (which of course is on the NFS mounted system) -- there is a race here that requires proper file locking. We hope we have fixed the problem by changing the nfs_mount options
as described in Mounting NFS volumes in OS X

Not sure why but the temp files ended in a odd state. In "/private/var/folders" I simply removed all the folders and it cleared up the problem
cd /private/var/folders
sudo rm -fR *
Note: never do a "sudo rm" unless you really know what you are doing. It can cause irrecoverable damage

I restarted XCode (by a force-quit, not just closing it) and that fixed it for me.

Make sure you have you mouse focused on the code area and not the file in the file list.

Cleaning the project (Product > Clean), then force quitting Xcode (Command + Option + Escape, select Xcode, click Force Quit) solved the issue for me. I'm not sure if the clean was necessary, but that was what I did. Upon re-opening the project, I let Xcode index the project before doing anything, then did a Build, and all is well.

Force quiting Xcode for me worked. I would recommend the same.

Hey........... even i faced the same problem..... But got the answer......
steps:
reveal in folder the project.
select the file that is locked
select 'GEt Info'
deselect ie uncheck the label 'LOCKED' in the Info.

I just ran into the same problem, then I noticed I ran out of disk space. You can disable the warning that pops up when you run low on disk space (perhaps not a wise thing to do). I did that a few days ago and was puzzled for a moment when this message appeared. They could've just said "Disk full" or something instead of "cannot save". Anyway if anyone ever runs into this just free up some disk space.
You might be able to save in an external editor because its not also building your app which might use up the little remaining space. It might also be why it worked after rebooting (if OS X cleaned up some cached stuff on reboot) so it seems plausible.
Either that or your HDD might have just crashed.
tic....tic....tic.....

In my Case, the File which was saying document could not be saved was basically Shortcut/Allies of the file present at another place.
I don't know why it was not able to save if it was opened by shortcut/allies in xcode but by overwriting(Copy and Paste) the orignal files to that shortcut my problem was solved.
Regards
Umair Bhatti

1.Right click on that file
2.Go to Show in Finder .
3.Click on get info .
4.Goto Sharing & Permission
Everyone,username,Fetching & selection ----You can choose appropriate read write option.

I have face this issue many times. I followed below steps to fixed this.
1. Select file->Show in Finder
2. Copy those file and past different destination.
3. Remove those file from xCode (to selecting show in finder)
4. Then again add those files from other destination to actual location
5. Clean code and run the code.

Another possible reason is that the file you are trying to modify is an alias (i.e. a soft link).
You will have to modify the source file directly in this case.

Thanks #Wayne Cochran,
When I use Xcode to save it, I rebooted the machine several times, and all failed.
So I changed to Visual Studio Code to edit and save. Then it's OK.
Just change the file editor

This can happen when you are working with a network hard drive (or are on a cloud) and not connected to the network (connection lost)

Related

"This type of file can harm your computer mac no keep option" - No "Keep" option? macOS HS

I have encountered the usual Chrome "feature" of displaying "this type of file can harm your computer mac no keep option" when trying to download a file from a filehosting website.
However, when the warning appears there is only ever a "discard" button and not one to "keep" the file as I have seen when using Windows...
Can anybody suggest anything?
Going to the downloads list (Command+Shift+J) shows you the Keep option.
#DickKennedy Helped resolve my woes with a workaround for this by going to Chrome settings and enabling the option "Ask where to save each file before downloading" in the downloads section.
This isn't a fix, but it certainly gets the job done!
Yes - super annoying issue. Luckily a small work-around that works is going to Window -> Downloads and clicking on "Keep" there.

Windows 10 and Netbeans: no write permissions

I've installed Netbeans 8.2. on my clean Windows 10 install. Now I want to set up a new project, but when I select my source folder I get the message 'Sources folder is not writable'.
Then I decided to just change my HTML code, but when I save I've got the message 'Cannot get exclusive access to: D:\Websites... (probably opened for reading)'.
I tried to open Netbeans as administrator, but nothing seems to work. Anybody who had the same problem and could solve it?
Thanks!
If the cause is same as me, check your Antivirus settings, and whitelist Netbeans.
I've experienced the same an hour ago, after checking the writing permissions and creating a new project all together, nothing worked. Then I remembered I have an antivirus (Bitdefender) with Ransomware protection for my documents folder, I went to the log (of Bitdefender) and yeah, it was blocked as suspicious software, just added it to the trusted list and it works fine now.
You might try running Netbeans as an administrator.
I solved the problem by allowing the "Netbeans.exe" file through Control folder access.
If someone finds it is not solved by the solution of #Osama Islam. Try to open the file like this:
Select the file in Projects window in netbeans --> right click on it --> Then select "Edit". ---> Now try to save the content.
I too faced the similar issue and not running any anti virus, the issue is mainly due to permission so I fixed it by giving full access to user for that particular folder, which fixed the problem
ICACLS "FolderPath" /INHERITANCE:e /GRANT:r username:(F) /T /C
Replace the FolderPath and username as per need
Reference: changing permission through command prompt
Just look for programs who have the file open. In my case I executed git diff myfile.js which was blocking the save process.
I faced such a problem today.
On windows 10, If you not installed any antivirus software, check your windows difender protection history. windows difender blocks the folder modification access. In protection history, find the relavent notification and select allow on device. now this error might be solved!

File History first backup never succeeds. Nothing happens

I have an Windows box, which originally had Windows 7 installed and was later on upgraded to Windows 10.
On Windows 10 I added a 3TB hard disk for backups. I set up the new hard disc as backup target and started the first backup. This now is some days ago, but whenever I check the status I get following message: File History is saving copies of your files for the first time.
On the backup disc nothing happens. There is created a folder M:\FileHistory\username\boxname\Data, but there are no files in it.
There is just a link (for whatever reason not a button) below, to stop the backup. When I restart it, I get the same message but nothing happens.
Anybody any idea, what could be the reason or what to do?
Thanks in advance...
Finally found the solution. Keep in mind, I use a german version of windows. Hence, the menu point names may not be accurately translated.
In the control center > system and security > file history > extended settings
There is a link to the event viewer related to backup events.
It had some messages telling it could not save a file in a given folder. Deleting the folder, and also the BACKUP-DRIVE:\FileHistory folder on the backup drive solved the issues.

DongFangInput keeps installing

have an application that keeps reinstalling itself even after uninstall. It's an app that helps you type in chinese characters. As you can see from the format of this message that it messes with my typing.
Can anyone please help?
PS:Idont even know how to at least turn it off because everything is in chinese.
I have the same problem since last Saturday (26/4).
I used unlocker as recommended by another website to remove the application. But my alt+shift and Window+space hot keys are both not working anymore. So I restored window back to a previous restore point for restoring the hot keys.
However, after a while the application reinstalled back.
I tried unhackme but the application reinstall after a few reboot. For the passed 1 week I've been fighting with this application.
On the 30/4, I was thinking whether to refresh my windows, suddenly I realised that I had copy an excel file from my client on 25/4. His computer same having the same problem. So I tried to delete the said excel file but it can't be deleted. So I use unlocker to delete the folder storing the excel file. than I use unhackme to remove all file/program related to Dongfanginput, use unlocker to delete the folder at program folder, restore window to a previous restore point. My computer is running smoothly for pass 2 days and hoping that the problem wouldn't come back again. (sorry for my poor English)

Where is ~/.config/MonoDevelop/ for MonoDevelop

I'm using Mac Snow Lepord and can't find "~/.config/MonoDevelop/" for the life of me. I have MonoDevelop (v2.2.2) up and running already, but when I tried to set up a template the IDE started having problems.
Namely, whenever I went to Monodevelop -> preferences-> Code Templates I would get an error saying "Argument cannont be null".
I tried removing MonoDevelop from my Mac and re-installing but that doesn't appear to fix this problem so I thought if I could find the above folder maybe I could remove that. However I am not sure how to find it. I put the address directly into Mac's "finder" search box and no results were returned.
Can anyone help?
Note: You are not going to see your .config directory in your user directory in finder unless you show hidden files. You are going to have to get there via bash in the Terminal.
The tidle ~ would normaly expand to your home directory, e.g. ~/foo.txt is /path/to/your_directory/foo.txt, depending on where 'home' is on any given system.
So, the file you are looking for is /Users/your_username/.config/MonoDevelop/ ...
Also, there are some shells / systems that simply do not support tidle expansion.
Since you are on a Mac, you'll actually have to go to ~/Library/Prefernces/MonoDevelop-2.x to do your install.

Resources