Unable to capture objects, Reasons: SWTException


#1

yesterday me and my friend both build on two separate machines and totally separated individual server profile, and both of us meet this error.

searched and saw many people on internet also met this problem. and no clue to fix.

How to fix this?

42925985_330468941020565_1169242406101450752_n.png


#2

I am facing the same issue. Seems to be the combination of Katalon5.7.1, Appium1.9.1 and Apps built by Xcode10.


#3

Hi CK,

Can you confirm which version of Appium you’re using? There are compatibility issues with version 1.9.1 and Katalon Studio, so if you’re running that version you should downgrade to 1.8.1 and see if that helps.

Mathias, I am able to run an Xcode10 project in Katalon 5.7.1 using Appium 1.8.1, so I think the main issue is the Appium version, not the Xcode version

CORRECTION: The app can be *built* in Xcode10, but Katalon tests won’t run if your selected system version of Xcode is v10. A workaround is to download and install a separate version of Xcode 9.4.1 and set that as the primary version of Xcode when you’re running Katalon tests:

sudo xcode-select -s /Applications/Xcode9.4.1.app/Contents/Developer

- Chris


#4

ah, nice workaround @Chris Trevarthen thanks!

EDIT:
Unfortunately that does provoke the SWTException


#5

Hi Mathias, Appium 1.9.1 is still not supported by Katalon, so the working scenario I have is:

Xcode 9.4.1 set as my default in xcode-select
Xcode 10 installed as my app development environment
Appium 1.8.1
Katalon Studio 5.7.1

I am able to capture objects successfully without the SWTException.

- Chris


#6

Mathias,

OK, I started getting the SWTException as well, but in Android, so I think it’s related to the Katalon tool itself. It’s going to sound annoying, but I was able to get past it by quitting the emulator/simulator, quitting Katalon Studio, and restarting my computer. After that, things started working again.

- Chris


#7

i have the same issue

i use katalon 5.8.0
appium 1.8.1
java 11

are there any solution ?


#8

Mai Anh Trung said:

i have the same issue

i use katalon 5.8.0
appium 1.8.1
java 11

are there any solution ?

did you solve this?


#9

any update on Xcode10 built app-compatibility? :confused:


#10

I am also getting same type of issue. It is taking more than 20 minutes to capture and at last it is throwing this message - “Unable to capture object. Reason : SWT Exception”…

How to solve ?


#11

Prabhudatta Nayak said:

I am also getting same type of issue. It is taking more than 20 minutes to capture and at last it is throwing this message - “Unable to capture object. Reason : SWT Exception”…

How to solve ?

Try to check the appium path . Sometimes it causes SWTException because of this


#12

Chris Trevarthen said:

Mathias,

OK, I started getting the SWTException as well, but in Android, so I think it’s related to the Katalon tool itself. It’s going to sound annoying, but I was able to get past it by quitting the emulator/simulator, quitting Katalon Studio, and restarting my computer. After that, things started working again.

- Chris

I am also observing the issue with below versions -
Appium 1.8.1
Katalan 5.7.1.

I’ve restarted machine but no luck

IssueKatalon.png


#13

Hi chandramouli,

Usually, the SWTException is thrown by Katalon or the underlying Eclipse IDE on which it’s built. In my experience, there’s not much that you can do to fix this, other than closing your project and restarting Katalon, or uninstalling and reinstalling Katalon Studio.

For more info on SWTExceptions.

Sorry I can’t be of more help,

Chris


#14

i have same issue
using Appium 1.10.0
android 5.0.


#15

Hi akrana97,

Katalon Studio (5.10.1 right now) only supports Appium 1.8.1 currently. Can you try downgrading your version of Appium and see if that helps?

To install Appium 1.8.1:

npm install -g appium@1.8.1

– Chris