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

1,628

Solution 1

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.

Solution 2

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.

Solution 3

Same here but happens also when just running Android Emulator.

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

Share:
1,628
William T.
Author by

William T.

Updated on December 20, 2022

Comments

  • William T.
    William T. over 1 year

    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).

  • William T.
    William T. almost 4 years
    Have you confirmed this happens when the device is locked or unlocked? For me, if the device screen is unlocked it seems to be fine... However, expecting a dev to constantly unlock an attached device is a bit much.
  • Darren Humphrey
    Darren Humphrey almost 4 years
    It happens regardless of whether or not the device is locked. It's also killing performance.
  • Sven Amann
    Sven Amann almost 4 years
    I don't have any device in that list and still the problem occurs for me. I'll keep looking if there's a connection to my physical device being attached (through cable or wireless).