Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcodebuild: error: Existing file at -resultBundlePath "/..sandbox/darwin-sandbox./execroot/.../test.outputs/test.xcresul #34

Open
jerrymarino opened this issue Jun 9, 2021 · 3 comments

Comments

@jerrymarino
Copy link
Contributor

I've encountered this on a recent PR: bazel-ios/rules_ios#246 . It seems like the simulator infrastructure is flaking, but writing a result bundle. Finally when it tries to re-launch, there's an existing result bundle so it can't retry. Note that this is ran inside of the sandbox ATM.

Please find the github action here:
https://github.com/bazel-ios/rules_ios/runs/2786242526

2021-06-09 17:47:48,662 Failed to launch test on simulator. Will relaunch again.
xcodebuild: error: Existing file at -resultBundlePath "/var/tmp/_bazel_runner/c2342bca25695567c8c3f3be166b56b3/sandbox/darwin-sandbox/1286/execroot/build_bazel_rules_ios/bazel-out/darwin-dbg/testlogs/tests/ios/unit-test/ExplicitHosted/test.outputs/test.xcresult"

2021-06-09 17:47:50,048 Failed to launch test on simulator. Will relaunch again.
xcodebuild: error: Existing file at -resultBundlePath "/var/tmp/_bazel_runner/c2342bca25695567c8c3f3be166b56b3/sandbox/darwin-sandbox/1286/execroot/build_bazel_rules_ios/bazel-out/darwin-dbg/testlogs/tests/ios/unit-test/ExplicitHosted/test.outputs/test.xcresult"
@keith
Copy link
Contributor

keith commented Jun 9, 2021

Definitely need to rm -rf the path before using it, this can happen when test flaky the subsequent flaky runs don't get an entirely fresh env

@jerrymarino
Copy link
Contributor Author

jerrymarino commented Jun 9, 2021

I think we'd need to cleanup the result bundle after the simulator fails to launch but prior to re-launching - on first glance it seems like this is happening inside of a fresh sandbox, but retrying within the action. e.g. the action it's self is retrying now as opposed to spawning another action

@jimmyhoran
Copy link

I've recently run into this exact issue with our CI. Be keen to know if there's any proposed fix or workaround for this. If not, should I be trying to rm -rf the results path prior to running all our tests targets, or might I need to do this prior to running each test target that uses a simulator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants