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

[scan] Test crashed with signal kill before starting test execution #21025

Closed
4 tasks done
testableapple opened this issue Feb 6, 2023 · 5 comments · Fixed by #21026
Closed
4 tasks done

[scan] Test crashed with signal kill before starting test execution #21025

testableapple opened this issue Feb 6, 2023 · 5 comments · Fixed by #21026

Comments

@testableapple
Copy link
Contributor

New Issue Checklist

Issue Description

Sometimes, UI tests crash on startup on CI (see this job run as an example)

Command executed
  scan_options = {
    project: xcode_project,
    scheme: scheme,
    testplan: scheme,
    result_bundle: true,
    devices: device,
    number_of_retries: 3
  }
  scan(
    scan_options.merge(
      clean: true,
      build_for_testing: true
    )
  )
  scan(
    scan_options.merge(
      test_without_building: true,
      derived_data_path: lane_context[SharedValues::SCAN_DERIVED_DATA_PATH],
      only_testing: only_testing_batch
    )
  )
Complete output when running fastlane, including the stack trace and command used
2023-02-02 15:23:58.171 xcodebuild[16883:44216] [MT] IDETestOperationsObserverDebug: 462.731 elapsed -- Testing started completed.
2023-02-02 15:23:58.171 xcodebuild[16883:44216] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2023-02-02 15:23:58.171 xcodebuild[16883:44216] [MT] IDETestOperationsObserverDebug: 462.731 sec, +462.731 sec -- end
Testing failed:
	StreamChatUITestsAppUITests-Runner (19377) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Users/runner/work/stream-chat-swift/stream-chat-swift/fastlane/test_output/StreamChatUITestsApp.xcresult))

** TEST EXECUTE FAILED **
[15:24:07]: Exit status: 65

Environment

Gem Version Update-Status
fastlane 2.211.0 ✅ Up-To-Date
@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@TomaszLizer
Copy link

@alteral Do you think it is fastlane related? Have you tried running it locally?
I am facing similar issue recently and what I noticed is that pipeline started to failing after runner image update (see my issue: actions/runner-images#7090).
Have you found solution or maybe narrowed what is root cause of that?

@testableapple
Copy link
Contributor Author

Hi @TomaszLizer, seems like the ticket you linked reports the error when fastlane exits with the signal abrt. When this ticket is about signal kill. I don't think they are related to each other.

Regarding the original issue I created, I don't think it's fastlane related either, it's more like a CI service performance issue (Github Actions in my case) when Simulator is stuck during simctl boot command execution. I've opened a PR to prevent this from the fastlane side.

After I implemented the execution of simctl bootstatus command on CI straight before starting fastlane scan, this error did not pop up anymore.

@TomaszLizer
Copy link

@alteral In the end I think root cause was similar - we are using github actions too and prelaunching simulator fixed issue on our side. Also that wasn't reproducible locally nor on simpler projects.
Hope your PR gets merged soon so that no one else faces it - such kind of "non reproducible" issues are the worst 😬

@testableapple
Copy link
Contributor Author

@TomaszLizer, nice! Really glad that pre-booting a simulator helped you too 🙂

Hope your PR gets merged soon so that no one else faces it - such kind of "non reproducible" issues are the worst 😬

Yeah, 100%! Hopefully fastlane core team will be able to take a look at my PR someday.

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