calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

Could not connect simulator #1380

Open shiratsu opened 6 years ago

shiratsu commented 6 years ago

Hi! I try to use it on xcode9. But it can't connect to ios simulator. because since xcode9 ios simulator's frameworks was changed CoreSimulator.framework to SimulatorKit.framework

DEVICE_TARGET="DDFFF869-ACBA-41CA-A4B7-2382760A91AD" bundle exec calabash-ios console
Running irb...
/Users/hiratsukashu/shot_for_ph2_by_swift/vendor/bundle/ruby/2.4.0/gems/edn-1.1.1/lib/edn/core_ext.rb:97: warning: constant ::Bignum is deprecated

#########################  Useful Methods  ##########################
     ids => List all the visible accessibility ids.
  labels => List all the visible accessibility labels.
    text => List all the visible texts.
   marks => List all the visible marks.
    tree => The app's visible view hierarchy.
   flash => flash(<query>); Disco effect for views matching <query>
 verbose => Turn debug logging on.
   quiet => Turn debug logging off.
    copy => Copy console commands to clipboard.
   clear => Clear the console.

Calabash says, "Dzień dobry"
calabash-ios 0.20.4> start_test_server_in_background

above command produced the following errors.

2018-05-31 15:46:09.816 iOSDeviceManager[40225:2035234] *** Assertion failure in +[FBSimulatorControlFrameworkLoader loadPrivateFrameworksOrAbort], /Users/moody/git/calabash/FBSimulatorControl/FBControlCore/Utility/FBControlCoreFrameworkLoader.m:41
2018-05-31 15:46:09.823 iOSDeviceManager[40225:2035234] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to private frameworks for FBSimulatorControl with error Error Domain=com.facebook.FBControlCore Code=0 "Attempting to load a file at path '/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework', but it does not exist" UserInfo={NSLocalizedDescription=Attempting to load a file at path '/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework', but it does not exist}'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff3752932b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fff5eba3c76 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff3752f0c2 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff3964b340 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
    4   FBControlCore                       0x00000001029eb4c9 +[FBControlCoreFrameworkLoader loadPrivateFrameworksOrAbort] + 458
    5   libobjc.A.dylib                     0x00007fff5eba62de CALLING_SOME_+initialize_METHOD + 19
    6   libobjc.A.dylib                     0x00007fff5eb973c9 _class_initialize + 288
    7   libobjc.A.dylib                     0x00007fff5eb96e8f lookUpImpOrForward + 228
    8   libobjc.A.dylib                     0x00007fff5eb96914 _objc_msgSend_uncached + 68
    9   iOSDeviceManager                    0x000000010293cd5f +[Simulator initialize] + 40
    10  libobjc.A.dylib                     0x00007fff5eba62de CALLING_SOME_+initialize_METHOD + 19
    11  libobjc.A.dylib                     0x00007fff5eb973c9 _class_initialize + 288
    12  libobjc.A.dylib                     0x00007fff5eb96e8f lookUpImpOrForward + 228
    13  libobjc.A.dylib                     0x00007fff5eb96914 _objc_msgSend_uncached + 68
    14  iOSDeviceManager                    0x0000000102934fa9 +[Device startTestOnDevice:sessionID:runnerBundleID:keepAlive:] + 144
    15  iOSDeviceManager                    0x000000010291327e +[StartTestCommand execute:] + 697
    16  iOSDeviceManager                    0x0000000102938ce4 +[CLI process:] + 1142
    17  iOSDeviceManager                    0x000000010290c6c5 main + 121
    18  libdyld.dylib                       0x00007fff5f7bd015 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

doesn't calabash-ios support xcode9?

JoeSSS commented 6 years ago

calabash-ios supports Xcode9. Did you update the calabash gem and the test server in your app as well?

jmoody commented 6 years ago

You are using ruby 2.4.0, which might be a problem.

We have supported Xcode 9 since the betas last June.

shiratsu commented 6 years ago

I'm using ruby 2.4 now. i will downgrade it.

shiratsu commented 6 years ago

Still error happend.

~/xxxxxxxxxxxxxxx on  ui_update201805! ⌚ 23:27:31
$ bundle exec calabash-ios download                                               2.3.0

----------Info----------
Inconsistent gem state: Cannot find framework: /Users/hiratsukashu/xxxxxxxxxxxxxxx/vendor/bundle/ruby/2.3.0/gems/calabash-cucumber-0.20.4/bin/../staticlib/calabash.framework.zip

~/xxxxxxxxxxxxxxx on  ui_update201805! ⌚ 23:27:46
$ bundle exec calabash-ios setup                                                  2.3.0
Checking if Xcode is running...
Found Project: shotworks_customer

----------Info----------
Inconsistent gem state: Cannot find framework: /Users/hiratsukashu/xxxxxxxxxxxxxxx/vendor/bundle/ruby/2.3.0/gems/calabash-cucumber-0.20.4/bin/../staticlib/calabash.framework.zip

~/xxxxxxxxxxxxxxx on  ui_update201805! ⌚ 23:27:52
$ ruby -b                                                                         2.3.0
ruby: invalid option -b  (-h will show valid options) (RuntimeError)

~/xxxxxxxxxxxxxxx on  ui_update201805! ⌚ 23:28:17
$ ruby -v                                                                         2.3.0
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin17]

~/xxxxxxxxxxxxxxx on  ui_update201805! ⌚ 23:28:20
$ cat Gemfile                                                                     2.3.0
source "https://rubygems.org"

gem "calabash-cucumber", "~> 0.20"
gem "json","1.8.6"