SWT Exception on IoS application in Specific pages with Tree Hierarchy

Hi Team,

Katalon 7.1.1
Appium 1.15.1
xcode 10

I am facing SWT exception in certain pages on my iphone app and Katalon is not capturing the objects. I am doing PoC for one of client in US. If we can resolve the issue , we are interested to talk to your sales team for permanent license for certain users.

Please let me know how to resolve the issue.

Thanks,
Hariharasudhan Soundararajan

Hi @shhshp.qa,

Can you please share the a screenshot of the error, a stack trace, console log, and any screenshots you have for the actual screens where you’re seeing this error?

Thanks,

Chris

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:4814)

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.mobile.objectspy.dialog.MobileObjectSpyDialog$14.refreshTreeElements(MobileObjectSpyDialog.java:825)

at com.kms.katalon.composer.mobile.objectspy.dialog.MobileObjectSpyDialog$14.run(MobileObjectSpyDialog.java:806)

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.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:409)

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.mobile.objectspy.dialog.MobileObjectSpyDialog$14$3.run(MobileObjectSpyDialog.java:829)

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:4032)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3708)

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.mobile.objectspy.dialog.MobileObjectSpyDialog.captureObjectAction(MobileObjectSpyDialog.java:859)

at com.kms.katalon.composer.mobile.objectspy.dialog.MobileObjectSpyDialog.access$8(MobileObjectSpyDialog.java:783)

at com.kms.katalon.composer.mobile.objectspy.dialog.MobileObjectSpyDialog$10.widgetSelected(MobileObjectSpyDialog.java:620)

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:4256)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)

at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4080)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3706)

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:170)

at com.kms.katalon.core.application.Application.runGUI(Application.java:160)

at com.kms.katalon.core.application.Application.start(Application.java:81)

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)

Please find the Katalon logs as wellKatalonlogs.txt (275.1 KB)

You may try to update Appium to v1.16.0 or later.

A similar issue: https://github.com/appium/appium/issues/13504

I updated but still the issue is same.

1 Like

I am facing the exact same issue. Is there any update on this issue?

@duyluong
@Chris_Trevarthen
Is there any update on the issue?
I am facing the same issue. I tried to use tap at position on the page which has a Tree Hierarchy Structure (iOS). The app closes forcibly and Katalon gives out an error saying

An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

The issue is not intermittent. It falls every time at the same page.
The issue persists with

Appium 1.17.0
Xcode 11.4.1
Katalon Studio Enterprise 7.4.0

Please let know if there is a solution. This is a potential blocker and we are not able to proceed automation.

Thanks
Jerin

Hi @jerin,

Can you please share a screenshot of what the app looks like on the page with the tree hierarchy, a screenshot of the All Objects pane from Katalon’s Spy Mobile that shows the various objects on the page, and the console log?

Thanks,

Chris

Hi @Chris_Trevarthen,

As this is a public forum, I have masked the fields of the screenshot, but it is the structure.

When I try to capture the objects with mobile spy, the app simply crashes giving a SWT Exception.

When I run the test script on that particular page, the app crashes and giving the log

05-08-2020 10:51:09 AM Test Cases/iOS - Play video

Elapsed time: 1m - 48.584s

Test Cases/iOS/Play video FAILED.

Reason:

com.kms.katalon.core.exception.StepFailedException: Failed to tap at [80, 111] (Root cause: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’

System info: host: ‘Mac-Mini’, ip: ‘192.168.1.77’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.4’, java.version: ‘1.8.0_181’

Driver info: io.appium.java_client.ios.IOSDriver

Capabilities {app: /Volumes/Macintosh HD - Dat…, automationName: XCUITest, browserName: , chromedriverPort: 49939, databaseEnabled: false, deviceId: a57949b846006b726529fa8a609…, deviceName: iPhone, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 1800, noReset: true, platform: MAC, platformName: iOS, platformVersion: 13.1.3, realDeviceLogger: /Applications/Katalon Studi…, takesScreenshot: true, udid: xxxx, waitForAppScript: true;, wdaLocalPort: 49935, webStorageEnabled: false}

Session ID: 80871a25-2a25-4bf1-b180-e97d4d357693

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)

at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)

at io.appium.java_client.TouchAction.perform(TouchAction.java:187)

at com.kms.katalon.core.mobile.helper.MobileElementCommonHelper.tapAtPosition(MobileElementCommonHelper.java:370)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword$_tapAtPosition_closure1.doCall(TapAtPositionKeyword.groovy:70)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword$_tapAtPosition_closure1.call(TapAtPositionKeyword.groovy)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword.tapAtPosition(TapAtPositionKeyword.groovy:72)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword.execute(TapAtPositionKeyword.groovy:64)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.tapAtPosition(MobileBuiltInKeywords.groovy:1664)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$tapAtPosition$3.call(Unknown Source)

at iOS - Play video.run(iOS - Play video:32)

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 TempTestCase1588891867704.run(TempTestCase1588891867704.groovy:25)

)

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.TapAtPositionKeyword.tapAtPosition(TapAtPositionKeyword.groovy:72)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword.execute(TapAtPositionKeyword.groovy:64)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.tapAtPosition(MobileBuiltInKeywords.groovy:1664)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$tapAtPosition$3.call(Unknown Source)

at iOS - Play video.run(iOS - Play video:32)

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 TempTestCase1588891867704.run(TempTestCase1588891867704.groovy:25)

Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’

System info: host: ‘Petsons-Mini’, ip: ‘192.168.1.77’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.4’, java.version: ‘1.8.0_181’

Driver info: io.appium.java_client.ios.IOSDriver

Capabilities {app: /Volumes/Macintosh HD - Dat…, automationName: XCUITest, browserName: , chromedriverPort: 49939, databaseEnabled: false, deviceId: a57949b846006b726529fa8a609…, deviceName: iPhone, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 1800, noReset: true, platform: MAC, platformName: iOS, platformVersion: 13.1.3, realDeviceLogger: /Applications/Katalon Studi…, takesScreenshot: true, udid: xxxxxxxxxx, waitForAppScript: true;, wdaLocalPort: 49935, webStorageEnabled: false}

Session ID: 80871a25-2a25-4bf1-b180-e97d4d357693

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)

at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)

at io.appium.java_client.TouchAction.perform(TouchAction.java:187)

at com.kms.katalon.core.mobile.helper.MobileElementCommonHelper.tapAtPosition(MobileElementCommonHelper.java:370)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword$_tapAtPosition_closure1.doCall(TapAtPositionKeyword.groovy:70)

at com.kms.katalon.core.mobile.keyword.builtin.TapAtPositionKeyword$_tapAtPosition_closure1.call(TapAtPositionKeyword.groovy)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)

… 17 more

Let me know if you need anything.

Thanks
Jerin

Hi @jerin

Thanks for the info. The SWTExceptions are always tricky because they come from Eclipse, which is what Katalon is built on.

Are you running this test on a real device or a simulator? Have you tried running it on the other type of device (if on a real device, try a simulator and vice versa)?

Unfortunately, because you’re getting the crash when you Spy Mobile, it’s also hard to see if I can reproduce the structure of the screen in an example. If you’re able to do so, could you try logging out what Katalon/Appium see on the screen right before you do the tap that causes the exception? You can replace any proprietary text, but I really need to see the elements/structure. I have a post here that details how to do the logging:

Thanks,

Chris

Hi @Chris_Trevarthen
Thanks for the quick reply
I am running in Real device. It is not successful in Simulator as well.

I am not able to get the tree structure of the page as the app crashes.

I tried logging the error, but it was not successful. The KeyLogger steps run without any details. They are empty. I am just getting the socket hang up.
I have copied the whole log from the start of the application during spying.

Logs.txt (30.7 KB)

Let me know if it is anyway helpful.

Thanks
Jerin

Hi @jerin,

I’ve been trying to reproduce the issue you’re seeing. I have been having some problems getting Appium 1.17 to work even for simple tests. Can you try downgrading to Appium 1.16 using npm install -g appium@1.16.0 and let me know if you’re still seeing the same error?

Hope this helps,

Chris

Hi @Chris_Trevarthen

I’ve been facing the same issue from the past three months.

I have tried the same issue with different versions of Appium from1.14 to 1.17.1 including all the minor releases.

Katalon studio version from 7.0 to 7.4.2 including minor releases and same with Xcode version 10 to 11.4.1.

The app works perfectly fine in manual mode and facing the same issue in Automation.

Thanks
Jerin

Hi @jerin,

Sorry to hear you’re having so many problems. Since the versions of Appium don’t seem to matter, I’m wondering what is different about the screen on the app that is crashing the tests. From the description of your log, it sounds like this app has videos. I’m wondering if there is an issue with capturing a screen with video on it.

Is there a way to navigate other parts of the app with automation and not touch the video screens? Do you still get the error?

— Chris

Hi @Chris_Trevarthen

The app has videos in almost all the screens and Automation works perfectly in other pages.

There is no issues with the page having videos.

In this particular page, There is an accordion, once the accordion is tapped, it displays a list with text fields.

This particular page does not contain video. it navigates to a page which has video content when tapped on the expanded text field.

We are able to automate navigation to other pages of the application without any issues.

Thanks
Jerin