Not able to see real ios device in the device list

Hi,

I can see the device in xcode.I can see the device here as well. I am using 5.5 version

cd /Applications/Katalon\ Studio.app/Contents/Eclipse/configuration/resources/tools/imobiledevice

`idevice_id -l

I can see device when I run the cmd but not in device list`

milind said:

Hi,

I can see the device in xcode.I can see the device here as well. I am using 5.5 version

cd /Applications/Katalon\ Studio.app/Contents/Eclipse/configuration/resources/tools/imobiledevice

`idevice_id -l

I can see device when I run the cmd but not in device list`

does anyone have experience in working with real ios devices with katalon

1 Like

milind said:

milind said:

Hi,

I can see the device in xcode.I can see the device here as well. I am using 5.5 version

cd /Applications/Katalon\ Studio.app/Contents/Eclipse/configuration/resources/tools/imobiledevice

`idevice_id -l

I can see device when I run the cmd but not in device list`

does anyone have experience in working with real ios devices with katalon

I am experiencing this too

iam also not able to get the ios device in the list,so please help me

I got this resolved by changing the mac … not sure what is the exact reason … but when I changed to work from mac laptop tp mac mini … it started identifying device. Frankly speaking not aware of the root cause yet

Attempted to follow the “resolution” post here, but without more detail/further clarification it is hard to follow. Has anyone found a solution to this? If so, Please post with details on how to implement. Is this an XCODE issue, Katalon Issue, Appium configuration? I have seen numerous posts on this same topic and there is no one from either the community or Katalon posting any answers. Please help as I am dead in the water with IOS device testing at the moment.

Hi @Chris Trevarthen maybe you can help us with what we encounter with Katalon, it does not display the real iOS device in device list.

Hi Aaron,

This is a problem that a lot of people come across, and so far I don’t have a definitive solution. Here are a few things you can try:

First, make sure you follow the steps from the Katalon documentation for setting up the WebDriverAgent:

https://docs.katalon.com/katalon-studio/docs/installing-webdriveragent-for-ios-devices.html

Similar documentation from Appium about real device setup:

https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

Verify/switch your Xcode’s tools directory:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Assuming your Xcode directory is at /Applications/Xcode.app

Reset the trust settings between your device and the computer

Here are a couple of articles about that. You can see if it works to get the trust prompt to show again (and hopefully your device recognized):

http://osxdaily.com/2014/03/24/trust-this-computer-alert-ios/

https://www.idownloadblog.com/2015/09/01/how-to-untrust-iphone-ipad/

Check if the device is recognized by command line tools outside of Xcode

These tools may be used by Appium and Katalon Studio to communicate with real devices.

idevice_id -l

If that does show your device (or if you don’t have idevice_id installed), then it could be that you don’t have permissions to run some of the other command line tools that Katalon (and Appium behind the scenes) require. You can reinstall those tools with:

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install --HEAD  ideviceinstaller
brew link --overwrite ideviceinstaller
sudo chmod -R 777 /var/db/lockdown/

Manually edit the iOS settings for the current project

As a workaround, you can edit the settings/internal/com.kms.katalon.core.mobile.ios.properties directly to bypass the Katalon menu and put in the UDID of your device. In my case, my iOS12 simulators are not shown in the Katalon dropdown, so I got the list of devices using the command line:

instruments -s devices

I then opened the settings/internal/com.kms.katalon.core.mobile.ios.properties under my test project (these are per-project settings) to include the deviceId for the iOS12 device I want to test. I think this should work for physical devices as well.

My file looks like this:

{"IOS_DRIVER":{"xcodeOrgId":"*******","updatedWDABundleId":"com.mycompany.WebDriverAgentRunner","showXcodeLog":false,"deviceId":"0C3F1694-ADB9-4010-AD3C-A0BE533746EE"}}

Save that file and restart Katalon Studio. When you run the test, it should run on the desired device.

Finally, uninstall everything or try another machine.

This solution is not ideal, but I have seen many people say that restoring their system from a backup or reinstalling Xcode, Appium, and Katalon Studio worked for them.

Hope this helps,

Chris

1 Like

Hello @Chris_Trevarthen, @duyluong ,

We still have problems with launching/inspect the app on real iOS device or simmulator.
We are quite positive we have followed all the above hints and 10+ other related topics (the more recent ones that are linked to your above response included).
We covered several video tutorials also: https://youtu.be/73hgLeIBrgA?t=982 + https://docs.katalon.com/katalon-studio/docs/mobile-on-macos.html etc.

By the way, our developers state that IPAs cannot be launched on simulators at all, only on real devices. Do we have the wrong conclusion about simulators and iOS?

This is the response we get from Katalon launching the app:

Caused by: java.lang.IllegalArgumentException: The mobile device is missing. Please select the mobile device to be executed and try again.

This is what we have:

  1. iPhone 7 128 GB, iOS 12.3.1

  2. Appium Desktop 14.0 can successfully install and open the ipa on above real device

  3. Appium server is 1.12.1, this is the one Katalon Studio 6.2.0 is using.

  4. Mac Os X Mojave 10.14.5, Xcode Version 10.2 (10E125), Node 6.9.0.

  5. Our desired capabilites look something like this:
    {
    “appWaitActivity”: “*”,
    “platformName”: “iOS”,
    “platformVersion”: “12.3.1”,
    “deviceName”: “Gabriel’s iPhone”,
    “udid”: “xxxxxxxxx”,// (<-- real values here)
    “bundleId”: “xxxxxxxx”,// (<-- real values here)
    “xcodeOrgId”: “xxxxxxxx”,// (<-- real values here)
    “app”: “/Users/gabriel/Downloads/2.ipa”
    }

  6. Katalon Studio sees the device as a hashstring, not the device name or type, so we can only believe this is the one. Definitely it’s not a simulator since they are listed accordingly. When using Mobile.startApplication() we get the above message, and bellow we paste the entire log message.

Test Cases/Verify the main list FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘/Users/gabriel/Downloads/2.ipa’ (Root cause: java.lang.IllegalArgumentException: The mobile device is missing. Please select the mobile device to be executed and try again.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:382)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:283)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword$_startApplication_closure1.doCall(StartApplicationKeyword.groovy:49)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword$_startApplication_closure1.call(StartApplicationKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
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 Verify the main list.run(Verify the main list:22)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
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 TempTestCase1563350016347.run(TempTestCase1563350016347.groovy:21)
)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
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 Verify the main list.run(Verify the main list:22)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
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 TempTestCase1563350016347.run(TempTestCase1563350016347.groovy:21)
Caused by: java.lang.IllegalArgumentException: The mobile device is missing. Please select the mobile device to be executed and try again.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:382)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:283)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword$_startApplication_closure1.doCall(StartApplicationKeyword.groovy:49)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword$_startApplication_closure1.call(StartApplicationKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
… 17 more

So, after ~7 days of attempts and small progress, we are still not able to run/inspect ipa on simulator or real device. Also tried with a different iPhone, same result.
The weird part is the Appium Desktop seems to install, open and inspect the same ipa on the same hardware and software platform.

Thank you for your feedback,
Cornel

@Neacsu_Cornel,

Please show us some screenshot of the execution log, Job Progress view.
Did you run the test with the iOS execution or Remote or custom execution?

Thanks.

Hi @Neacsu_Cornel,

To my knowledge, you can’t directly run an IPA on a simulator because an IPA is built and signed with a real device architecture target - arm for iOS devices instead of x86, which would be the architecture of the machine the simulator runs on. I’m not sure why this would manifest itself as the “mobile device is missing” error, though.

Appium Desktop may be doing something to extra the .app from the .ipa though, which you might be able to do manually like someone describes here:

With the app in-hand, you should be able to load that onto a simulator.

Hope this helps,

Chris

1 Like

Thank you for the interest @duyluong.

I am attaching our execution steps in the bellow video.

Seems it is not loading in the forum so I am also pasting the plain link

https://drive.google.com/file/d/17mdK_S_XMxI9ZDamz0F-VvOEYSPvQmjz/view?usp=sharing

We run the test by iOS execution, no remote or custom involved.

Should we try, just for test’s sake, downgrading KS and Appium as mentioned bellow?

@Chris_Trevarthen, will try that today. Thanks a million.

Cornel

Hi @Neacsu_Cornel,

I saw you selected an “unrecognized device” in the video that means KS will not recognize your device during the test. To resolve this issue, please use these commands:

sudo chmod -R 777 /var/db/lockdown/
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install ios-webkit-debug-proxy
brew install --HEAD libimobiledevice
brew unlink libimobiledevice
brew link libimobiledevice

and follow this topic.

We will consider to bring libimobiledevice, ios-webkit-debug-proxy and usbmuxd back to Katalon Studio due to too many users have faced this issue.

Thanks.

2 Likes

@duyluong
Your answer and topic link helped us a lot. We can now inspect ipa file and execute the test on a real iPhone device.

Thank you for the specific and fast support!

1 Like