Closed postmechanical closed 8 years ago
Backed down to fastlane
1.97.2
with scan
0.8.0
and the problem went away.
Same issue here
From https://github.com/fastlane/fastlane/pull/5640/commits/b3e805ae68ce14aca654fd81bcf43f1c30943b2b from #5640:
The old logic allowed 'iPhone 6' to match on 'iPhone 6 8.1' even when the Xcode target required 9.3 or better.
Seems like the new logic only matches simulators with the exact version from the project's IPHONEOS_DEPLOYMENT_TARGET
, which doesn't seem like desired behavior.
I hope this is the same bug just fixed for #5731 orโฆI don't understand how to use "--device".
I believe this was fixed in https://github.com/fastlane/fastlane/pull/5744
Still getting same error with scan
0.11.3
.
@postmechanical If it's related to #5731, you have to wait for the Fastlane release instead of the Scan release.
Still getting same error with fastlane
1.100.0
@postmechanical This ticket is still open and will be closed in the next release, which is not the 1.100.0 one.
Issue still exists in fastlane
1.101.0
, #5744 has nothing to do with this.
As far, as I can see from code in #5640 and @jdhealy corretly mentioned new logic looks for simulator with exactly the same iOS version, which is found in deployment target, or version, you specified manually in device name.
So, to workaround it I've specified simulator names with versions, e.g. "iPhone 6s (9.3)" in device
parameter.
I think, new logic should look for simulator with same or higher version, than requested, not exactly the same
@SemenovAlexander Thanks for following up. What happens if you erase your simulators before running scan? That generally fixes this for affected users. Thanks!
@TKBurner : Erasing the simulator prior to running had no effect for me.
$ xcrun simctl list devices
== Devices ==
-- iOS 9.3 --
...
iPad Air 2 (6D7C718A-D664-4F6D-BA71-80A5985441F7) (Shutdown)
...
$ xcrun simctl erase 6D7C718A-D664-4F6D-BA71-80A5985441F7
$ bundle exec fastlane test
...
[00:03:04]: ------------------
[00:03:04]: --- Step: scan ---
[00:03:04]: ------------------
[00:03:04]: xcodebuild -list -workspace ./My\ Project.xcworkspace
[00:03:06]: Ignoring 'iPad Air 2', couldn't find matching simulator
[00:03:06]: Couldn't find any matching simulators for '["iPad Air 2"]' - falling back to default simulator
[00:03:07]: xcodebuild -list -workspace ./My\ Project.xcworkspace
...
[00:03:09]: fastlane finished with errors
As @SemenovAlexander stated, running with the version (i.e. 'iPad Air 2 (9.3)') works.
@TKBurner actually nothing happens, and nothing should happen, because of code in #5640 written in such manner.
In my projects I have iOS 8.0 deployment target, and all simulators are 9.3.
All works fine, if I pass device name with actual version, like this iPhone 6 (9.3)
(line 49 in detect_values.rb
will work).
However, if I pass simulator name without version (e.g. iPhone 6
) - scan can't find appropriate simulator, because it tries to find simulator with OS version, which is exactly matching deployment target (which is 8.0).
See line 51
@SemenovAlexander Thanks for following up. I circled back with the core team and we'll update this thread. It seems like this might be expected behavior for now, but certainly isn't desired because it causes lanes to break more often.
The biggest problem, of which this one is a small but significant symptom, is that almost every new version of these tools breaks existing workflows.
@TKBurner @ohwutup @KrauseFx @mfurtak โ Any update yet from the core team? Noticed a new version #6041 with this unaddressed and #5746 (which possibly addresses this, depending on what is actually desired) has been waiting on comments or review for a few weeks nowโฆ
Hey everyone, really sorry there is some difficulties with scan. I'm looking into https://github.com/fastlane/fastlane/pull/5746 right now, and make sure all edge cases are covered.
Thanks for your feedback @postmechanical, I can understand your frustration. The goal with fastlane is to never do any breaking changes, unless there is a major version bump involved. We haven't done any breaking release since the 1.0 release of each of the tools, however things might go wrong, especially for more advanced setups, where some features or tools are used differently than originally intended.
For this scan issue, the error was caused by an Xcode update, changing the way simulators are printed to the terminal, and therefore breaking the simulator selection of scan
. We're usually really fast updating the tools to work with the latest releases of Apple (both Xcode, and web services like iTunes Connect), however for some reason we misjudged the priority of this issue and put it aside initially.
I'm really sorry this happened, and we're working hard to provide a new release with a fix as soon as possible ๐
Short update on this, I just reviewed and merged https://github.com/fastlane/fastlane/pull/5746 (thanks @jdhealy for providing this PR ๐) and published a follow-up PR with https://github.com/fastlane/fastlane/pull/6054.
Please give the latest version from the master
branch a try and let me know if that works for you. Once I get a +1 I'll do a new release for this ๐
@KrauseFx : Works for me.
Seems to be working for me as well. ๐
@SandyChapman @ChristopherDrum Thanks so much for letting us know! Really happy you are back up and running with scan. Hope you have a great weekend ๐
Hi guys, I am using 1.104.0, and i still have this issue, scan is always reverting to the default simulator even though I have the simulator requested, has this fix made its way to the official release? If so have you guys made any changes to the way to describe simulators in -device
The one we are using is: "platform=iOS Simulator,name=iPhone 5s,OS=9.3" The output given by fastlane is:
[11:41:28]: Ignoring 'platform=iOS Simulator,name=iPhone 6,OS=9.0', couldnโt find matching simulator [11:41:28]: Couldn't find any matching simulators for '["platform=iOS Simulator,name=iPhone 6,OS=9.0"]' - falling back to default simulator [11:41:28]: Found simulator "iPhone 5s (9.3)"
Thanks
@ricardolpd Try using just "iPhone 6" as the simulator name. Or possibly "iPhone 6 (9.0)" if you want to lock the version.
@SandyChapman thanks it works now, it used to work using the device name in that way.
New Issue Checklist
Issue Description
Scan cannot find simulators
Complete output when running fastlane, including the stack trace and command used
Output of
instruments -s
:Configuration Files
Please copy the complete content of your
Fastfile
and any other configuration files you use below:N/A
Environment
scan version (run
scan -v
):0.11.2
Do you use bundler to execute fastlane (i.e.
bundle exec scan
)? YESDo you use a Ruby environment manager (e.g.
chruby
,rbenv
,rvm
)? NO