Flutter - Disk Full Error - A Document Being Saved by xcdevice

Can confirm, running flutter with an attached ios device eats disk space.

This is happening to myself and another developer on my team. I lost 200 GB of disk space yesterday. It's a frustrating productivity killer.

  • I am using the latest flutter
  • flutter doctor reports everything as fine
  • xcrun --find simctl is fine
  • Using Android studio 3.6.3
  • Latest patched Catalina 10.15.4

This morning I opened the Android Studio IDE with an android device and an ios device connected. I opened a get info window on my hard drive and left it open. Then I did nothing but watch the info window. No builds or anything. Over the course of a couple minutes, I watched 7 GB disappear.

I shut down the IDE and the loss stopped. I reopened the IDE with only the android device attached. I waited and watched for a few minutes. No loss of disk space.

Then I reopened the IDE with just an ipad attached and the losses started again. Then I unplugged the ipad and left the IDE open and the losses stopped.


I actually ran into this issue about a week ago. The comment linked to had put me on the right track, where they mentioned it only happens when they have an iOS device attached to their machine.

If you see something like this error in your VSCode output log when launching your app, then it's likely the same issue.

Failed _shouldMakeReadyForDevelopment

If you have a device attached and it's locked, I believe something in the Flutter env attempts a connection over and over causing these files to fill up.

However, this happened to me once even when I didn't attach a device and I found out it was because I had "wirelessly" attached a device in Xcode when I was doing iOS development for another project. So just sitting at my desk with my iPhone nearby was enough to cause it to try to connect over and over again, even if it wasn't attached.

I removed my iPhone from Xcode's wireless device list and that seems to fix it.

Tags:

Macos

Flutter