Katalon Remote Execution with Appium Docker + Android Docker

Hello all,

I am strugglying since a few days with the remote execution using Docker containers.

Finally, I found a docker containers composition that fits realitvely good with my needs:

compose.yaml:

version: "2.2"

services:
  selenium_hub:
    image: selenium/hub:3.14.0-curium
    ports:
      - 4444:4444

  samsung_galaxy_web_5.1.1:
    image: budtmo/docker-android:emulator_11.0
    privileged: true
    # Increase scale number if needed
    scale: 1
    depends_on:
      - selenium_hub
      #- real_device
    ports:
      - 6080
    volumes:
      - ./video-samsung_5.1.1:/tmp/video
    environment:
      - DEVICE=Samsung Galaxy S6
      - CONNECT_TO_GRID=true
      - APPIUM=true
      - SELENIUM_HOST=selenium_hub
      - MOBILE_WEB_TEST=true
      - AUTO_RECORD=true

Usage: docker-compose -f compose.yaml up

The containers start, that’s fine.

My issue comes when my test wants to start the application, but first, here is the remote configuration:

And here comes the error:

and in plain text, the error (prunned for display reason):

=============== ROOT CAUSE =====================
Caused by:</h3><pre>java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

12-19-2023 05:37:34 PM startExistingApplication(app2start)

Elapsed time: 1.542s

Unable to start app with application ID: 'swiss.loro.loroplay.stub.debug' (Root cause: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Unable to parse remote response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /wd/hub/session. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
  &quot;desiredCapabilities&quot;: {
    &quot;appActivity&quot;: &quot;.Settings&quot;,
    &quot;appPackage&quot;: &quot;com.android.settings&quot;,
    &quot;newCommandTimeout&quot;: 1800,
    &quot;platformVersion&quot;: &quot;11.0&quot;,
    &quot;autoGrantPermissions&quot;: true,
    &quot;platformName&quot;: &quot;Android&quot;,
    &quot;deviceName&quot;: &quot;emulator&quot;,
    &quot;platform&quot;: &quot;ANDROID&quot;,
    &quot;systemPort&quot;: 8217
  },
  &quot;capabilities&quot;: {
    &quot;firstMatch&quot;: [
      {
        &quot;appium:appActivity&quot;: &quot;.Settings&quot;,
        &quot;appium:appPackage&quot;: &quot;com.android.settings&quot;,
        &quot;appium:autoGrantPermissions&quot;: true,
        &quot;appium:deviceName&quot;: &quot;emulator&quot;,
        &quot;appium:newCommandTimeout&quot;: 1800,
        &quot;platform&quot;: &quot;ANDROID&quot;,
        &quot;platformName&quot;: &quot;android&quot;,
        &quot;appium:platformVersion&quot;: &quot;11.0&quot;,
        &quot;appium:systemPort&quot;: 8217
      }
    ]
  }
}
	at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:138)
	at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:69)
...
	at org.openqa.grid.web.servlet.handler.SeleniumBasedRequest.createFromRequest(SeleniumBasedRequest.java:73)
	at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:83)
	... 32 more
Caused by: java.lang.IllegalArgumentException: Illegal key values seen in w3c capabilities: [platform]
	at org.openqa.selenium.remote.NewSessionPayload.lambda$validate$5(NewSessionPayload.java:197)
	at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:372)
	at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:373)

Has anybody an idea how to remove the platform value from the desired capabilities?
I didn’t provide it but Katalon adds it by itself :frowning:

Thanks in advance!!

2 Likes

Hi,

I am not sure if the followings can help but please try: