iOS application keeps on launching and closing immediately


#1

Host machine: macOS Mojave version: 10.14.6 (18G87)
node version: v12.8.1
npm version: 6.10.3
appium version: 1.14.1
Xcode version: 10.3
iOS Simulator: iPhone 6

Followed the steps mentioned here:

Other info:
Appium version 1.14.1 webdriver agent project was missing withing appium-xcuitestdriver folder. Hence, initialize WebDriverAgent project from appium-webdriveragent directory. i.e. here:
/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent

Test script included the following:
Mobile.startApplication(’/Users/yeaser.khan/Desktop/lylink-dev_v2.4/lylink-dev.ipa’, false)

Mobile.delay(5)

Mobile.closeApplication()

Following is the EXECUTION LOG:

Please let me know if any further information is required to debug this issue. Your prompt response will be highly appreciated. I’ve been trying to find a workaround for the past 3~4 days now. I need the help very urgently. After doing some research on google I came up with those capabilities which I set on the project settings on Katalon Studio. Those informations can be found on the log above.

@duyluong - If you have some time do you mind taking a look into this one please? Your humble and prompt feedback will be highly appreciated!

cc: @vinhnguyencse04


#2

Hi @Noor_Yeaser_Khan,
Please use appium 1.14.0 or 1.14.2.rc because 1.14.1 has a critical bug https://github.com/appium/appium/issues/13047

Thanks


#3

Thank you @duyluong - Downgrading from Appium version 1.14.1 to 1.14.0 resolved the above mentioned issue. Thank you so very much! :bowing_man:


#4

I have appium version 1.14.2. Still I am unable to launch app.


#5

Hi @sejal.vala - Can you please mention which version of the following are you using:
Katalon version
npm version
node version
Host Machine OS
Physical device true or false
Xcode version
iOS version


#6

Katalon version - 6.3.0
npm version - 6.4.1
node version - 10.15.3
Host Machine OS - MAC 10.14.6
Physical device true or false - simulator
Xcode version - 10.2
iOS version - 12.2


#7

Hi @sejal.vala -
I have the exact same configuration (but with appium version 1.14.0) and I am able to launch any iOS app with valid bundle id or .app/.ipa file in a real iOS device.

Follow the steps provided here at first: https://docs.katalon.com/katalon-studio/docs/mobile-on-macos.html#iOS
Then verify that Katalon Studio can detect your real device from either Mobile Spy/Record option.

Then follow the steps provided here: https://docs.katalon.com/katalon-studio/docs/installing-webdriveragent-for-ios-devices.html
Then verify that WebDriverAgent is built successfully. Xcode with give you the message for successful built.

Then follow the steps here to get the udid of your real device: https://www.idownloadblog.com/2018/11/20/how-to-find-udid-iphone-xs-max-xr/

Then run these commands on your terminal:

  1. cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
  2. xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=<udid_of_device>’ test
    You will get the message test failed.
    However, verify that WebDriverAgent is installed in your real device.
    Since this will be the first time installing the WDA (WebDriverAgent) follow these steps to trust the WDA:

Settings => General => Device Management on the device to trust the developer and allow the WebDriverAgentRunner app to be run

(Reference: http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/)
Re-run the command:

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=<udid_of_device>’ test

This time verify the test has passed. The passed test can be verified if the following messages are seen in the terminal after running the above command:

Test Suite ‘All tests’ started at 2017-01-23 15:49:12.585
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-01-23 15:49:12.586
Test Suite ‘UITestingUITests’ started at 2017-01-23 15:49:12.587
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-01-23 15:49:12.588
t = 0.00s Set Up

Hit Cmd+C to exit the test.

Now you should be able to launch the application in Katalon using it’s Spy/Record. If not then please provide an error log for further investigation. @duyluong Please do let me know if I’ve missed any step.

Regards,
Noor Yeaser Khan


#8

Thanks… I will try this…