# Katalon Remote Execution with Appium Docker + Android Docker

**URL:** <https://forum.katalon.com/t/katalon-remote-execution-with-appium-docker-android-docker/111452>\
**Category:** Mobile Testing\
**Tags:** mobile-testing\
**Created:** [December 19, 2023, 4:50pm UTC](https://forum.katalon.com/t/katalon-remote-execution-with-appium-docker-android-docker/111452 "2023-12-19T16:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien.treyvaud](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sebastien.treyvaud/32/23870_2.png) [@sebastien.treyvaud](https://forum.katalon.com/u/sebastien.treyvaud)\
**Post date:** [December 19, 2023, 4:50pm UTC](https://forum.katalon.com/t/katalon-remote-execution-with-appium-docker-android-docker/111452/1 "2023-12-19T16:50:39Z")

</div>

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:

```auto
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:

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/f/e/fe893019ecd3daa6907278fd9c7bfc2dc5de9fb7.png)

And here comes the error:

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/0/b/0b48285e82427321438b9f06416e1f8ce87cc5e8.png)

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/0/50fa6ca62b47b329d1bed2dec84e976bd905e03c.png)

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

```auto
=============== 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 ☹

Thanks in advance!!

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [December 21, 2023, 4:15am UTC](https://forum.katalon.com/t/katalon-remote-execution-with-appium-docker-android-docker/111452/2 "2023-12-21T04:15:42Z")

</div>

> [@sebastien.treyvaud](#):
>
> ```auto
> org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
> 
> ```

Hi,

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

- [GridException. Cannot extract a capabilities from the request. When create RemoteWebDriver by RemoteSessionSettings · Issue #6301 · SeleniumHQ/selenium · GitHub](https://github.com/SeleniumHQ/selenium/issues/6301)
- [Cannot extract a capabilities from the request for custom capabilities · Issue #3556 · webdriverio/webdriverio · GitHub](https://github.com/webdriverio/webdriverio/issues/3556)
- [GridException: Cannot extract a capabilities from the request - Issues/Bugs - Appium Discuss](https://discuss.appium.io/t/gridexception-cannot-extract-a-capabilities-from-the-request/17265/2)
