This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 12
Jan 2017

I’ve been testing an iOS app via the ipa file on Appium 1.5.3 via tethered iPhones (running iOS 9.3). I have Xcoce 7.3 on the Macbook that I test on. I need to start testing on iOS Simulators (iOS version 9.x is fine for now) and I’m having a problem getting the app to launch. What I’ve done:

Extracted the .ipa file to get the “.app” file. The ipa file came from the Developers who built the app with Xcode 8.2 and has a Dev’s signature. Again, this ipa file works fine in Appium via a tethered iPhone running iOS 9.3.
Changed Appium Server config (and Eclipse Java code) to point to the “app” file, setup the simulator (and code) name/version to the simulator configuration.

When I launch the Inspector or a TestNG test via Eclipse, the Simulator boots up, installs the app, the app opens but then closes immediately. This opening/closing of the app happens about 8 times in succession. The Appium Server log shows:

[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on iPhone 6s Plus (9.3) [
[Instruments] On xcode 7.0+, instruments-without-delay does not work, skipping instruments-without-delay
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/hv/z0cp2_j10xv5369mc3h7j1br3gw1kr/T/appium-instruments/instrumentscli0.trace -w "iPhone 6s Plus (9.3) [" /Users/appium/ipa/CompanyQA.app -e UIASCRIPT "/Users/leppo/Library/Application Support/appium/bootstrap/bootstrap-830a1e8114b80f74.js" -e UIARESULTSPATH /var/folders/hv/z0cp2_j10xv5369mc3h7j1br3gw1kr/T/appium-instruments'
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}
[debug] [Instruments] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.company.mobile.inhouse.qa'
[debug] [Instruments] Instruments exited with code 253
[Instruments] Error launching instruments: Instruments crashed on startup
[debug] [iOSSim] Killing all iOS Simulators

Does anybody know what could be wrong? Should I be able to extract the “app” file from the ipa file and use it in a Simulator, or does the app file need to be built separately? From what I understand about Appium 1.6x/iOS 10x, if I would upgrade Xcode to 8.x on the Mac that I test on, my scripts won’t work anymore using Appium 1.5.3. I know I need to eventually upgrade Appium to 1.6x and test on iOS 10, but for now I'm just trying to run my current test on a Simulator running iOS 9.x instead of on an iPhone running 9.3.

  • created

    Jan '17
  • last reply

    Apr '18
  • 11

    replies

  • 3.8k

    views

  • 6

    users

  • 1

    like

  • 2

    links

I'm not sure if I know what that means. I was given an ipa file (Dev signed) to test on tethered devices, and that works fine. From this ipa file I used the Mac's Archive Utility to extract the contents of this file. From the extracted contents, I grabbed the "app" file. Are you saying that I need an "app"-specific file that was generated via Xcode to specifically run on a Simulator? If so, then I guess the app file I'm using was not made specifically for a Simulator.

iOS devices use an ARM processor, but OS X run on an x386 type of processor. Since the Simulator is running on x386, you need to compile the app for that style of processor. Ask your Developer to create a Simulator compiled version of the app. Here is a tutorial on making a Simulator build (from the command line) for your perusal:

Hello @leppo i'm facing the same issue , but i partly solved it by trying different pc, here's my the specifications :
The Issue still on :
iMac : Intel Core i5 , 8 GB , 1536 MB

And its working on this :
MacBook Pro : Intel Core i7 , 16 GB , 1536 MB

And the simulator takes long time to launch every time (on iMac) are you facing the same issues ?

I only have one test machine, a MacBook Pro 16GB. The simulator takes about a minute to boot up, then the app opens quickly, but then I get the open/close behavior. I'll try the suggestion from wreed above since it sounds like the app file I'm using may not be compatible with a simulator.

Thanks for the tip @wreed . A developer followed those instructions and I was able to use the resulting app file to load up the app in a simulator via the Appium Inspector. Unfortunately, when I try to run a TestNG test from my code, I get the below error:

[Support] Error: Plist file doesn't exist: '/Applications/Appium.app/Contents/Resources/node_modules/com.company.mobile.inhouse.qa/Info.plist'
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at parsePlistFile$ (lib/plist.js:22:11)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke

I've modified the capabilities in my code to use the same iOS Simulator that works with the Inspector. Is there something else I need to do in my code to find the 'plist'?

I stumbled across a solution for the above problem. If I uncheck the "BundleID" check box in the Appium Server UI, then my TestNG tests run. Thanks for the help!

Are you sure that the Launcher Activity/ Bundle id specified is correct? maybe you should look out for the proper launcher activity for your app because the app will launch and close if the activity is incorrect.

1 year later

Hi leppo, I am also stuck with same issue as discussed in threas

You have mention some tip from @wreed, If you can please share that will help me bro.

Thank You.

Hi- It’s been over a year since I had that problem, but I believe that the problem was that the app file was either not properly signed as a Development build, and/or the ‘app’ file was not configured correctly for the simulator I was using. I sent the above link (“How to create Simulator Build and run on Simulator”) to my iOS Developer and he created an ‘app’ file that worked.