Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

macos

flutter

I'm running into an issue where my iMac, with over 100G free, gets Disk Full Error after running Flutter for an hour or so.

When I reboot I get dozens folders in my Trash "Recovered Files" that are around 2G each.

The issue is actually described fairly well here (with screenshots): https://github.com/flutter/flutter/issues/56270

enter image description here

However, the moderator closed every comment as "off topic" (seems like several people are having this problem). So I figured it may be a good idea to bring this here to see if anyone else has found a solution for this?

I'm running VSCode and when I run Flutter Doctor I'm 100% compliant. Using the latest Flutter/Dart/MacOS/Xcode/Android Studio versions. I am primarily building my Flutter app to macOS platform (desktop).

I tried the suggestions in the above issue post and none of these worked for me (re-installing cocoa pods, re-installing Xcode, re-installing Android Studio).

like image 451
William T. Avatar asked May 20 '20 00:05

William T.


Video Answer


3 Answers

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.

like image 83
Travis M. Avatar answered Oct 28 '22 18:10

Travis M.


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.

like image 34
Darren Humphrey Avatar answered Oct 28 '22 20:10

Darren Humphrey


Same here but happens also when just running Android Emulator.

This needs to be fixed A.S.A.P - its a dealbreaker!

like image 21
psimons Avatar answered Oct 28 '22 20:10

psimons