MacOS Xcode 10 claims device is out of space

Archiving a iOS build seems to be failing because the device is out of space.
I included part of the log.

This has completely halted our deployments.
Please fix.

** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: *** -[NSConcreteFileHandle writeData:]: No space left on device
Stack:
0   __exceptionPreprocess (in CoreFoundation)
1   objc_exception_throw (in libobjc.A.dylib)
2   +[NSException raise:format:] (in CoreFoundation)
3   -[NSConcreteFileHandle writeData:] (in Foundation)
4   -[DVTFileLogger logMessage:forAspect:logLevel:] (in DVTFoundation)
5   -[DVTLogAspect _logAtLogLevel:withFormat:] (in DVTFoundation)
6   __47-[DVTTask runLoggingOutputWithLogAspect:error:]_block_invoke (in     DVTFoundation)
7   __33-[NSConcreteFileHandle _monitor:]_block_invoke (in Foundation)
8   _dispatch_client_callout (in libdispatch.dylib)
9   _dispatch_continuation_pop (in libdispatch.dylib)
10   _dispatch_source_invoke (in libdispatch.dylib)
11   _dispatch_queue_serial_drain (in libdispatch.dylib)
12   _dispatch_queue_invoke (in libdispatch.dylib)
13   _dispatch_root_queue_drain_deferred_wlh (in libdispatch.dylib)
14   _dispatch_workloop_worker_thread (in libdispatch.dylib)
15   _pthread_wqthread (in libsystem_pthread.dylib)
16   start_wqthread (in libsystem_pthread.dylib)

/Users/distiller/project/.bundle/ruby/2.3.0/gems/fastlane-    2.104.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh: line 61: 29854 Abort trap: 6               xcodebuild "$@"
[15:07:02]: Exit status: 134

+---------------+----------------------------+
|             Build environment              |
+---------------+----------------------------+
| xcode_path    | /Applications/Xcode-10.app |
| gym_version   | 2.104.0                    |
| export_method | app-store                  |
| sdk           | iPhoneOS12.0.sdk           |
+---------------+----------------------------+

[15:07:03]: ▸ Touch /Users/distiller/Library/Developer/Xcode/DerivedData/App-    cnenjrnsocwikobtcucdcarxdcks/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/ios.app (in target:     App)
[15:07:03]: ▸     cd /Users/distiller/project
[15:07:03]: ▸     /usr/bin/touch -c     /Users/distiller/Library/Developer/Xcode/DerivedData/App-cnenjrnsocwikobtcucdcarxdcks/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/ios.app
[15:07:03]: ▸ ** ARCHIVE SUCCEEDED **

What sort of disk space consumption is your build taking, out of interest?

Hey Jon,

The archive looks to be able 1.2 Gb from previous builds.

It’s a pretty standard iOS app.

Probably has another Gb if you factor in the derived data.

Thanks

-Scott

Alright, well I agree it should not fall over on 2G of disk space requirements! Has your build increased in size recently?

We have not done anything substantial. But who knows what Xcode10 has brought into the process.

It didn’t start happening until we upgraded to the latest version.

Thanks

-Scott

1 Like

@halfer
I did some logging and it looks like the macOS comes out of the box supporting 69Gb when it allocates.
About 35 Gb or that are used before downloading our project from the github.

This leaves roughly 34 Gbs of space for dependencies, caches, derived data, archives and IPA. That must have been just enough before the new version of xcode, which is always bigger than last years.

We can easily close this 34Gb window with all the compiling and archiving we need to do. So, the log is true, the device ran out of space.

Is there anyway to allocate more space on the macOS deployments?

Do you have a large VCS history? You could try a shallow clone, so as not to drag in old commits that fill the disk uselessly. The checkout step is optional, so you can replace it with your own git commands.