Error code -36 - File system corruption - Reinstall Avoided - Lessons learned

About six weeks ago, I started receiving file system errors, error code -36

I took it into Genius Bar and they ran diagnostics and everything was ok. After less than 1 year battery down to 89%

The error would pop up when I was just moving files but mainly prevented me I from merging folders to consolidate a bunch of folder backups.

I can duplicate the problem on files that are stored in iCloud. Often it does not happen when I test against files that are just on the hard drive.

I have a 2tb drive so I do not have optimize turned on. The files say that they are local.

I have a folder that I call Testing Area where I have 2 folders, one folder is called Test1 and the other is called Temp and in that I have a folder I call that I also call Test1 where I change the name of one of the files in the folder so that the folders are different.

Merging Folders - when you hold the option, key down and drag a folder into another folder that has a folder of the same name you get the option to merge providing that there are differences between the two folders.

When I hold down the option key and drag Test1 into Temp folder which also has the Test1 folder it asks me if I want to merge and I say yes and then I get an error -36.

From the Clean my Mac website

What is error code -36?

Before we tell you what to do when you see the error message, let’s talk about what it means. Error code -36 relates to actions in the Finder, such as moving, copying, or deleting files. It usually means that the Finder can’t read some or all of the data in the file. And the error message will helpfully tell you which file is giving problems. When you see the file name, you may notice that it has a ‘.’ before its name and an ‘’ later in the name. For example, ‘.DSStore’ is one file that may cause the error. That ‘.’ means the file is hidden in the Finder. And the error code -36 indicates that the file can’t be read or written.

What causes error code -36 on Mac?
Error -36 usually occurs when a file with a ‘.’ and ‘_’ in its name becomes corrupted, or there is some other problem with it. When that happens, the Finder is unable to work with the files you are trying to copy, move, or delete because it can’t find the information it needs.

The solution to the error, in most cases, is to merge the files causing the problem with their parent files using a Unix command. That will eliminate the problematic files while retaining the information they hold. As with every other command-line interaction on your Mac, this is done using Terminal. It’s straightforward to do, but you should make sure, as with all Terminal commands, that you type in the command exactly as it is displayed here:

  •   Go to Applications > Utilities.
    
  •   Double-click Terminal to launch it.
    
  •   Type: dot_clean
    
  •   In the Finder, navigate to the folder that contains the files you were trying to copy, move, or delete.
    
  •   Drag the folder onto the Terminal window after the command you just typed.
    
  •   You should now see the file path displayed after the command you typed.
    
  •   Press Return.
    
  •   Try moving, copying or deleting the files again.
    
  •   Quit Terminal
    

That helped w some files but not all.

EtreCheck Pro

I found a cool utility EtreCheck Pro for troubleshooting your Mac.

Example from a run on my older Mac.

EtreCheckPro Report - txt

EtreCheckPro version: 6.5.1 (6F003)
Report generated: 2021-08-29 19:24:42
Download EtreCheckPro from https://etrecheck.com
Runtime: 4:45
Performance: Good

Problem: Computer is restarting
Description:
System Crashing almost Daily
Disk Utility reports Partition Problem

Major Issues:
Anything that appears on this list needs immediate attention.
Time Machine backup out-of-date - The last Time Machine backup is over 10 days old.
Kernel panics - This system has experienced kernel panics. This could be a sign of hardware failure.

Minor Issues:
These issues do not need immediate attention but they may indicate future problems or opportunities for improvement.
Apps crashing - There have been numerous app crashes.
Unsigned files - There are unsigned software files installed. Apple has said that unsigned software will not run by default in a future version of the operating system.
System modifications - There are a large number of system modifications running in the background.
Vintage hardware - This computer may be considered vintage.
x86-only Apps - This computer has x86-only apps might not work on future versions of the operating system.
Kernel extensions present - This computer has kernel extensions that may not work in the future.
Sharing enabled - This computer has sharing services enabled that could be a security risk.

Moved on to First Aid

Ran first aid, while the system was running, and there were several problems reported.

And then ran first aid while in recovery mode.

I managed to get a clean run done, despite it initially reporting that it could not do the repairs because a full disk check was required. Multiple 2nd Level engineers didn’t know how to do that and fought against running “fsck” saying that that was no longer part of the M1 Mac OS.

The way to get around that run is to go into recovery mode, first aid and select view devices and then run First Aid against the device.

The case was escalated to engineering and they did find that Acronis was crashing frequently so I uninstalled that.

That was the last I heard from Engineering, there was no ownership of this case at Apple, and I kept getting different 2nd Level engineers, who took a run at this problem. That could be bad or good, and that eventually it was the fourth 2nd Level engineer that I spoke to who had the solution.

Time Machine First Aid errors

On one of the runs with First Aid, it indicated there were problems with the snap shots that are part of time machine. To get rid of them I went into recovery mode and then launch the terminal and from there ran tmutil

Take it down to bare metal and start over

I think that is a term that was originally developed in the windows environment.

Apple said to completely delete the drive and then reinstall using Migration Asst to move things back one by one.

Well there goes 2 weeks of my life.

I ran super Duper and created an external copy of my hard drive that I was able to boot into and run from, despite Apple saying that that was impossible.

I reinstalled the operating system several times, and tried migrating things back until I could find the problem.

The problem always kept reoccurring.

You guys were almost able to buy a $3500 M1 MacBook Pro cheap.

I easily spent over 45 hours troubleshooting this issue.

The Solution

Despite my skepticism, I followed the advice of the 4th 2nd Level technician that I was working with and unselected the option to have documents and desktop stored in iCloud.

I was thrilled to have the file system working again, and the only drawback is that I have a Documents folder on my hard drive, and then the original documents folder in the cloud but by setting up aliases it has made it only a minor inconvenience.

Cool tip to create alias’s

Hold Option Command while dragging file or folders and it will create aliases in the new location.