calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 368 forks source link

Calabash doesn't work with Xcode 10.2 #1407

Closed penknife closed 5 years ago

penknife commented 5 years ago

When I try to launch calabash console on new simulator iOS version 12.2, I have got ArgumentError (Could not find a device with a UDID or name matching 'iPad Air (12.2)') instruments -s devices shows me that this version is available Command which i use DEVICE_TARGET="iPad Air (12.2)" APP_BUNDLE_PATH="App_name-cal.app" calabash-ios console Simulator version Version 10.2 Xcode version 10.2

AqaSquad commented 5 years ago

Have you gotten this to work on Xcode versions older than 10.2?

What happens if you try to use the device udid for DEVICE_TARGET and APP env var instead of APP_BUNDLE_PATH pointing to your fully qualified application path?

JoeSSS commented 5 years ago

it seems like Calabash do not work with latest Xcode version on the moment. From the first look, it seems like Apple changed the way they display names and versions and Calabash is very confused (saying that for example the iOS version is 0.0).

jmoody commented 5 years ago

The fix will be in run-loop. See the simctl.rb and device.rb files for how the output from xcrun simctl is parsed.

In the meantime, you can probable use: DEVICE_TARGET=<UDID> => the identifier of the simulator.

JoeSSS commented 5 years ago

just DEVICE_TARGET won't help, the next problem (at least from start_test_server_in_background)_ is iOS version is 0.0

penknife commented 5 years ago

Yeah when u use UDID RuntimeError ( Invalid Xcode and iOS combination:

Xcode version: 10.2 iOS version: 0.0.0

AlexWellsHS commented 5 years ago

im getting a different error:

export DEVICE_TARGET=7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38
export DEVICE_ENDPOINT=http://10.10.11.88:37265
bundle exec calabash-ios console
calabash-ios 0.21.8> start_test_server_in_background
RunLoop::Shell::Error:
There was an error executing:

/Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id 7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38

The command generated this output:

This copy of libswiftCore.dylib requires an OS version prior to 10.14.4.

    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/shell.rb:116:in `run_shell_command'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ios_device_manager.rb:146:in `launch'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:1474:in `launch_cbx_runner'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:313:in `launch'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:184:in `run'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop.rb:113:in `run'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:414:in `block in new_run_loop'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:in `times'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:in `new_run_loop'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:365:in `relaunch'
    from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/core.rb:1576:in `start_test_server_in_background'
    from (irb):1
    from /Users/alexwells/.rbenv/versions/2.3.1/bin/irb:11:in `<main>'
JoeSSS commented 5 years ago

Hey, this branch makes it start (at least in simulator) https://github.com/xing/run_loop/tree/10_2_compat_proposal

On Wed 27. Mar 2019 at 17:06, AlexWellsHS notifications@github.com wrote:

im getting a different error:

export DEVICE_TARGET=7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38 export DEVICE_ENDPOINT=http://10.10.11.88:37265 bundle exec calabash-ios console calabash-ios 0.21.8> start_test_server_in_background RunLoop::Shell::Error: There was an error executing:

/Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id 7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38

The command generated this output:

This copy of libswiftCore.dylib requires an OS version prior to 10.14.4.

from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/shell.rb:116:in run_shell_command' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ios_device_manager.rb:146:inlaunch' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:1474:in launch_cbx_runner' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:313:inlaunch' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:184:in run' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop.rb:113:inrun' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:414:in block in new_run_loop' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:intimes' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:in new_run_loop' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:365:inrelaunch' from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/core.rb:1576:in start_test_server_in_background' from (irb):1 from /Users/alexwells/.rbenv/versions/2.3.1/bin/irb:11:in

'

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/calabash/calabash-ios/issues/1407#issuecomment-477228651, or mute the thread https://github.com/notifications/unsubscribe-auth/ARTqPDyfnzoVbyJCNMernqFrO4_Ue_ekks5va5cFgaJpZM4cLrw5 .

AqaSquad commented 5 years ago

Tried a build of run_loop with your branch and it got past the Invalid Xcode and iOS combination on simulator. Thanks @JoeSSS !

Oddly enough this issue was occurring on Mojave even with Xcode 10.1 / Command Line tools 10.1.

@JoeSSS any plans to PR your proposal or is this already being fixed by @jmoody ?

katia-kozlova commented 5 years ago

Is there any estimation when this will be fixed?

jmoody commented 5 years ago

I released run-loop 4.2.0 today. Try updating.

I have not done any QA on DeviceAgent and iOSDeviceManager for Xcode 10.2.

katia-kozlova commented 5 years ago

worked for me, thank you a lot!

lmr3 commented 5 years ago

I have using run-loop 4.2.0 , but the error still exists.

im getting a different error:

export DEVICE_TARGET=7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38
export DEVICE_ENDPOINT=http://10.10.11.88:37265
bundle exec calabash-ios console
calabash-ios 0.21.8> start_test_server_in_background
RunLoop::Shell::Error:
There was an error executing:

/Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id 7b0a804bb7193bdf3bb8b0063e7ece741d0c0c38

The command generated this output:

This copy of libswiftCore.dylib requires an OS version prior to 10.14.4.

  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/shell.rb:116:in `run_shell_command'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/ios_device_manager.rb:146:in `launch'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:1474:in `launch_cbx_runner'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:313:in `launch'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop/device_agent/client.rb:184:in `run'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.1.0/lib/run_loop.rb:113:in `run'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:414:in `block in new_run_loop'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:in `times'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:412:in `new_run_loop'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/launcher.rb:365:in `relaunch'
  from /Users/alexwells/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.8/lib/calabash-cucumber/core.rb:1576:in `start_test_server_in_background'
  from (irb):1
  from /Users/alexwells/.rbenv/versions/2.3.1/bin/irb:11:in `<main>'
jmoody commented 5 years ago

We have fixed that bug. I will try to make a release soon. If you want to try building a new version of iOSDeviceManager and installing it into run_loop, ping me on Gitter.