Closed JaniJegoroff closed 9 years ago
Similar for me. From the calabash-ios console, or from cucumber, touch is now timing out. Query is ok. Touch worked with Xcode 6.0.1 and Calabash 0.11.0. Updating to Xcode 6.1 broke touch. Updating to Calabash 0.11.1 did not help.
$ touch("view marked:'Menu'") Sending UIA command uia.tapOffset('{:x 28.5, :y 42}') RuntimeError: uia action failed because: Timed out running command uia.tapOffset('{:x 28.5, :y 42}')
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/uia.rb:31:in `uia'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/uia.rb:319:in `uia_handle_command'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/uia.rb:138:in `uia_tap_offset'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/actions/instruments_actions.rb:93:in `query_action'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/actions/instruments_actions.rb:15:in `touch'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/core.rb:1095:in `query_action_with_options'
from /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.1/lib/calabash-cucumber/core.rb:174:in `touch'
from (irb):6
from /usr/bin/irb:12:in `<main>'
$ calabash-ios version 0.11.1
$ server_version['version'] "0.11.1"
$ Calabash::Cucumber::MIN_SERVER_VERSION "0.11.1"
$ xcrun xcodebuild -version Xcode 6.1 Build version 6A1052d
$ xcrun instruments -s devices Known Devices: tlakingmbpx9 [090106E4-4262-57EE-BDFB-50572BE63873] Resizable iPad (8.1 Simulator) [89B96B5A-999D-40E6-8EF1-D7CCEB55FF42] Resizable iPhone (8.1 Simulator) [5C622E6F-2366-44D5-B5C8-0FF564131007] iPad 2 (7.1 Simulator) [35377EDF-3A8E-4968-B190-EBF524D5020C] iPad 2 (8.1 Simulator) [C9CAA90E-9B15-479E-AAB8-8AEFDB5E37CD] iPad Air (7.1 Simulator) [989E6EA3-20AA-426A-930A-821A3D73FB5C] iPad Air (8.1 Simulator) [A9E9CCE8-BAF4-4D1E-A3D6-70781554749C] iPad Retina (7.1 Simulator) [646F1745-A02E-4CB8-AEF7-694F12E62153] iPad Retina (8.1 Simulator) [A8D1C2B0-EC95-4E6E-9AE8-2F992F554995] iPhone 4s (7.1 Simulator) [B835D97B-FB3B-4BD9-B36F-4B93391ADA98] iPhone 4s (8.1 Simulator) [13177A84-60B0-4FCA-908D-6388479C0797] iPhone 5 (7.1 Simulator) [0C31C69B-2A18-4725-9D9F-D029D3091765] iPhone 5 (8.1 Simulator) [CB268E78-2B77-4DB8-940A-77C76C1DFD86] iPhone 5s (7.1 Simulator) [6242F629-DC76-4DEB-8660-95B52DB53B1C] iPhone 5s (8.1 Simulator) [37E0EFFE-75BD-4844-BF61-272BC02C51C0] iPhone 6 (8.1 Simulator) [FC933E1F-A7EF-4D58-8238-34AA30743C55] iPhone 6 Plus (8.1 Simulator) [B1AB371A-2601-4DD8-8C73-EB31D4252399]
$ xcrun simctl list == Device Types == iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s) iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5) iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s) iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus) iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6) iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2) iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina) iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air) Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone) Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad) == Runtimes == iOS 7.0 (7.0 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-0) (unavailable, runtime path not found) iOS 7.1 (7.1 - 11D167) (com.apple.CoreSimulator.SimRuntime.iOS-7-1) iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1) == Devices == -- iOS 7.0 -- -- iOS 7.1 -- iPhone 4s (B835D97B-FB3B-4BD9-B36F-4B93391ADA98) (Shutdown) iPhone 5 (0C31C69B-2A18-4725-9D9F-D029D3091765) (Shutdown) iPhone 5s (6242F629-DC76-4DEB-8660-95B52DB53B1C) (Shutdown) iPad 2 (35377EDF-3A8E-4968-B190-EBF524D5020C) (Shutdown) iPad Retina (646F1745-A02E-4CB8-AEF7-694F12E62153) (Shutdown) iPad Air (989E6EA3-20AA-426A-930A-821A3D73FB5C) (Shutdown) -- iOS 8.1 -- iPhone 4s (13177A84-60B0-4FCA-908D-6388479C0797) (Shutdown) iPhone 5 (CB268E78-2B77-4DB8-940A-77C76C1DFD86) (Shutdown) iPhone 5s (37E0EFFE-75BD-4844-BF61-272BC02C51C0) (Shutdown) iPhone 6 Plus (B1AB371A-2601-4DD8-8C73-EB31D4252399) (Shutdown) iPhone 6 (FC933E1F-A7EF-4D58-8238-34AA30743C55) (Shutdown) iPad 2 (C9CAA90E-9B15-479E-AAB8-8AEFDB5E37CD) (Shutdown) iPad Retina (A8D1C2B0-EC95-4E6E-9AE8-2F992F554995) (Shutdown) iPad Air (A9E9CCE8-BAF4-4D1E-A3D6-70781554749C) (Shutdown) Resizable iPhone (5C622E6F-2366-44D5-B5C8-0FF564131007) (Shutdown) Resizable iPad (89B96B5A-999D-40E6-8EF1-D7CCEB55FF42) (Shutdown)
xcode-select -p /Applications/Xcode.app/Contents/Developer
Similar for me, touches working fine in Xcode 6.1 with iOS 7.1 simulator i think main issue is with iOS 8.1 simulator in Xcode 6.1. Can anyone check same steps in Xcode 6.1 iOS 7.1 vs iOS 8.1 simulators?
calabash-ios version 0.11.1 xcrun xcodebuild -version Xcode 6.1 Build version 6A1052d
Then I touch the "Log In" button # calabash-cucumber-0.11.1/features/step_definitions/calabash_steps.rb:31 uia action failed because: Timed out running command uia.tapOffset('{:x 160, :y 357.5}') (RuntimeError) features/login.feature:7:in `Then I touch the "Log In" button'
+1
Fix coming out shortly
On 21 Oct 2014, at 18:08, Nassim Kammah notifications@github.com wrote:
+1
— Reply to this email directly or view it on GitHub.
Thank you, Krukow.
Thanks @krukow! I'm having this issue as well.
Having this issue as well. +1-ing.
+1 anticipating this fix.
It's already fixed :) you don't have to +1 it :) https://github.com/calabash/calabash-ios-server/pull/83 Release pending
Thanks @krukow !!
Whoohoo! A thanks from me as well @krukow
Still able to reproduce with "iPhone 5 (8.1 Simulator)” but now instead of timeout i receive different error
$ calabash-ios version 0.11.2 server_version['version'] „0.11.2" xcrun xcodebuild -version Xcode 6.1 Build version 6A1052d
Launching took 6.645774 seconds
Given I am on the Welcome Screen # features/step_definitions/custom_steps.rb:10
Then I should see a "Log In" button enabled # features/step_definitions/custom_steps.rb:40
Sending UIA command
uia.tapOffset('{:x 160, :y 357.5}')
^C #must interrupt because it's hangs
Exiting... Interrupt again to exit immediately.
Then I touch the "Log In" button # calabash-cucumber-0.11.2/features/step_definitions/calabash_steps.rb:31
Could not parse response ''; the app has probably crashed (RuntimeError)
features/login.feature:8:in `Then I touch the "Log In" button'
Sending 'QUIT' to instruments process '22979'
Waiting for instruments '22979' to terminate
Same here. Using the console, the touch
command on a UITextField
triggers the same Could not parse response ''
error. Same calabash, server, and Xcode versions as @ark-konopacki, although I was using the "iPhone 5s (7.1 Simulator)". When I try with the "iPhone 5s (8.1 Simulator)", the touch
command just hangs.
The fix hasn't been released. The fix is not in 0.11.2
This fix is in 0.11.2.
https://github.com/calabash/calabash-ios-server/pull/83
The https://github.com/calabash/calabash-ios-server/pull/82 pull request was replaced by 83.
The original problem was caused by a change the CoreSimulator environment - the location of the NSUserDefaults plist path was changed in Xcode 6.1.
I can consistently run against iOS 8.1 simulators in Xcode 6.1 and iOS 8.0 simulators in Xcode 6.0.1.
However, I am seeing intermittent hanging when I target iOS 7.1 simulators in Xcode 6.1 and Xcode 6.0.1.
I believe the problem is caused because Xcode 6.1 and Xcode 6.0.1 share the iOS 7.1 SDK CoreSimulator environment. I am seeing two defaults plist appearing.
To further complicate matters calabash/calabash-ios-server#83 has a memory management problem which leads to intermittent crashes. Fix will be in 0.11.3.
Looking at the simulator logs for an iPhone 5 7.1.2 Simulator, I see the follow suspicious output:
Oct 24 18:23:29 stern SpringBoard[76888] <Warning>: Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this
If y'all could review your simulator logs when you see the 'hanging' behavior, I would appreciate it.
$ cd ~/Library/Logs/CoreSimulator/20ECFA73-4381-40F5-ADE4-3F88EAD9C24B
$ tail -f system.log
Oct 24 13:05:01 jforrest assertiond[97841]: assertion failed: 13F34 12B411: assertiond + 11523 [3F572A0B-7E12-378D-AFEE-EA491BAF2C36]: 0x1
Oct 24 13:05:01 jforrest Desk-cal[97866]: NSUserDefaults path = /Users/jforrest/Library/Developer/CoreSimulator/Devices/3175C972-0D01-47AE-9682-538ED8A408F0/data/Library/Preferences/com.desk.desk.plist
Oct 24 13:05:02 --- last message repeated 5 times ---
Oct 24 13:05:02 jforrest securityd[97848]: SecTaskCopyAccessGroups No keychain access group specified whilst running in simulator, falling back to default set
Oct 24 13:05:02 jforrest Desk-cal[97866]: NSUserDefaults path = /Users/jforrest/Library/Developer/CoreSimulator/Devices/3175C972-0D01-47AE-9682-538ED8A408F0/data/Library/Preferences/com.desk.desk.plist
Oct 24 13:05:03 --- last message repeated 8 times ---
Oct 24 13:05:03 jforrest assertiond[97841]: assertion failed: 13F34 12B411: assertiond + 11523 [3F572A0B-7E12-378D-AFEE-EA491BAF2C36]: 0x1
Oct 24 13:05:03 jforrest Desk-cal[97866]: NSUserDefaults path = /Users/jforrest/Library/Developer/CoreSimulator/Devices/3175C972-0D01-47AE-9682-538ED8A408F0/data/Library/Preferences/com.desk.desk.plist
Oct 24 13:05:33 --- last message repeated 295 times ---
Oct 24 13:05:33 jforrest Desk-cal[97866]: NSUserDefaults path = /Users/jforrest/Library/Developer/CoreSimulator/Devices/3175C972-0D01-47AE-9682-538ED8A408F0/data/Library/Preferences/com.desk.desk.plist
OK. I managed to sort out some details.
NSUserDefaults and UIAutomation preferences API read from and write to a plist located in the application's sandbox.
NSUserDefaults and UIAutomation preferences API read from and write to a plist located in the simulator's data/Library/Preferences directory.
Testing a fix now.
It sounds like you might already have enough info for now...but here is my log/terminal output anyway :-) I can't touch anything with xcode 6.1 simulator 8.1 and calabash 0.11.2
irb(main):002:0> start_test_server_in_background
INFO: Using uia strategy: 'preferences' Sending 'QUIT' to instruments process '4546' Waiting for instruments '4546' to terminate Preparation took 2.541857 seconds { :app => "/Users/nfrydenholm/Work/dba-app-iOS/Build/Products/Debug-iphonesimulator/dba.app", :args => [], :bundle_dir_or_bundle_id => "/Users/nfrydenholm/Work/dba-app-iOS/Build/Products/Debug-iphonesimulator/dba.app", :bundle_id => "ecg.dk.dba.testapp", :device => "iphone", :device_target => "simulator", :launch_method => :instruments, :launch_retries => 5, :log_file => "/var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/run_loop.out", :no_launch => false, :no_stop => false, :reset => false, :results_dir => "/var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr", :results_dir_trace => "/var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/trace", :script => "/var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/_run_loop.js", :sdk_version => nil, :udid => "iPhone 5 (8.1 Simulator)", :uia_strategy => :preferences, :xcode => "6.1", :xcode_path => "/Applications/Xcode.app/Contents/Developer/" }
2014-10-24 19:43:22 +0200 xcrun instruments -w "iPhone 5 (8.1 Simulator)" -D "/var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/trace" -t "Automation" "/Users/nfrydenholm/Work/dba-app-iOS/Build/Products/Debug-iphonesimulator/dba.app" -e UIARESULTSPATH /var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr -e UIASCRIPT /var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/_run_loop.js &> /var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/run_loop.out Launching took 5.326718 seconds Calabash::Cucumber::Launcher: Launch Method instruments Log file: /var/folders/36/ws5sx46n747c9dwl9x6p06s8390ykh/T/run_loop20141024-4615-1799bmr/run_loop.out irb(main):003:0> server_version { "app_version" => "3.5.1", "outcome" => "SUCCESS", "app_id" => "ecg.dk.dba.testapp", "simulator_device" => "iPhone", "version" => "0.11.2", "app_name" => "DBA Dev", "iphone_app_emulated_on_ipad" => false, "4inch" => true, "git" => { "remote_origin" => "git@github.com:calabash/calabash-ios-server.git", "branch" => "master", "revision" => "e1821ad" }, "screen_dimensions" => { "scale" => 2, "width" => 640, "sample" => 1, "height" => 1136 }, "iOS_version" => "8.1", "system" => "x86_64", "simulator" => "" } irb(main):004:0> query("textField index:0") [ [0] { "text" => "", "selected" => false, "enabled" => true, "id" => nil, "rect" => { "center_x" => 160, "y" => 72, "width" => 318, "x" => 1, "center_y" => 86, "height" => 28 }, "label" => "SearchField", "description" => "<UISearchBarTextField: 0x7ae78f30; frame = (0 8; 318 28); text = ''; clipsToBounds = YES; opaque = NO; gestureRecognizers = <NSArray: 0x7b2750c0>; layer = <CALayer: 0x7ae791b0>>", "alpha" => 1, "class" => "UISearchBarTextField", "frame" => { "y" => 8, "width" => 318, "x" => 0, "height" => 28 } } ] irb(main):005:0> touch("textField index:0") Sending UIA command uia.tapOffset('{:x 160, :y 86}') RuntimeError: uia action failed because: Timed out running command uia.tapOffset('{:x 160, :y 86}')
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/uia.rb:37:in `uia'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/uia.rb:344:in `uia_handle_command'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/uia.rb:144:in `uia_tap_offset'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/actions/instruments_actions.rb:93:in `query_action'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/actions/instruments_actions.rb:15:in `touch'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/core.rb:1095:in `query_action_with_options'
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.11.2/lib/calabash-cucumber/core.rb:174:in `touch'
from (irb):5
from /Users/nfrydenholm/.rbenv/versions/2.0.0-p353/bin/irb:12:in `<main>'
irb(main):006:0>
And the system.log Oct 24 19:14:17 LM-AAR-00321998 dba[10791]: Map POST, /map Parsed UIScript as ( "view:'UIView'" ) Oct 24 19:14:30 LM-AAR-00321998 lsd[10777]: LaunchServices: Currently 0 installed placeholders: ( ) Oct 24 19:14:36 LM-AAR-00321998 dba[10791]: Map POST, /map Parsed UIScript as ( "view:'UITextField'", "index:0" ) Oct 24 19:14:36 LM-AAR-00321998 dba[10791]: NSUserDefaults path = /Users/nfrydenholm/Library/Developer/CoreSimulator/Devices/8A768E58-CB04-4923-B68C-FE808838814B/data/Library/Preferences/ecg.dk.dba.testapp.plist Oct 24 19:14:41 --- last message repeated 44 times --- Oct 24 19:14:41 LM-AAR-00321998 mstreamd[10758]: (Note ) PS: Media stream daemon stopping. Oct 24 19:14:41 LM-AAR-00321998 mstreamd[10758]: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x7fd522108e90>: Shared Streams daemon has shut down. Oct 24 19:14:41 LM-AAR-00321998 mstreamd[10758]: (Warn ) mstreamd: mstreamd shutting down. Oct 24 19:14:41 LM-AAR-00321998 dba[10791]: NSUserDefaults path = /Users/nfrydenholm/Library/Developer/CoreSimulator/Devices/8A768E58-CB04-4923-B68C-FE808838814B/data/Library/Preferences/ecg.dk.dba.testapp.plist Oct 24 19:14:54 --- last message repeated 126 times --- Oct 24 19:14:54 LM-AAR-00321998 SpringBoard[10763]: Unable to get short BSD proc info for 10791: No such process Oct 24 19:14:54 LM-AAR-00321998 com.apple.CoreSimulator.SimDevice.8A768E58-CB04-4923-B68C-FE808838814B.launchd_sim10752: Service exited due to signal: Killed: 9 Oct 24 19:14:54 LM-AAR-00321998 SpringBoard[10763]: Application 'UIKitApplication:ecg.dk.dba.testapp[0xfff9]' exited abnormally via signal. Oct 24 19:14:54 LM-AAR-00321998 assertiond[10767]: assertion failed: 14A389 12B411: assertiond + 11523 [3F572A0B-7E12-378D-AFEE-EA491BAF2C36]: 0x1 Oct 24 19:14:54 LM-AAR-00321998 assertiond[10767]: notify_suspend_pid() failed with error 7
@nfrydenholm
NSUserDefaults path = /Users/nfrydenholm/Library/Developer/CoreSimulator/Devices/8A768E58-CB04-4923-B68C-FE808838814B/data/Library/Preferences/ecg.dk.dba.testapp.plist
That line is telling me that the server was not able to find the the right plist path. Good info. Thanks.
Fix is in hand. Local tests pass. Running through CI now.
Great that you could get some useful info from the logging - I couldn't 😊
Sounds good with an (almost) ready fix. I'll be ready to test it as soon as it's ready
0.11.3 released
I am still not able to update 0.11.3, am i missing something?
ahossain-ltm:Regression-suite ahossain$ calabash-ios download
----------Info---------- Found calabash.framework in /Users/ahossain/Desktop/github/Regression-suite. Shall I delete it and download the latest matching version? Please answer yes (y) or no (n) y
Info caution: excluded filename not matched: __MACOSX/* caution: excluded filename not matched: calabash.framework/.DS_Store
ahossain-ltm:Regression-suite ahossain$ calabash-ios version 0.11.0
ahossain-ltm:Regression-suite ahossain$ calabash-ios version
That only tests the version of the gem.
You need to update your calabash-cucumber gem.
$ gem install calabash-cucumber
$ calabash-ios download
# Verify the framework is the correct version.
$ calabash.framework/Resources/version
I also recommend you use a Gemfile and bundler.
Thanks. This fix worked for me on xcode 6.1 + iphone5 simulator.
:+1: with 0.11.3 touch is now working with xcode 6.1 (I have tried on iPhone 5 and iPad Air simulators - both on 8.1). Great and fast work @jmoody
I do see one problem though, but I'm not sure it is even related to this - more likely it's (just another) CoreSimulator problem.... I can't get another (language)keyboard in my app. I need "Danish" as language, but only the english keyboard shows up - even when I delete english in Settings -> keyboard, and only have danish (and emoji), then in my app I can only switch between english and emoji. Any hints on where to start digging for that problem would be appreciated :-)
@nfrydenholm - Have you tried this to solve keyboard problem? https://groups.google.com/d/msg/calabash-ios/UAJqy6MxvHc/Zu9iGZCx58YJ
I still experience touch gesture problem when running against Simulator iPhone5 ios 8.1 oliviers-MacBook-Pro:elektra dmitry$ calabash-ios version 0.11.3 oliviers-MacBook-Pro:elektra dmitry$ calabash-ios console Running irb... irb(main):001:0> server_version['version'] "0.11.3" oliviers-MacBook-Pro:elektra dmitry$ xcrun xcodebuild -version Xcode 6.1 Build version 6A1052d
The test would run ok but after some time it would throw and error uia action failed because: Timed out running command uia.tapOffset('{:x 243.5, :y 42}') http://screencast.com/t/P3bG6WQuq8r http://screencast.com/t/7SkwXRKW3Ueh Please let me know what more of the info I could provide to help you with instruction/fix/etc.
@piratmc Hi, do you try run tests with RESET_BETWEEN_SCENARIOS=1?, I has some similar issues with 0.11.3 but it's all about simulator and Xcode configuration not calabash. After reseting simulator and making clean build in Xcode everything working fine.
@piratmc are you eventually writing to the NSUserDefaults? Like that:
[[NSUserDefaults standardUserDefaults] setObject:object forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize];
I had the timeout issue in my app with the newest version and could fix it with changing the code to:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:object forKey:key];
[defaults synchronize];
Looks like i was wrong. The issue only disappear when i remove the code. There is probably a race condition when two threads are writing to the UserDefaults at the same time.
Same to me. I have RESET_BETWEEN_SCENARIOS=1. Sometimes only some of my touches time out (in a >1h huge full app test run). The touch always happened, only the response is missing. All the touches that sometimes time out are writing into NSUserDefaults. It looks like a race condition. I circumvent it by a (ugly) patch of the touch method. May be that helps for the time being:
Calabash::Cucumber::Core.module_eval do
def touch(query_string, options={})
query_result = nil
if query_string && !query_string.empty?
query_result = (query(query_string))
if query_result.empty?
raise "No element found for #{query_string}"
end
end
begin
query_action_with_options(:touch, query_result, options)
rescue RuntimeError => e
if (!e.to_s.match(/Timed out running command uia.tapOffset/))
raise e
end
# Handle missing response
puts "*"*100
puts e
puts "*"*100
end
end
end
@robsteinde How do i apply your fix to my installation?
I've to correct my last comment. It definitly does NOT correspond with NSUserDefaults. I have several touches and even some uia.typestring
uia action failed because: Timed out running command uia.typeString('foo', '') (RuntimeError)
which don't touch any NSUserDefault. I double checked.
@yasargil Put in a file e.g. 'core_patch' and then require it after requiring calabash-cucumber/core in your env.rb
require 'calabash-cucumber/core'
require_relative 'core_patch'
I added some logging and get following results: run_loop.out:
2014-10-28 10:39:31 +0000 Default: index 10 is command: uia.tapOffset('{:x 53.25, :y 544}')
2014-10-28 10:39:31 +0000 Debug: target.tapWithOptions({x:"53.25", y:"544"}, )
2014-10-28 10:39:32 +0000 Default: Success: true
2014-10-28 10:39:32 +0000 Default: Write result...
2014-10-28 10:39:32 +0000 Default: Check successful storage...
2014-10-28 10:39:32 +0000 Default: Storage succeeded: 10
Sim output:
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: NSUserDefaults path = /Users/siya/Library/Developer/CoreSimulator/Devices/E94A218D-CFE5-4F3E-9EAE-BBB0F18ACE25/data/Containers/Data/Application/E18B7EC0-1713-40A1-B4B2-171A9748726D/Library/Preferences/ch.glue.fagime.plist
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: CurrentRepsonse : {
index = 9;
status = success;
value = 1;
}
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: Timed out running command uia.tapOffset('{:x 53.25, :y 544}')
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: Server current index: 10
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: NSUserDefaults path = /Users/siya/Library/Developer/CoreSimulator/Devices/E94A218D-CFE5-4F3E-9EAE-BBB0F18ACE25/data/Containers/Data/Application/E18B7EC0-1713-40A1-B4B2-171A9748726D/Library/Preferences/ch.glue.fagime.plist
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: Current request: (null)
Oct 28 11:41:38 Sinan-Yasargils-MacBook-Pro.local Fagime[88500]: Current response: (null)
I am almost 100% sure that if you are having a problem, you have not correctly updated your framework or you have stale binary installed on the simulator.
If you are still having trouble do the following:
$ be calabash-ios sim reset
$ curl http://localhost:37265/version
I'm 100% sure that I did the suggested steps above. The problem occurs consistently on different systems (5 developers and 2 jenkins). And only since update to Xcode6.0 and stays with XCode 6.1.
What is the output of:
$ curl http://localhost:37265/version
{"app_version":"4.0.0","outcome":"SUCCESS","app_id":"com.orderbird.pos","simulator_device":"iPhone","version":"0.11.3","app_name":"orderbird POS","iphone_app_emulated_on_ipad":false,"4inch":true,"git":{"remote_origin":"git@github.com:calabash\/calabash-ios-server.git","branch":"master","revision":"40c6245"},"screen_dimensions":{"scale":2,"width":640,"sample":1,"height":1136},"iOS_version":"8.1","system":"x86_64","simulator":""}
I am sure it is updated. I did add the log "CurrentRepsonse : " to the server.
As you can see from the runloop.log it did write the response to the plist but the server can never read it.
{"app_version":"0.0.14","outcome":"SUCCESS","app_id":"ch.glue.fagime","simulator_device":"iPhone","version":"0.11.3","app_name":"ÖV Bern","iphone_app_emulated_on_ipad":false,"4inch":true,"git":{"remote_origin":"https:\/\/github.com\/calabash\/calabash-ios-server.git","branch":"master","revision":"40c6245"},"screen_dimensions":{"scale":2,"width":640,"sample":1,"height":1136},"iOS_version":"8.1","system":"x86_64","simulator":""}
I could resolve/improve my problem with following changes to the calabash-ios-server:
diff --git a/calabash/Classes/Utils/LPUIAUserPrefsChannel.m b/calabash/Classes/Utils/LPUIAUserPrefsChannel.m
index 366a6c7..b3c5fe0 100644
--- a/calabash/Classes/Utils/LPUIAUserPrefsChannel.m
+++ b/calabash/Classes/Utils/LPUIAUserPrefsChannel.m
@@ -125,6 +125,7 @@ const static NSTimeInterval LPUIAChannelUIADelay = 0.1;
- (NSDictionary *) userPreferences {
NSDictionary *prefs = nil;
#if TARGET_IPHONE_SIMULATOR
+ [NSUserDefaults resetStandardUserDefaults];
prefs = [NSDictionary dictionaryWithContentsOfFile:[self simulatorPreferencesPath]];
#else
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -137,6 +138,7 @@ const static NSTimeInterval LPUIAChannelUIADelay = 0.1;
#if TARGET_IPHONE_SIMULATOR
-(void)simulatorRequestExecutionOf:(NSString *)command {
+ [NSUserDefaults resetStandardUserDefaults];
NSMutableDictionary *prefs = [NSMutableDictionary dictionaryWithContentsOfFile:[self simulatorPreferencesPath]];
if (!prefs) {
prefs = [NSMutableDictionary dictionary];
@ark-konopacki Hi, I only use Reset for 3 of my scenarios to simulate fresh install of the app. So my errors occur for tests without the reset. I have not examined tests with reset yet. @yasargil I do not write to NS.....I honestly do not even know what that stands for :-) I only work with .rb and .feature files. NS-thing looks like some objective-c to me. I will try @jmoody instructions and will post my results later today.
My results simulator reset http://screencast.com/t/aGwSUS9xHNLD started clean http://screencast.com/t/HoNHdG5l clean success http://screencast.com/t/5anNm0tBaQG cal built http://screencast.com/t/Y552JOtRwozK stoping xcode, simulator open. curl http://screencast.com/t/gsGLgmge2gRW error http://screencast.com/t/l753lARBy5
I've noticed the timeouts as well with 0.11.3 - they do show up randomly when running a test suite.
I just finished upgrading a Jenkins server, and there were several timeouts for touches running my testsuite. It takes two minutes for each timeout to fail, which I guess is the default timeout waiting for a response from the calabash server?
I was working with push notification related scenario today and came across with timeout issue as well. Issue is reproducible every time. I'm writing values to NSUserDefaults during this scenario. Scenario is about showing custom "would you like to accept push notifications" screen to the user. After user taps two buttons (Sure and Next) in notifications screen then system level push notification alert view is shown. UI flow is like below:
<Navigation to custom notification screen and writing values to NSUserDefaults>
Given notification screen is displayed
When user taps "Sure" button
And user taps "Next" button
Then notification screen is dismissed
And system level push notification alert view is displayed
And Calabash dismisses system level alert view automatically
UI flow is completed correctly and Calabash automatically dismisses system level alert view. In spite of that tapping the "Next" button causes a timeout for some reason.
curl:
Janis-MacBook-Air:~ janijegoroff$ curl http://localhost:37265/version
{"app_version":"1.4","outcome":"SUCCESS","app_id":"myBundle","simulator_device":"iPad","version":"0.11.3","app_name":"myApp","iphone_app_emulated_on_ipad":false,"4inch":false,"git":{"remote_origin":"git@github.com:calabash\/calabash-ios-server.git","branch":"master","revision":"40c6245"},"screen_dimensions":{"scale":2,"width":1536,"sample":1,"height":2048},"iOS_version":"8.1","system":"x86_64","simulator":""}
Debug trace:
Janis-Air:myApp janijegoroff$ DEBUG=1 DEBUG_HTTP=1 cucumber -p dev_ipad --tags @accept_notifications
Using the dev_ipad, sim_ipad_retina_81, reset, features, tags_default_ipad, tags_ci, tags_ipad and tags_skip_pending profiles...
@notifications @ci @ipad @iphone
Feature: Notifications
As a User
I have an option to accept or decline notification when new content is published
So that I can control notifications
@accept_notifications
Scenario: Accept notifications # Calabash/features/notifications.feature:20
INFO: Using uia strategy: 'preferences'
Preparation took 2.245576 seconds
{
:app => "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app",
:args => [],
:bundle_dir_or_bundle_id => "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app",
:bundle_id => "myBundle",
:device => "iphone",
:device_target => "iPad Retina (8.1 Simulator)",
:launch_method => :instruments,
:launch_retries => 5,
:log_file => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/run_loop.out",
:no_launch => false,
:no_stop => false,
:reset => true,
:results_dir => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz",
:results_dir_trace => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/trace",
:script => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/_run_loop.js",
:sdk_version => nil,
:udid => "iPad Retina (8.1 Simulator)",
:uia_strategy => :preferences,
:xcode => "6.1",
:xcode_path => "/Applications/Xcode61/Xcode.app/Contents/Developer"
}
### Starting on iPad Retina (8.1 Simulator) App: /Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app ###
2014-10-28 22:29:02 +0000 xcrun instruments -w "iPad Retina (8.1 Simulator)" -D "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/trace" -t "Automation" "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app" -e UIARESULTSPATH /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz -e UIASCRIPT /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/_run_loop.js &> /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/run_loop.out
Launching took 9.967125 seconds
= Request
! CONNECT TO localhost:37265
! CONNECTION ESTABLISHED
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:12 GMT
Content-Length: 83
Host: localhost:37265
{"query":null,"operation":{"method_name":"orientation","arguments":["status_bar"]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 72
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:12 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"down","results":["down"],"outcome":"SUCCESS"}= Request
POST /play HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:12 GMT
Content-Length: 135
Host: localhost:37265
{"events":"YnBsaXN0MDChAdMCBAYDBQdURGF0YUQDAAAAoFRUaW1lEwAAAbhNBUVUVFR5cGUQ
MggKERYcISovAAAAAAAAAQEAAAAAAAAACAAAAAAAAAAAAAAAAAAAADE=
"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:12 GMT
22
{"results":[],"outcome":"SUCCESS"}
0
= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:12 GMT
Content-Length: 93
Host: localhost:37265
{"query":"view marked:'homeLaunchButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 484
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:12 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"text":"Main menu","selected":false,"enabled":true,"id":null,"rect":{"center_x":512,"y":174,"width":540,"x":242,"center_y":196,"height":44},"label":"homeLaunchButton","description":"<QTableViewCell: 0x7bed85a0; baseClass = UITableViewCell; frame = (0 100; 540 44); text = 'Main menu'; autoresize = W; layer = <CALayer: 0x7bed8740>>","alpha":1,"class":"QTableViewCell","frame":{"y":100,"width":540,"x":0,"height":44}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:15 GMT
Content-Length: 93
Host: localhost:37265
{"query":"view marked:'homeLaunchButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 484
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:15 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"text":"Main menu","selected":false,"enabled":true,"id":null,"rect":{"center_x":512,"y":174,"width":540,"x":242,"center_y":196,"height":44},"label":"homeLaunchButton","description":"<QTableViewCell: 0x7bed85a0; baseClass = UITableViewCell; frame = (0 100; 540 44); text = 'Main menu'; autoresize = W; layer = <CALayer: 0x7bed8740>>","alpha":1,"class":"QTableViewCell","frame":{"y":100,"width":540,"x":0,"height":44}}],"outcome":"SUCCESS"}Sending UIA command
uia.tapOffset('{:x 512, :y 196}')
= Request
POST /uia HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:15 GMT
Content-Length: 47
Host: localhost:37265
{"command":"uia.tapOffset('{:x 512, :y 196}')"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:15 GMT
4d
{"results":[{"status":"success","value":true,"index":0}],"outcome":"SUCCESS"}
0
Result
{"status"=>"success", "value"=>true, "index"=>0}
= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:16 GMT
Content-Length: 79
Host: localhost:37265
{"query":"UICollectionView","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:16 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:16 GMT
Content-Length: 79
Host: localhost:37265
{"query":"UICollectionView","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:16 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:16 GMT
Content-Length: 79
Host: localhost:37265
{"query":"UICollectionView","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:16 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:17 GMT
Content-Length: 79
Host: localhost:37265
{"query":"UICollectionView","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:17 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:17 GMT
Content-Length: 79
Host: localhost:37265
{"query":"UICollectionView","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 607
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:17 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"enabled":true,"rect":{"center_x":512,"y":0,"width":1024,"x":0,"center_y":384,"height":768},"description":"<UICollectionView: 0x7c231400; frame = (0 0; 1024 768); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7d608660>; animations = { opacity=<CABasicAnimation: 0x7d60f680>; }; layer = <CALayer: 0x7d6050f0>; contentOffset: {0, -64}; contentSize: {1022, 1246}> collection view layout: <SUSPhotoReelFlowLayout: 0x7be00210>","id":null,"label":null,"alpha":1,"class":"UICollectionView","frame":{"y":0,"width":1024,"x":0,"height":768}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:18 GMT
Content-Length: 125
Host: localhost:37265
{"query":"view marked:'homeHeroCell' label {text CONTAINS[cd] 'popular'}","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 477
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:18 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"text":"POPULAR","enabled":true,"rect":{"center_x":255,"y":632.5,"width":488,"x":11,"center_y":643.25,"height":21.5},"id":null,"description":"<UILabel: 0x7bf9d1b0; frame = (5 122.5; 488 21.5); text = 'POPULAR'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7bf82c60>>","label":"POPULAR","alpha":1,"class":"UILabel","frame":{"y":122.5,"width":488,"x":5,"height":21.5}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:18 GMT
Content-Length: 125
Host: localhost:37265
{"query":"view marked:'homeHeroCell' label {text CONTAINS[cd] 'popular'}","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 477
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:18 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"text":"POPULAR","enabled":true,"rect":{"center_x":255,"y":632.5,"width":488,"x":11,"center_y":643.25,"height":21.5},"id":null,"description":"<UILabel: 0x7bf9d1b0; frame = (5 122.5; 488 21.5); text = 'POPULAR'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7bf82c60>>","label":"POPULAR","alpha":1,"class":"UILabel","frame":{"y":122.5,"width":488,"x":5,"height":21.5}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:21 GMT
Content-Length: 125
Host: localhost:37265
{"query":"view marked:'homeHeroCell' label {text CONTAINS[cd] 'popular'}","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 477
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:21 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"text":"POPULAR","enabled":true,"rect":{"center_x":255,"y":632.5,"width":488,"x":11,"center_y":643.25,"height":21.5},"id":null,"description":"<UILabel: 0x7bf9d1b0; frame = (5 122.5; 488 21.5); text = 'POPULAR'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7bf82c60>>","label":"POPULAR","alpha":1,"class":"UILabel","frame":{"y":122.5,"width":488,"x":5,"height":21.5}}],"outcome":"SUCCESS"}Sending UIA command
uia.tapOffset('{:x 255, :y 643.25}')
= Request
POST /uia HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:21 GMT
Content-Length: 50
Host: localhost:37265
{"command":"uia.tapOffset('{:x 255, :y 643.25}')"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:21 GMT
4d
{"results":[{"status":"success","value":true,"index":1}],"outcome":"SUCCESS"}
0
Result
{"status"=>"success", "value"=>true, "index"=>1}
= Request
** WRITE VALUES TO NSUSERDEFAULTS **
POST /userprefs HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:21 GMT
Content-Length: 53
Host: localhost:37265
{"key":"NOTIFICATION_SCREEN_PRESENTED_KEY","value":1}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 35
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:21 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"results":[1],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:21 GMT
Content-Length: 93
Host: localhost:37265
{"query":"navigationItemButtonView first","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 528
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:21 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"enabled":false,"rect":{"center_x":38,"y":26,"width":52,"x":12,"center_y":41,"height":30},"description":"<UINavigationItemButtonView: 0x7d630710; frame = (12 6; 52 30); opaque = NO; userInteractionEnabled = NO; animations = { opacity=<CABasicAnimation: 0x7d632de0>; position=<CABasicAnimation: 0x7d632e90>; }; layer = <CALayer: 0x7d6305e0>>","id":null,"label":"Back","alpha":1,"class":"UINavigationItemButtonView","frame":{"y":6,"width":52,"x":12,"height":30}}],"outcome":"SUCCESS"}Sending UIA command
uia.tapOffset('{:x 38, :y 41}')
= Request
POST /uia HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:21 GMT
Content-Length: 45
Host: localhost:37265
{"command":"uia.tapOffset('{:x 38, :y 41}')"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:21 GMT
4d
{"results":[{"status":"success","value":true,"index":2}],"outcome":"SUCCESS"}
0
Result
{"status"=>"success", "value"=>true, "index"=>2}
= Request
POST /userprefs HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:22 GMT
Content-Length: 53
Host: localhost:37265
{"key":"NOTIFICATION_SCREEN_PRESENTED_KEY","value":1}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 37
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:22 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"results":[1,1],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:22 GMT
Content-Length: 84
Host: localhost:37265
{"query":"view:'SUSLoadingView'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:22 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
** WAIT FOR NOTIFICATION SCREEN **
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:22 GMT
Content-Length: 95
Host: localhost:37265
{"query":"view marked:'notificationScreen'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:22 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:22 GMT
Content-Length: 95
Host: localhost:37265
{"query":"view marked:'notificationScreen'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 445
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:23 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"enabled":true,"rect":{"center_x":512,"y":0,"width":1024,"x":0,"center_y":384,"height":768},"description":"<UIView: 0x7bfcecb0; frame = (0 0; 1024 768); autoresize = W+H; animations = { position=<CASpringAnimation: 0x7d6469a0>; }; layer = <CALayer: 0x7bfa23a0>>","id":"notificationScreen","label":null,"alpha":1,"class":"UIView","frame":{"y":0,"width":1024,"x":0,"height":768}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:23 GMT
Content-Length: 84
Host: localhost:37265
{"query":"view:'SUSLoadingView'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 67
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:23 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:23 GMT
Content-Length: 95
Host: localhost:37265
{"query":"view marked:'notificationScreen'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 445
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:23 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"enabled":true,"rect":{"center_x":512,"y":0,"width":1024,"x":0,"center_y":384,"height":768},"description":"<UIView: 0x7bfcecb0; frame = (0 0; 1024 768); autoresize = W+H; animations = { position=<CASpringAnimation: 0x7d6469a0>; }; layer = <CALayer: 0x7bfa23a0>>","id":"notificationScreen","label":null,"alpha":1,"class":"UIView","frame":{"y":0,"width":1024,"x":0,"height":768}}],"outcome":"SUCCESS"} Given Notification screen is opened # cucumber-1.3.17/lib/cucumber/rb_support/rb_step_definition.rb:47
= Request
** TAP SURE BUTTON **
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:23 GMT
Content-Length: 87
Host: localhost:37265
{"query":"view marked:'sureButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 442
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:23 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"selected":false,"enabled":true,"rect":{"center_x":512,"y":553,"width":200,"x":412,"center_y":578,"height":50},"id":"sureButton","description":"<UIButton: 0x7d645040; frame = (412 489; 200 50); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7d626240>>","label":"Sure","alpha":1,"class":"UIButton","frame":{"y":489,"width":200,"x":412,"height":50}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:26 GMT
Content-Length: 87
Host: localhost:37265
{"query":"view marked:'sureButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 442
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:26 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"selected":false,"enabled":true,"rect":{"center_x":512,"y":553,"width":200,"x":412,"center_y":578,"height":50},"id":"sureButton","description":"<UIButton: 0x7d645040; frame = (412 489; 200 50); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7d626240>>","label":"Sure","alpha":1,"class":"UIButton","frame":{"y":489,"width":200,"x":412,"height":50}}],"outcome":"SUCCESS"}Sending UIA command
uia.tapOffset('{:x 512, :y 578}')
= Request
POST /uia HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:26 GMT
Content-Length: 47
Host: localhost:37265
{"command":"uia.tapOffset('{:x 512, :y 578}')"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:26 GMT
4d
{"results":[{"status":"success","value":true,"index":3}],"outcome":"SUCCESS"}
0
Result
{"status"=>"success", "value"=>true, "index"=>3}
= Request
** TAP NEXT BUTTON **
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:26 GMT
Content-Length: 87
Host: localhost:37265
{"query":"view marked:'nextButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 442
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:26 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"selected":false,"enabled":true,"rect":{"center_x":512,"y":553,"width":200,"x":412,"center_y":578,"height":50},"id":"nextButton","description":"<UIButton: 0x7d6429e0; frame = (412 489; 200 50); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7d6139e0>>","label":"Next","alpha":1,"class":"UIButton","frame":{"y":489,"width":200,"x":412,"height":50}}],"outcome":"SUCCESS"}= Request
POST /map HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:29 GMT
Content-Length: 87
Host: localhost:37265
{"query":"view marked:'nextButton'","operation":{"method_name":"query","arguments":[]}}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 442
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:29:29 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{"status_bar_orientation":"right","results":[{"selected":false,"enabled":true,"rect":{"center_x":512,"y":553,"width":200,"x":412,"center_y":578,"height":50},"id":"nextButton","description":"<UIButton: 0x7d6429e0; frame = (412 489; 200 50); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7d6139e0>>","label":"Next","alpha":1,"class":"UIButton","frame":{"y":489,"width":200,"x":412,"height":50}}],"outcome":"SUCCESS"}Sending UIA command
uia.tapOffset('{:x 512, :y 578}')
= Request
POST /uia HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:29:29 GMT
Content-Length: 47
Host: localhost:37265
{"command":"uia.tapOffset('{:x 512, :y 578}')"}
= Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Tue, 28 Oct 2014 22:29:29 GMT
69
{"details":"","outcome":"FAILURE","reason":"Timed out running command uia.tapOffset('{:x 512, :y 578}')"}
0
When I accept notifications # cucumber-1.3.17/lib/cucumber/rb_support/rb_step_definition.rb:47
uia action failed because: Timed out running command uia.tapOffset('{:x 512, :y 578}')
(RuntimeError)
./Calabash/features/support/common_utils.rb:54:in `tap_element'
./Calabash/features/support/page_objects/base_page.rb:50:in `method_missing'
./Calabash/features/support/meta_code_generator.rb:82:in `block (2 levels) in create_tap_element_methods'
./Calabash/features/support/page_objects/notification_screen.rb:39:in `next'
./Calabash/features/support/page_objects/notification_screen.rb:23:in `accept'
./Calabash/features/support/page_objects/notification_screen.rb:18:in `handle_notifications'
Calabash/features/notifications.feature:22:in `When I accept notifications'
Then Notification screen is dismissed # cucumber-1.3.17/lib/cucumber/rb_support/rb_step_definition.rb:47
= Request
! CONNECTION CLOSED
! CONNECT TO localhost:37265
! CONNECTION ESTABLISHED
POST /exit HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: HTTPClient/1.0 (2.3.4.1, ruby 2.1.2 (2014-05-08))
Accept: */*
Date: Tue, 28 Oct 2014 22:31:34 GMT
Content-Length: 78
Host: localhost:37265
{"post_resign_active_delay":0.4,"post_will_terminate_delay":0.4,"exit_code":0}
= Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 2
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Date: Tue, 28 Oct 2014 22:31:34 GMT
Accept-Ranges: bytes
Access-Control-Max-Age: 3000
{}Sending 'QUIT' to instruments process '29989'
Waiting for instruments '29989' to terminate
Failing Scenarios:
cucumber -p dev_ipad -p sim_ipad_retina_81 -p reset -p features -p tags_default_ipad -p tags_ci -p tags_ipad -p tags_skip_pending Calabash/features/notifications.feature:20 # Scenario: Accept notifications
1 scenario (1 failed)
3 steps (1 failed, 1 skipped, 1 passed)
2m37.907s
run_loop.out:
Janis-Air:myApp-iOS janijegoroff$ cat /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/run_loop.out
Waiting for device to boot...
2014-10-28 22:29:12 +0000 Default: OUTPUT_JSON:
{"status":"success","value":true,"index":0}
END_OUTPUT
2014-10-28 22:29:12 +0000 Default: *******************************************************
2014-10-28 22:29:15 +0000 Default: index 0 is command: uia.tapOffset('{:x 512, :y 196}')
2014-10-28 22:29:15 +0000 Debug: target.tapWithOptions({x:"512", y:"196"}, )
2014-10-28 22:29:16 +0000 Default: Success: true
2014-10-28 22:29:16 +0000 Default: Write result...
2014-10-28 22:29:16 +0000 Default: Check successful storage...
2014-10-28 22:29:16 +0000 Default: Storage succeeded: 0
2014-10-28 22:29:21 +0000 Default: index 1 is command: uia.tapOffset('{:x 255, :y 643.25}')
2014-10-28 22:29:21 +0000 Debug: target.tapWithOptions({x:"255", y:"643.25"}, )
2014-10-28 22:29:21 +0000 Default: Success: true
2014-10-28 22:29:21 +0000 Default: Write result...
2014-10-28 22:29:21 +0000 Default: Check successful storage...
2014-10-28 22:29:21 +0000 Default: Storage succeeded: 1
2014-10-28 22:29:21 +0000 Default: index 2 is command: uia.tapOffset('{:x 38, :y 41}')
2014-10-28 22:29:22 +0000 Debug: target.tapWithOptions({x:"38", y:"41"}, )
2014-10-28 22:29:22 +0000 Default: Success: true
2014-10-28 22:29:22 +0000 Default: Write result...
2014-10-28 22:29:22 +0000 Default: Check successful storage...
2014-10-28 22:29:22 +0000 Default: Storage succeeded: 2
2014-10-28 22:29:26 +0000 Default: index 3 is command: uia.tapOffset('{:x 512, :y 578}')
2014-10-28 22:29:26 +0000 Debug: target.tapWithOptions({x:"512", y:"578"}, )
2014-10-28 22:29:26 +0000 Default: Success: true
2014-10-28 22:29:26 +0000 Default: Write result...
2014-10-28 22:29:26 +0000 Default: Check successful storage...
2014-10-28 22:29:26 +0000 Default: Storage succeeded: 3
2014-10-28 22:29:30 +0000 Default: index 4 is command: uia.tapOffset('{:x 512, :y 578}')
2014-10-28 22:29:30 +0000 Debug: target.tapWithOptions({x:"512", y:"578"}, )
2014-10-28 22:29:30 +0000 Default: Success: true
2014-10-28 22:29:30 +0000 Default: Write result...
2014-10-28 22:29:30 +0000 Default: Check successful storage...
2014-10-28 22:29:30 +0000 Default: Storage succeeded: 4
2014-10-28 22:29:31 +0000 Default: OUTPUT_JSON:
{"output":{"output":"on alert"},"last_index":4}
END_OUTPUT
2014-10-28 22:29:31 +0000 Default: *******************************************************
2014-10-28 22:29:31 +0000 Default: OUTPUT_JSON:
{"output":{"output":"alert: “myApp” Would Like to Send You Notifications"},"last_index":4}
END_OUTPUT
2014-10-28 22:29:31 +0000 Default: *******************************************************
2014-10-28 22:29:31 +0000 Debug: target.frontMostApp().alert().buttons()["OK"].tap()
2014-10-28 22:31:34 +0000 Stopped: Script was stopped by the user
Instruments Trace Complete (Duration : 150.066040s; Output : /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141028-29391-pqpxgz/trace.trace)
Some of these reports seem related to: NSUserDefaults synchronize does not persist in-memory contents to disk in CoreSimulator simulators #536
@JaniJegoroff Can you try reading and writing your notification settings to alternative .plist? If you cannot reproduce the timeout, we'll know that there is some issue with UIAutomation's preferences API not playing nice with NSUserDefaults.
Moody, I want to fix this ASAP. But we need a fast and consistent repro - could you create a small variant of LPSimpleExample which can write to NSUserDefaults and a small test which we can run over to reproduce?
Once we fix, we can add this to a regression test.
Karl
On 29 Oct 2014, at 01:01, Joshua Moody notifications@github.com wrote:
Some of these reports seem related to: NSUserDefaults synchronize does not persist in-memory contents to disk in CoreSimulator simulators #536
@JaniJegoroff Can you try reading and writing your notification settings to alternative .plist? If you cannot reproduce the timeout, we'll know that there is some issue with UIAutomation's preferences API not playing nice with NSUserDefaults.
— Reply to this email directly or view it on GitHub.
@JaniJegoroff Can we close this issue and open another?
I feel like we fixed the original problem. Now we are dealing with a new problem; intermittent timeouts that are possibly related to NSUserDefaults + UIAutomation preferences API.
Environment:
Steps to reproduce:
iPad Retina (8.1 Simulator)
calabash-ios console
start_test_server_in_background
touch("view marked:'<your-text>'"
Console trace: