I can not launch the IOS application on my iphone emulator.


#1

Hello,
I contact you to have information, I am looking to automate a mobile application .IPA
The problem is when I run the application via katalon, it installs the application but the application open and closes immediatly. An error 66 is generated.
Moreover, during the Xcode configuration, I have an error message on the signature: "Failed to create provisioning profile.
The app ID “com.facebook.WebDriverAgentRunner” can not be registered to your development team. Change your bundle to a unique string to try again. "
"No profiles for ‘com.facebook.WebDriverAgentRunner’ were found
Xcode could not find any iOS App Development provisioning profiles matching ‘com.facebook.WebDriverAgentRunner’. "
I select my profile Apple ID.
So I have a question, must I have a profile IOS developer? Iphone developer? both?

in the build settings, I selected IOS Developer for the Signing part WebDriverAgentRunner and for WebDriverAgentLib.


My opinion is that I must have on my Apple ID a signature Ios Developer can you confirm it?

When I launch the start application with IPA, here is the log generator:

01-18-2019 06:24:29 PM Test Cases/Mobile/IOS/App Pro/StartApplicationPro

Elapsed time: 1m - 5,812s

Test Cases/Mobile/IOS/App Pro/StartApplicationPro FAILED.

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘/Users/tassi/Documents/APPPROJANVIER/IOS/ProApp.ipa’ (Root cause: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 66”. (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 61.50 seconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘MACBOOK-PRO031.local’, ip: ‘fe80:0:0:0:4e8:f1de:f18a:5c7a%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.14’, java.version: ‘1.8.0_181’

Driver info: driver.version: IOSDriver)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)

at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)

at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)

at StartApplicationPro.run(StartApplicationPro:16)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)

at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)

at TempTestCase1547832266587.run(TempTestCase1547832266587.groovy:22)

Thanks in advance and I apologize for my level in English …


#2

Hi Mehdi,

First, you’re right - you’ll need to select your “iPhone Developer” signing certificate for the WebDriverAgentRunner. You’ll need to change the Product Bundle Identifier for WebDriverAgentRunner to something other than the default Facebook one (because that’s already taken). So in the Build Settings tab, you can change the Product Bundle Identifier to something like com.mycompany.wda.runner.

Secondly, I don’t think you can test a .ipa file on a simulator - .ipa files are usually created to be run on real devices. To test on a simulator, you can use the .app file (which is unsigned) from your project’s DerivedData directory.

Hope this helps,

Chris


#3

Hi Chris,
Thank you for your return so fast. I will try all this and come back to you.
What is the difference between Iphone developer and IOS Developer?

Thanks again for your help

Mehdi


#4

I managed to remove all xcode errors.
I do not understand this sentence: “you can use the .app file (which is unsigned) from your project’s DerivedData directory.”
Does this mean that the project correspond to the app created under Xcode?

When I run with the emulator, WebDriverAgentRunner installs on my emulator but it puts me this error message:


This is normal?

Thank you for your help Chris and for the time you spend helping me

Looking forward


#5

Hi @mehdi.tassi,

The difference between “iPhone Developer” and “iOS Developer” is a good question. From what I can tell, they’re going to have the same effect. “iPhone Developer” is how the Apple developer certificates are named, so if you choose one manually, you’ll probably see that. “iOS Developer” is used when you allow Xcode to manage code signing for you.

Here’s an interesting article about provisioning profiles and code signing in Xcode:

– Chris


#6

Regarding your question about the .app file:

When you build a project in Xcode, it puts the built application in a “DerivedData” directory. The file is put in an unsigned .app package. The location of the DerivedData directory can be set in your Xcode->Preferences->Locations settings:

In my case, above, I have it building to a /DerivedData directory within my Xcode project’s directory, so in my case, the .app file is located at: MyProject/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/MyProject.app.

So, when I want to run the Katalon tests against my app, I can point to that file in the Katalon test, since the file is a) unsigned and b) built for simulators.

As for the error about “Could not attach to pid: 9796”, that is NOT normal. The first thing you could try doing is starting the simulator you have called “iPhone Test Katalon 11.4”. Using the simulator menu option for Hardware->Erase All Contents and Settings, clear the simulator’s installed apps and try again.

Hope this helps,

Chris


#7

Hi Chris and sorry for the delay.
Thank you for your help and your implication.
I managed to recover the .app and launch the simulator.
But I have a problem.
the application installs, as well as Web Driver Agent.
on the other hand once imported on the simulator, the application does not open and I have a strange feeling.

Here is some info:
Xcode version = 10.1
Appium version = 1.8.2-beta
simulator device = Ipad 9,7 ios 11.3
Katalon version = 6.1.0

On Xcode WDA the lib and runner this build well without problem.Idem for my app (which I run on the simulator to test.
I suppose there is a conflict with WDA but I can not solve this problem. I tried to kill the Appium process but in vain I still have this message …

here are the logs that Katalon generates for me:
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
2019-03-28 09:51:57.562 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-03-28 09:51:57.565 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Mobile/IOS/App Pro/StartApplicationPro
2019-03-28 09:51:58.057 DEBUG testcase.StartApplicationPro - 1: startApplication("/Users/tassi/Desktop/ProApp.app", true)
2019-03-28 09:51:58.306 INFO c.k.k.c.m.k.i.MobileDriverFactory - User set preference: [‘platformVersion’, ‘11.3’]
2019-03-28 09:51:58.307 INFO c.k.k.c.m.k.i.MobileDriverFactory - User set preference: [‘deviceId’, ‘DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF’]
2019-03-28 09:51:58.487 INFO c.k.k.c.a.driver.AppiumDriverManager - ios_webkit_debug_proxy server started on port 51697
2019-03-28 09:52:03.253 INFO c.k.k.c.a.driver.AppiumDriverManager - Appium server started on port 51 700
[Appium] Welcome to Appium v1.8.2-beta (REV 3ad2a252abe0c36fcff35f7cfb129c7f2c1abdc9)
[Appium] Non-default server args:
[Appium] port: 51700
[Appium] loglevel: info
[Appium] chromeDriverPort: 51701
[Appium] tmpDir: /var/folders/4j/w1f7dmx11_sfx9nfwydvtzk00000gp/T//Katalon/Appium/Temp1553763118488
[Appium] webkitDebugProxyPort: 51697
[Appium] Appium REST http interface listener started on 0.0.0.0:51700
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[HTTP] <-- GET /wd/hub/status 200 17 ms - 126
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“app”:"/Users/tassi/Desktop/ProApp.app",“automationName”:“XCUITest”,“deviceId”:“DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF”,“deviceName”:“Ipad App Pro 11”,“fullReset”:true,“newCommandTimeout”:1800,“noReset”:false,“platform”:“IOS”,“platformName”:“iOS”,“platformVersion”:“11.3”,“realDeviceLogger”:"/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/tools/deviceconsole/deviceconsole",“waitForAppScript”:“true;”,“wdaLocalPort”:51696},“capabilities”:{“desiredCapabilities”:{“app”:"/Users/tassi/Desktop/ProApp.app",“automationName”:“XCUITest”,“deviceId”:“DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF”,“deviceName”:“Ipad App Pro 11”,“fullReset”:true,“newCommandTimeout”:1800,“noReset”:false,“platform”:“IOS”,“platformName”:“iOS”,“platformVersion”:“11.3”,“realDeviceLogger”:"/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/tools/deviceconsole/deviceconsole",“waitForAppScript”:“true;”,“wdaLocalPort”:51696},“firstMatch”:[{“platformName”:“ios”}]}}
[Appium] Could not parse W3C capabilities: ‘deviceName’ can’t be blank. Falling back to JSONWP protocol.
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: [“app”,“automationName”,“deviceId”,“deviceName”,“fullReset”,“newCommandTimeout”,“noReset”,“platform”,“platformName”,“platformVersion”,“realDeviceLogger”,“waitForAppScript”,“wdaLocalPort”]. Falling back to JSONWP protocol.
[Appium] Creating new XCUITestDriver (v2.109.0) session
[Appium] Capabilities:
[Appium] app: /Users/tassi/Desktop/ProApp.app
[Appium] automationName: XCUITest
[Appium] deviceId: DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF
[Appium] deviceName: Ipad App Pro 11
[Appium] fullReset: true
[Appium] newCommandTimeout: 1800
[Appium] noReset: false
[Appium] platform: IOS
[Appium] platformName: iOS
[Appium] platformVersion: 11.3
[Appium] realDeviceLogger: /Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/tools/deviceconsole/deviceconsole
[Appium] waitForAppScript: true;
[Appium] wdaLocalPort: 51696
[BaseDriver] The following capabilities were provided, but are not recognized by appium: deviceId, platform.
[BaseDriver] Session created with session id: ebb749bc-ab1d-411b-8444-b7924761538b
[iOSSim] Constructing iOS simulator for Xcode version 10.1 with udid ‘DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF’
[XCUITest] Determining device to run tests on: udid: ‘DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF’, real device: false
[BaseDriver] Using local app ‘/Users/tassi/Desktop/ProApp.app’
[iOSSim] Cleaning simulator DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF
[XCUITest] Continuing without capturing device logs: iOS Simulator with udid DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF is not running
[XCUITest] Setting up simulator
[iOSSim] Booting Simulator with UDID DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF…
[iOSSim] Starting Simulator UI with command: open -Fn /Users/tassi/Downloads/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF -ConnectHardwareKeyboard 0
[iOSSim] Simulator with UDID DB144DCD-7E14-4A4D-B0E7-F03E0D212ECF booted in 21 seconds
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’

[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Launching WebDriverAgent on the device
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 18526)
[XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’
[XCUITest] Launching WebDriverAgent on the device
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:51696}
[
[WD Proxy] Got an unexpected response: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:5169
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 18580)
[XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’
2019-03-28 09:58:53.080 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceId = null
2019-03-28 09:58:53.082 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceName = Ipad App Pro 11
2019-03-28 09:58:53.083 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceModel = Not available for Simulator
2019-03-28 09:58:53.084 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceManufacturer = Apple
2019-03-28 09:58:53.084 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceOS = iOS
2019-03-28 09:58:53.085 INFO c.k.k.c.a.driver.AppiumDriverManager - deviceOSVersion = 11.3
2019-03-28 09:58:53.091 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to start app at: ‘/Users/tassi/Desktop/ProApp.app’
2019-03-28 09:58:53.097 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: startApplication("/Users/tassi/Desktop/ProApp.app", true) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘/Users/tassi/Desktop/ProApp.app’
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)
at StartApplicationPro.run(StartApplicationPro:16)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1553763115027.run(TempTestCase1553763115027.groovy:21)

2019-03-28 09:58:53.108 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/Mobile/IOS/App Pro/StartApplicationPro FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘/Users/tassi/Desktop/ProApp.app’
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)
at StartApplicationPro.run(StartApplicationPro:16)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1553763115027.run(TempTestCase1553763115027.groovy:21)

2019-03-28 09:58:53.128 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/Mobile/IOS/App Pro/StartApplicationPro

Thanks you Chris for your help,

Best regards.

Mehdi


#8

Hello,
I come back to you because I managed to set up the automation of tests on IOS. The last problem came from my app.

I put my configuration so that everyone takes it if necessary.
Appium version = 1.8.2-beta
Xcode = Version 10.1 (10B61)
Simulator IOS = 11.3 IOS ipad 9,7
Katalon version = 6.1.0

Thanks all for help,

best regards,