fastlane: No such file or directory / DerivedData problem
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
While running fastlane, we see
Testing failed:
--
| Apollo:
| Error opening '/Users/anka/Library/Developer/Xcode/DerivedData/PROJECT-ezreysvdqtkpckdefbeubhgbgcbr/ModuleCache.noindex/Swift-17JDXFH2OM8DQ.swiftmodule' for output: No such file or directory
| Unable to load standard library for target 'x86_64-apple-ios9.0-simulator'
|
| ** TEST FAILED **
| ERROR [2019-11-30 10:07:20.19]: Exit status: 65
Testing failed:
--
| Texture:
| Failed writing record 'NSPort.h-7J4W6V3K363W': failed to rename '/Users/anka/Library/Developer/Xcode/DerivedData/PROJECT-ezreysvdqtkpckdefbeubhgbgcbr/Index/DataStore/v5/records/3W/NSPort.h-7J4W6V3K363W-temp-62a207b6' to '/Users/anka/Library/Developer/Xcode/DerivedData/PROJECT-ezreysvdqtkpckdefbeubhgbgcbr/Index/DataStore/v5/records/3W/NSPort.h-7J4W6V3K363W': No such file or directory
▸ Touching EosioSwiftAbieosSerializationProvider.bundle
--
| ** ARCHIVE FAILED **
|
|
| The following build commands failed:
| CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
| CompileSwift normal arm64
| (2 failures)
| ERROR [2019-11-27 08:05:28.41]: Exit status: 65
|
| +---------------+-------------------------+
| \| Build environment \|
| +---------------+-------------------------+
| \| xcode_path \| /Applications/Xcode.app \|
| \| gym_version \| 2.134.0 \|
| \| export_method \| app-store \|
| \| sdk \| iPhoneOS13.1.sdk \|
| +---------------+-------------------------+
|
| INFO [2019-11-27 08:05:28.43]: ▸ SetMode u+w,go-w,a+rX /Users/anka/Library/Developer/Xcode/DerivedData/PROJECT-ezreysvdqtkpckdefbeubhgbgcbr/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/EosioSwiftAbieosSerializationProvider.bundle
| INFO [2019-11-27 08:05:28.43]: ▸ cd /Users/anka/PROJECT-ios/Pods
| INFO [2019-11-27 08:05:28.43]: ▸ export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/anka/bundle/ruby/2.6.0/bin:/Users/anka/.rvm/gems/ruby-2.6.3/bin:/Users/anka/.rvm/gems/ruby-2.6.3@global/bin:/Users/anka/.rvm/rubies/ruby-2.6.3/bin:/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.:/.rvm/bin:/usr/sbin:/sbin:/Users/anka/.rvm/bin"
| INFO [2019-11-27 08:05:28.43]: ▸ /bin/chmod -RH u+w,go-w,a+rX /Users/anka/Library/Developer/Xcode/DerivedData/PROJECT-ezreysvdqtkpckdefbeubhgbgcbr/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/EosioSwiftAbieosSerializationProvider.bundle
| INFO [2019-11-27 08:05:28.43]:
| ERROR [2019-11-27 08:05:28.43]: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
- This happens with both tests and builds (pointing me to the system/environment).
- It’s rare and only happens around once a day (we run build + tests once every 30 minutes).
- We’re using Catalina (10.15.1) and XCode 11.1.
- Each execution of fastlane is performed on a fresh VM (we use Anka which is similar to docker), though, we also
clear_derived_data
at the end of each.
Disk space was my first suspicion, however, we’ve bumped the disk space available and it still throws the error.
If fastlane/tests/build tries to write files to DerivedData, and it can’t, shouldn’t it throw errors?
Command executed
bundle exec fastlane tests
Complete output when running fastlane, including the stack trace and command used
I am unable to provide more details due to the sensitivity of the project
ERROR [2019-11-30 10:07:20.34]: fastlane finished with errors -- | /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/interface.rb:163:in `build_failure!': [!] Error building the application. See the log above. (FastlaneCore::Interface::FastlaneBuildFailure) | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/error_handler.rb:31:in `handle_build_error' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:70:in `block in test_app' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/command_executor.rb:89:in `execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:61:in `test_app' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:22:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/manager.rb:18:in `work' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/actions/run_tests.rb:23:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:227:in `chdir' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing' | from Fastfile:77:in `block (2 levels) in parsing_binding' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/lane.rb:33:in `call' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:45:in `chdir' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:45:in `execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/bin/fastlane:23:in `<top (required)>' | from /Users/anka/bundle/ruby/2.6.0/bin/fastlane:23:in `load' | from /Users/anka/bundle/ruby/2.6.0/bin/fastlane:23:in `<main>' | from /Users/anka/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:in `eval' | from /Users/anka/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:in `<main>' | /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/interface.rb:163:in `build_failure!': Error building the application. See the log above. (FastlaneCore::Interface::FastlaneBuildFailure) | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/error_handler.rb:31:in `handle_build_error' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:70:in `block in test_app' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/command_executor.rb:89:in `execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:61:in `test_app' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/runner.rb:22:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/scan/lib/scan/manager.rb:18:in `work' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/actions/run_tests.rb:23:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:227:in `chdir' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing' | from Fastfile:77:in `block (2 levels) in parsing_binding' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/lane.rb:33:in `call' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:45:in `chdir' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/runner.rb:45:in `execute' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!' | from /Users/anka/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off' | from /Users/anka/bundle/ruby/2.6.0/gems/fastlane-2.137.0/bin/fastlane:23:in `<top (required)>' | from /Users/anka/bundle/ruby/2.6.0/bin/fastlane:23:in `load' | from /Users/anka/bundle/ruby/2.6.0/bin/fastlane:23:in `<main>' | from /Users/anka/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:in `eval' | from /Users/anka/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:in `<main>'
Environment
### Stack
Key | Value |
---|---|
OS | 10.15.1 |
Ruby | 2.6.3 |
Bundler? | true |
Git | git version 2.21.0 (Apple Git-122) |
Installation Source | ~/bundle/ruby/2.6.0/bin/fastlane |
Host | Mac OS X 10.15.1 (19B88) |
Ruby Lib Dir | ~/.rvm/rubies/ruby-2.6.3/lib |
OpenSSL Version | OpenSSL 1.1.1d 10 Sep 2019 |
Is contained | false |
Is homebrew | false |
Is installed via Fabric.app | false |
Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
Xcode Version | 11.1 |
System Locale
Variable | Value | |
---|---|---|
LANG | en_US.UTF-8 | ✅ |
LC_ALL | en_US.UTF-8 | ✅ |
LANGUAGE |
fastlane files:
`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
# By default, fastlane will send which actions are used
# No personal data is shared, more information on https://github.com/fastlane/enhancer
# Uncomment the following line to opt out
opt_out_usage
default_platform(:ios)
def get_pod(repo_name)
puts "cleaning #{repo_name} directory"
`rm -rf ../../#{repo_name}`
puts 'cloning #{repo_name}'
`git clone git@github.com:EOSIO/#{repo_name}.git ../../#{repo_name}`
end
# Open Keychain and allow certs to be installed
sh "echo $SYSTEM_PASSWORD | security set-key-partition-list -S apple-tool:,apple: -s -k $SYSTEM_PASSWORD ~/Library/Keychains/login.keychain-db"
sh "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" # Select proper Xcode Version (https://github.com/fastlane/fastlane/issues/12662)
platform :ios do
desc "Description of what the lane does"
lane :custom_lane do
end
lane :build do
sh("cd ../&& xcodegen generate -s project-ci.yml")
cocoapods(
repo_update: true
)
increment_build_number build_number: (ENV["BUILDKITE_BUILD_NUMBER"] || 1)
produce(
app_identifier: 'COM.WEBSITE.PROJECT.internal',
app_name: 'PROJECT Internal',
skip_itc: true,
)
modify_services(
username: "automation@WEBSITE.COM",
app_identifier: "COM.WEBSITE.PROJECT.internal",
services: {
push_notification: "on",
associated_domains: "on",
})
match(type: "appstore")
match(type: "development")
match(type: "adhoc",
app_identifier: "COM.WEBSITE.PROJECT.internal")
pem()
sync_code_signing(type: "appstore")
build_app()
clear_derived_data
end
lane :tests do
sh("cd ../&& xcodegen generate -s project-ci.yml")
cocoapods(
repo_update: true
)
run_tests(scheme: "PROJECT",
devices: ["iPhone X"],
xcpretty_args:"--report junit")
end
lane :beta do
upload_to_testflight(
ipa: "PROJECT.ipa",
beta_app_feedback_email: 'automation@WEBSITE.COM',
skip_waiting_for_build_processing: true)
end
clear_derived_data
end
`./fastlane/Appfile`
app_identifier("COM.WEBSITE.PROJECT.internal") # The bundle identifier of your app
apple_id("automation@WEBSITE.COM") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
fastlane gems
Gem | Version | Update-Status |
---|---|---|
fastlane | 2.137.0 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem | Version |
---|---|
did_you_mean | 1.3.0 |
bundler | 1.17.3 |
etc | 1.0.1 |
forwardable | 1.2.0 |
CFPropertyList | 3.0.1 |
concurrent-ruby | 1.1.5 |
i18n | 0.9.5 |
minitest | 5.13.0 |
thread_safe | 0.3.6 |
tzinfo | 1.2.5 |
activesupport | 4.2.11.1 |
public_suffix | 2.0.5 |
addressable | 2.7.0 |
atomos | 0.1.3 |
babosa | 1.0.3 |
claide | 1.0.3 |
fuzzy_match | 2.0.4 |
nap | 1.1.0 |
cocoapods-core | 1.7.5 |
cocoapods-deintegrate | 1.0.4 |
cocoapods-downloader | 1.3.0 |
cocoapods-plugins | 1.0.0 |
cocoapods-search | 1.0.0 |
cocoapods-stats | 1.1.0 |
netrc | 0.11.0 |
cocoapods-trunk | 1.4.1 |
cocoapods-try | 1.1.0 |
colored2 | 3.1.2 |
escape | 0.0.4 |
fourflusher | 2.3.1 |
gh_inspector | 1.1.3 |
molinillo | 0.6.6 |
ruby-macho | 1.4.0 |
nanaimo | 0.2.6 |
xcodeproj | 1.13.0 |
cocoapods | 1.7.5 |
colored | 1.2 |
highline | 1.7.10 |
commander-fastlane | 4.4.6 |
declarative | 0.0.10 |
declarative-option | 0.1.0 |
digest-crc | 0.4.1 |
unf_ext | 0.0.7.6 |
unf | 0.1.4 |
domain_name | 0.5.20190701 |
dotenv | 2.7.5 |
emoji_regex | 1.0.1 |
excon | 0.69.1 |
multipart-post | 2.0.0 |
faraday | 0.17.1 |
http-cookie | 1.0.3 |
faraday-cookie_jar | 0.0.6 |
faraday_middleware | 0.13.1 |
fastimage | 2.1.7 |
jwt | 2.1.0 |
memoist | 0.16.1 |
multi_json | 1.14.1 |
os | 1.0.1 |
signet | 0.12.0 |
googleauth | 0.6.7 |
httpclient | 2.8.3 |
mime-types-data | 3.2019.1009 |
mime-types | 3.3 |
uber | 0.1.0 |
representable | 3.0.4 |
retriable | 3.1.2 |
google-api-client | 0.23.9 |
google-cloud-env | 1.3.0 |
google-cloud-core | 1.4.1 |
google-cloud-storage | 1.16.0 |
json | 2.2.0 |
mini_magick | 4.9.5 |
multi_xml | 0.6.0 |
plist | 3.5.0 |
rubyzip | 1.3.0 |
security | 0.1.3 |
naturally | 2.2.0 |
simctl | 1.6.6 |
slack-notifier | 2.3.2 |
terminal-notifier | 2.0.0 |
unicode-display_width | 1.6.0 |
terminal-table | 1.8.0 |
tty-screen | 0.7.0 |
tty-cursor | 0.7.0 |
tty-spinner | 0.9.1 |
word_wrap | 1.0.0 |
rouge | 2.0.7 |
xcpretty | 0.3.0 |
xcpretty-travis-formatter | 1.0.0 |
generated on: 2019-12-03
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 25 (1 by maintainers)
Updating macOS to 10.15.3 solved the issue for us.
No virtual machine. Plain good Mac mini with Catalina.
@choli No update on my side.
No third party dependency. Plain good self-contained Xcode workspace.
Yes, we use default cocoapods repo, which is CDN I believe
Found this thread by googling failure message. We experience the same issue even though we don’t use fastlane, which makes me feel it’s
xcodebuild
bugAll versions of 11.x are showing this. I even tried 11.3_beta
Hard for us to downgrade the CI server and perform tests. So no, I did not test with older versions.