Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

The operation can’t be completed. An unexpected error occurred (error code -50).

Hello,

I have recently (in the last two months) been encountering the following error:

"The operation can’t be completed. An unexpected error occurred (error code -50)."

This error ocures after a few hours of use when my computer refueses to write anything to the disk. I can cause the dialog to apear when I attempt to creat a new folder on the desktop. Furthermore, when I attempt to run the following command in the terminal:

$ mkdir test

> mkdir: test: Invalid argument

As well, when I attempt to list the disks:

$ sudo diskutil list

> sudo: Can't mkdir /var/db/sudo/username: File exists

>

and nothing ever shows up.

So far the only solution I have to remidy this issue is to hold the power button until the system restarts. Sadly, the I lose all work that I did as I cannot write it to the HD.

After running permissions verification and check disk without incident, I bagan to believe that it was a hard drive failure, but after replacing the hard drive with a new one and restoring the files/install, I am begining to believe it is another problem. I have searched google and this board and attempted serveral solutions with no luck.

Any help would be apriciated.

MacBook Pro, OS X Mountain Lion (10.8.2), Mackbook Pro 13" mid-2009,

Posted on Feb 21, 2013 9:22 AM

Reply
5 replies

Feb 24, 2013 6:56 PM in response to Linc Davis

I have actually reinstalled from the Mountain Lion USB twice. I have not attempted a clean install as I do not want to go through the hassle of rebuilding my bootcamp partition at this point in time. I am beginning to think it has to do with a corrupt file somewhere on the disk.

The directory that you suggest I remove is actually my home directory "/var/db/sudo/echo68."

I believe that the error is a result of the drive becoming un-writable.

The issue occurred today and I poked around in the Console before forcing a shutdown in hope that there might be some indication as to why this is happening. This what I found recorded 2 minutes before the -50 error occurred:

"4:26:13 PM kernel: disk0s2: I/O error."

Feb 24, 2013 7:29 PM in response to echo68

The boot drive is failing, or you have some other hardware fault.

Back up all data immediately, then make a "Genius" appointment at an Apple Store to have the machine tested.

If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to bare metal from any of them.) Don’t erase the recovery partition, if present.

*An SSD doesn't need to be zeroed.

Mar 4, 2013 11:39 AM in response to Linc Davis

I was able to back up all my data without incident with time machine. I then performed a secure erase of the hard drive through Disk Utilities on my Mountain Lion install disk. I then installed Mountain Lion on the erased disk and only restored my documents and a few select files. So far so good, no errors. If it continues to run like this, I will assume my issue was with a bad sector on the disk that was corrected after the 0s write-through.

Thank you for your help and advice. If the issue rears its ugly head again, I'll be heading to my local apple store for a Genius appointment.

May 30, 2014 9:32 AM in response to echo68

Hi!


I am experiencing this exact issue right now. I already completely erased my MacBook Pro (Mid 2010) and clean-installed Mavericks from USB.

Disk Utility, fsck and Apple Hardware Test do not flag the HDD als faulty, neither is the S.M.A.R.T status bad.

I suspect the HDD to be failing slowly -- but how can I verify this?


Thanks!

Alex


(I have an up-to-date TimeMachine Backup, so everything good there.)

The operation can’t be completed. An unexpected error occurred (error code -50).

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.