Unable to capture objects, Reasons: SWTException

Then same here:
Katalon Studio Version: 6.1.5, Build: 3
Appium Version 1.8.1

Message: Unable to capture objects
Reason: SWT Exception

Details: Failed to execute runnable (org.eclipse.core.runtime.AssertionFailedException: null argument:)

Any solution for me?

Hi, @Chris_Trevarthen
I have the same issue…

Unable to capture objects - SWT Exception (for spy mobile)
Unable to capture objects - ExecutionException (for record mobile)

I try to make record/spy mobile on iOS

Mac OS Mojave 10.14.5
Katalon studio version: 6.1.5
Appium v1.13
Xcode 10.2.1

Can you tell us which version of appium/Xcode/Katalon we must use please ?

Thank you

Hi @g.colle,

I’ve had luck with:

MacOS Mojave 10.14.5
Katalon Studio 6.2.0 beta rc1 - Although the official 6.2.0 release is out now, but I haven’t tried it.
Appium Server 1.12.1
Xcode 10.2.1

Hope this helps,

Chris

Hi, How can I downgrade Appium => 1.12.1 ?

Hi @g.colle,

If you’re using Node Package Manager (npm) you can run on your command line:

npm install -g appium@1.12.1

And that should replace the existing version of Appium.

Hope this helps,

Chris

Thanks for your help.

I’ve installed the new version of Katalon + downgrade appium > 1.12.1

But now, katalon don’t found my iOS Device. My iOS Device is well connected to Xcode.

How can I solve this pls ?

Hi Chris,
I upgraded Katalon version. Today I have installed version 6.2.0 cr1 but when I use Mobile Spy i don’t see my real device. What’s the problem? Can you help me?
My version are: Katalon 6.2.0 - Xcode 10.2 - Appium 1.12

Hi @g.colle and @marco.pastore,

This seems like a common problem and there are some troubleshooting steps in this post (and the thread) that might help you fix it:

Hope this helps,

Chris

Hi Chris, I have problem yet. I used the link in top of your response for install v6.2.0.rc5, but when I use the spy mobile function my real device is not visble. In the list I see all xCode simulators and empty line that corresponds with my device. When I run ipa file there is the following error: device missing.
Later for v6.2.0 rc1 I do not see neither an empty line but only simulators list. Can you help me?

More informations: I check if my device is recognized with command idevice_id -l and I have the correct uuid on the terminal.

Hi @marco.pastore,

The empty line shows that there was a problem in libimobiledevice libraries and you need to reinstall them. If you use these commands, the error will show:

ideviceinfo -u <device_id>
idevicepair pair -u <device_id>

Please follow these instruction to resolve your issue:


Hi @duylong,
I reinstalled the library and run command and on terminal I don’t see any error( I attached the log of my terminal). From Katalon, when I use spy mobile function I see always and after run the appium log show my that message: “The mobile device is missing” that I suppose it is relative to first error.

marcopastore$ idevicepair pair -u
marcopastore$ ideviceinfo info -u
marcopastore$ idevice_id -l

Thanks for helps!

I am getting this error while recording / spy web application microsoft excel. Do you have any idea what could be the issue? I hope someone can help me

image

What actually I want to do is :

  1. Open Excel Application - able to open
  2. Do some action like click on row then click delete button (to delete row)

During step 2, i got the error. The details of error :

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.core.runtime.AssertionFailedException: null argument:)
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:255)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
at com.kms.katalon.composer.components.services.UISynchronizeService.syncExec(UISynchronizeService.java:26)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.refreshTreeElements(WindowsRecorderDialog.java:636)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.run(WindowsRecorderDialog.java:619)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(StructuredViewer.java:586)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1002)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:701)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1349)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:341)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:907)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:621)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:795)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:596)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:766)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1538)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:772)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1523)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1458)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:354)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1419)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1517)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1696)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3$2.run(WindowsRecorderDialog.java:639)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:165)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:369)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:481)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog.captureObjectAction(WindowsRecorderDialog.java:665)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog.startObjectInspectorAction(WindowsRecorderDialog.java:546)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog.access$10(WindowsRecorderDialog.java:529)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$6.widgetSelected(WindowsRecorderDialog.java:768)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at com.kms.katalon.composer.windows.handler.RecordWindowsObjectHandler.execute(RecordWindowsObjectHandler.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.ui.workbench.renderers.swt.DirectContributionItem.executeItem(DirectContributionItem.java:130)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at com.kms.katalon.core.application.Application.internalRunGUI(Application.java:180)
at com.kms.katalon.core.application.Application.runGUI(Application.java:170)
at com.kms.katalon.core.application.Application.start(Application.java:86)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

After creating the Mobile Project, When I click on Mobile Object Spy or Mobile Recorder and set the Application apk Path and then press the start button, It will launch the application on Mobile but throws the exception as well Unable to capture objects Reason: ExecutionException

Details: java.lang.NullPointerException