Appium + Adobe Air iOS app + iOS Simulator Issue

221 views
Skip to first unread message

GnanaPrakash Rathinam

unread,
May 20, 2014, 6:52:44 AM5/20/14
to appium-...@googlegroups.com
Hi,

We are in the process of automating our mobile apps build on Adobe Air platform, the android version of Adobe Air app works fine with Appium 1.0 when tested against with AVD, but facing an issue testing the same version of iOS app. So I created a simple "HelloAppium" (PFA attached the source, app) Adobe Air iOS app and could able to reproduce the same issue. I could confirm Appium, XCode, iOS Simulator setup is correct by testing the sample WebDriverApp.app on iOS simulator that comes part of the Appium, I strongly feel that the problem seems to be related only with the combination of Appium + Adobe Air iOS app. I need some help to take it forward.

Here is my test environment:-
-----------------------------
XCode : 5.0.2
iOS Simulator: iPhone Retina (4-inch) / iOS 7.0.3 (11B508)
Appium: 1.0
Mac: 10.9.2


Here is my appium log:
----------------------
Gnanaprakashs-MacBook-Air:~ gp$ appium --session-override
info: Welcome to Appium v1.0.0 (REV f0a00fab2335fa88cb355ab4dc43a9cd3f3236c0)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: socket.io started
info: Non-default server args: {"sessionOverride":true}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"newCommandTimeout":"6000","app":"/Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app","platformVersion":"7.0.3","androidPackage":"com.knobay.HelloAppium.debug","deviceName":"iPhone Simulator","platformName":"iOS","appActivity":"air.com.knobay.pinktrainer.qa.AppEntry","browserName":"","bundleId":"com.knobay.HelloAppium.debug"}}
info: Using local app from desired caps: /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app
info: Creating new appium session c77e45c8-245a-4414-8036-61a57eb280a5
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Cleaning up any tracedirs
info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli1.trace
info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli2.trace
info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli0.trace
info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli3.trace
info: Setting Xcode folder
info: Setting Xcode version
info: Setting iOS SDK Version
info: iOS SDK Version set to 7.0
info: Detecting automation tracetemplate
info: Not auto-detecting udid, running on sim
warn: Could not parse plist file at /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app/en.lproj/Localizable.strings
info: Not setting locale
debug: Creating instruments
info: No iOS / app preferences to set
info: Starting iOS 7.* simulator log capture
info: Killing the simulator process
info: Killing any other simulator daemons
info: Cleaning app state.
info: No folders found to remove
info: Parsed app Info.plist
info: Wrote new app Info.plist with device type
debug: Launching device: iPhone
info: Simulator is now ready.
debug: No device id or app, not installing to real device.
debug: Starting instruments
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] 2014-05-20 15:52:16.851 instruments[25980:507] *** Assertion failure in -[UIAInstrument _startAgentForApp:withPID:], /SourceCache/AutomationInstrument/AutomationInstrument-1000/Classes/UIAInstrument-Simulator.m:116
2014-05-20 15:52:16.852 instruments[25980:507] Automation Instrument ran into an exception while trying to run the script.  NSInternalInconsistencyException

info: [INST] 2014-05-20 10:22:16 +0000 Fail: An error occurred while trying to run the script.
       
info: [INST] Instruments Trace Complete (Duration : 1.205165s; Output : /usr/local/lib/node_modules/appium/instrumentscli0.trace)
       
info: [INSTSERVER] Instruments exited with code 0
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #1
info: Killall iPhoneSimulator
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] 2014-05-20 15:52:23.952 instruments[25998:507] *** Assertion failure in -[UIAInstrument _startAgentForApp:withPID:], /SourceCache/AutomationInstrument/AutomationInstrument-1000/Classes/UIAInstrument-Simulator.m:116

info: [INST STDERR] 2014-05-20 15:52:23.952 instruments[25998:507] Automation Instrument ran into an exception while trying to run the script.  NSInternalInconsistencyException

info: [INST] 2014-05-20 10:22:23 +0000 Fail: An error occurred while trying to run the script.
       
info: [INST] 2014-05-20 10:22:24 +0000 Fail: The target application appears to have died
       
info: [INST] Instruments Trace Complete (Duration : 1.112698s; Output : /usr/local/lib/node_modules/appium/instrumentscli1.trace)
       
info: [INSTSERVER] Instruments exited with code 0
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #2
info: Killall iPhoneSimulator
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] 2014-05-20 15:52:31.019 instruments[26008:507] *** Assertion failure in -[UIAInstrument _startAgentForApp:withPID:], /SourceCache/AutomationInstrument/AutomationInstrument-1000/Classes/UIAInstrument-Simulator.m:116

info: [INST STDERR] 2014-05-20 15:52:31.020 instruments[26008:507] Automation Instrument ran into an exception while trying to run the script.  NSInternalInconsistencyException

info: [INST] 2014-05-20 10:22:31 +0000 Fail: An error occurred while trying to run the script.
       
info: [INST] 2014-05-20 10:22:31 +0000 Fail: The target application appears to have died
       
info: [INST] Instruments Trace Complete (Duration : 1.110122s; Output : /usr/local/lib/node_modules/appium/instrumentscli2.trace)
       
info: [INSTSERVER] Instruments exited with code 0
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #3
info: Killall iPhoneSimulator
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/gp/knobay/workspace/development/testautomation/weeklybranches/2ndmay14/Payload-3/HelloAppium.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] 2014-05-20 15:52:38.111 instruments[26016:507] *** Assertion failure in -[UIAInstrument _startAgentForApp:withPID:], /SourceCache/AutomationInstrument/AutomationInstrument-1000/Classes/UIAInstrument-Simulator.m:116

info: [INST STDERR] 2014-05-20 15:52:38.111 instruments[26016:507] Automation Instrument ran into an exception while trying to run the script.  NSInternalInconsistencyException

info: [INST] 2014-05-20 10:22:38 +0000 Fail: An error occurred while trying to run the script.
       
info: [INST] 2014-05-20 10:22:38 +0000 Fail: The target application appears to have died
       
info: [INST] Instruments Trace Complete (Duration : 1.120839s; Output : /usr/local/lib/node_modules/appium/instrumentscli3.trace)
       
info: [INSTSERVER] Instruments exited with code 0
info: Killall instruments
error: Instruments crashed on startup
info: Stopping iOS log capture
info: Killing the simulator process
info: Killing any other simulator daemons
info: Cleaning app state.
info: Deleted /Users/gp/Library/Application Support/iPhone Simulator/7.0.3/Applications
info: Deleted /Users/gp/Library/Application Support/iPhone Simulator/7.0.3/Library/Caches/locationd
info: Deleted /Users/gp/Library/Application Support/iPhone Simulator/7.0.3/Media
info: Deleted /Users/gp/Library/Application Support/iPhone Simulator/7.0.3/Library/Keychains
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: Error: Instruments crashed on startup
    at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:398:31)
    at null.<anonymous> (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:328:12)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:789:12)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
POST /wd/hub/session 500 28451ms - 210b

HelloAppium.ipa
HelloAppium.fxp

GnanaPrakash Rathinam

unread,
May 24, 2014, 10:30:07 AM5/24/14
to appium-...@googlegroups.com
Could someone shed light on solving above mentioned issue?

Vinothkumar Velusamy

unread,
May 25, 2014, 1:10:29 PM5/25/14
to appium-...@googlegroups.com

GnanaPrakash Rathinam

unread,
Jun 4, 2014, 1:08:48 PM6/4/14
to appium-...@googlegroups.com
We could able to successfully launch our iOS app using Appium. The problem caused due to the property value of DTPlatformName in .ipa info.plist is set to "iphone" even thought the build is targeted for iOS simulator, by manually setting the value by "iphonesimulator", we could able to launch app on iOS Simulator using Appium java client and also able to interact with native UI elements. Since most likely it looks like a bug as per Adobe AIR iOS settings.




On Tuesday, May 20, 2014 4:22:44 PM UTC+5:30, GnanaPrakash Rathinam wrote:
Reply all
Reply to author
Forward
0 new messages