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


How to read toast message in android
#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

EDIT: Katalon Studio 5.10.1 also supports Appium 1.8.2-beta, although you only need this version if you’re testing Xcode10 and iOS12.

– Chris


#16

The above worked for me. Thank you !


#17

Hi ,

open terminal and;
go to >> cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

write >> mkdir -p Resources/WebDriverAgent.bundle

write>> sh ./Scripts/bootstrap.sh -d

These ones gonna help to solve your problem.

Good luck!


#18

Hi @Chris_Trevarthen,

I Tried this
EDIT: Katalon Studio 5.10.1 also supports Appium 1.8.2-beta, although you only need this version if you’re testing Xcode10 and iOS12.

Configuration:
Mac Os 10.14.4 (Mojave)
IOS 12.1 (iPad)
appium 1.8.2-beta
Xcode 10.1
Katalon 5.10.1

but katalon not detecting device, Please refer attached screenshot
which version of katalon studio should work with above configuration?

Thanks in Advance.


#19

Hi @chandu.komireddy,

XCode 10.1, iOS 12.1 and appium 1.12.1 are both officially supported in v6.2.0.rc1 in later. Please download at this link: Katalon Studio version 6.2.0.rc1 with experimental support for iOS 12.2 and Xcode 10.2

Katalon 5.10.1 only supports XCode 9.4.1 and Appium 1.8.1.

Thanks


#20

Hi @duyluong,

Thanks for quick response.
Lets try and let you know. and also please share an link contains the version compatibility with Xcode, IO, Appium and Katalon versions.

Thanks in Advance.