fastlane: Simulator timeout for Scan

New Issue Checklist

Issue Description

I am unable to run any test for Scan right now.

If it doesn’t timeout the build output states that the Tests Fail which I think is Xcode’s cryptic way of saying it took long to build.

The simulator is launched but it is black and never loads. XCTool and Xcode are able to run unit tests but xcodebuild is not.

Configuration Files

This was ran manually using scan.

Environment

fastlane version (fastlane -v): fastlane 1.66.0 Do you use bundler, rbenv or rvm? RVM

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 61 (22 by maintainers)

Commits related to this issue

Most upvoted comments

@TKBurner this report still applies to scan, please could you wait until we confirm the fix for scan works then we can close 😃

@kalle I’ve released snapshot 1.12.2 that includes the previously discussed workaround behind a feature switch.

Could you please upgrade your snapshot with:

gem update snapshot

and then try running:

FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 snapshot

and let me know if allows your test runs to succeed? Thanks! 🚀

Hello @mfurtak

Thanks for looking into this!

I have created a simple project that have the same problems as my real project and the workaround with open -a Simulator ... etc works. You can find it at https://github.com/kalle/FLbug.

Perhaps this is locale based? I use Swedish locale which uses , (comma) instead of . (dot) as decimal separator. I tried to set LANG, LC_* and __CF_USER_TEXT_ENCODING to en and US where applicable and run snapshot again but still got the same result. I’m not sure how ruby handle locale related things or if it is even the source of the problem here. But since snapshot modifies configuration files it might be worth looking into.

Anyway, since I really needed the screenshots I wrote a hacky clone of snapshot in python. I used open -a Simulator ... and liberal use of killall Simulator. Perhaps you can use that to instead of simctl if the root cause seems to be on Apple’s side?

Thanks, it seems that fixed the issue!

@rafaelnobrepd The behavior triggered by FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 is still not enabled by default, so if you’re not using that environment variable feature switch, it is definitely worth trying 👍

@mfurtak @TKBurner I can confirm this works:

  • Ran with no simulator running and scan was able to launch it and use it.
  • Ran with a simulator previously booted and scan was able to use it.
  • Ran with a simulator previously booted but a different device and scan was able to switch the correct simulator and use it.

Closing since this seems to be fixed, thanks for all your hard work everyone, @alexsup and I owe you a beer or a club mate 😉 !