[GH-ISSUE #136] [Web test] Error in Appium server: 'app' option is required for reinstall #94

Open
opened 2026-03-01 15:40:25 +03:00 by kerem · 9 comments
Owner

Originally created by @bonigarcia on GitHub (Jan 9, 2019).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/136

Operating System
Ubuntu 18.04.1 LTS

Docker Image
butomo1989/docker-android-x86-8.1:1.6-p0

Docker Version
Docker version 17.05.0-ce, build 89658be

Docker Command to start docker-android

docker run --rm --privileged -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e AUTO_RECORD=true -e APPIUM=true -v $PWD:/tmp/video butomo1989/docker-android-x86-8.1:1.6-p0

Expected Behavior

I want to run the following test with Appium using the URL: http://localhost:4723/wd/hub

Actual Behavior

The request reaches the Appium server in the container, but an internal error happens:

An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall
    at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
    at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)

The error can be seen in the Appium server console through noVNC:

screenshot from 2019-01-09 14-09-44

Originally created by @bonigarcia on GitHub (Jan 9, 2019). Original GitHub issue: https://github.com/budtmo/docker-android/issues/136 **Operating System** Ubuntu 18.04.1 LTS **Docker Image** butomo1989/docker-android-x86-8.1:1.6-p0 **Docker Version** Docker version 17.05.0-ce, build 89658be **Docker Command to start docker-android** > docker run --rm --privileged -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e AUTO_RECORD=true -e APPIUM=true -v $PWD:/tmp/video butomo1989/docker-android-x86-8.1:1.6-p0 ## Expected Behavior I want to run the following [test](https://github.com/bonigarcia/webdrivermanager-examples/blob/master/src/test/java/io/github/bonigarcia/wdm/test/AppiumTest.java) with Appium using the URL: http://localhost:4723/wd/hub ## Actual Behavior The request reaches the Appium server in the container, but an internal error happens: ``` An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) ``` The error can be seen in the Appium server console through noVNC: ![screenshot from 2019-01-09 14-09-44](https://user-images.githubusercontent.com/5413013/50901369-46bbe380-1418-11e9-8ea3-b7ec582d4567.png)
Author
Owner

@budtmo commented on GitHub (Jan 9, 2019):

I think it is not from my side, it might be from Appium side. could you maybe check with Appium with local machine (without docker)? @bonigarcia

<!-- gh-comment-id:452717095 --> @budtmo commented on GitHub (Jan 9, 2019): I think it is not from my side, it might be from Appium side. could you maybe check with Appium with local machine (without docker)? @bonigarcia
Author
Owner

@bonigarcia commented on GitHub (Jan 9, 2019):

@butomo1989 I have just executed the same test against a local Appium server and it is working fine. It seems there is something wrong in the Docker images. As described in #137, the same problem happens (randomly, it sometimes passes) when the Android device is registered in a Selenium Hub.

<!-- gh-comment-id:452761341 --> @bonigarcia commented on GitHub (Jan 9, 2019): @butomo1989 I have just executed the same test against a local Appium server and it is working fine. It seems there is something wrong in the Docker images. As described in #137, the same problem happens (randomly, it sometimes passes) when the Android device is registered in a Selenium Hub.
Author
Owner

@budtmo commented on GitHub (Jan 17, 2019):

@bonigarcia it works fine on my side. I think you need to explain steps to reproduce it.

<!-- gh-comment-id:455153837 --> @budtmo commented on GitHub (Jan 17, 2019): @bonigarcia it works fine on my side. I think you need to explain steps to reproduce it.
Author
Owner

@bonigarcia commented on GitHub (Jan 17, 2019):

As I said, I started docker-android as follows:

docker run --rm --privileged -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e AUTO_RECORD=true -e APPIUM=true -v $PWD:/tmp/video butomo1989/docker-android-x86-8.1:1.6-p0

Before running the test, of course you need to wait until the emulator is ready. It can be done checking http://localhost:6080/

Then, you need to execute the test I reported in the issue description. It's a JUnit 4 test. It can be executed from the shell as follows (you need Maven and Java installed in your machine):

git clone https://github.com/bonigarcia/webdrivermanager-examples/
cd webdrivermanager-examples/
mvn test -Dtest=AppiumTest

The test fails, and the error trace contains the error I already reported:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.github.bonigarcia.wdm.test.AppiumTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.576 sec <<< FAILURE! - in io.github.bonigarcia.wdm.test.AppiumTest
test(io.github.bonigarcia.wdm.test.AppiumTest)  Time elapsed: 8.573 sec  <<< ERROR!
org.openqa.selenium.SessionNotCreatedException: 
Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall
    at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
    at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181'
Driver info: driver.version: AndroidDriver
	at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49)
Caused by: java.lang.reflect.InvocationTargetException
	at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49)
Caused by: org.openqa.selenium.WebDriverException: 
An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall
    at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
    at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
	at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49)


Results :

Tests in error: 
  AppiumTest.setupTest:49 » SessionNotCreated Unable to create a new remote sess...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

@butomo1989 How did you execute it to ensure that it works fine?

<!-- gh-comment-id:455174113 --> @bonigarcia commented on GitHub (Jan 17, 2019): As I said, I started docker-android as follows: `docker run --rm --privileged -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e AUTO_RECORD=true -e APPIUM=true -v $PWD:/tmp/video butomo1989/docker-android-x86-8.1:1.6-p0` Before running the test, of course you need to wait until the emulator is ready. It can be done checking http://localhost:6080/ Then, you need to execute the [test](https://github.com/bonigarcia/webdrivermanager-examples/blob/master/src/test/java/io/github/bonigarcia/wdm/test/AppiumTest.java) I reported in the issue description. It's a JUnit 4 test. It can be executed from the shell as follows (you need Maven and Java installed in your machine): ``` git clone https://github.com/bonigarcia/webdrivermanager-examples/ cd webdrivermanager-examples/ mvn test -Dtest=AppiumTest ``` The test fails, and the error trace contains the error I already reported: ``` ------------------------------------------------------- T E S T S ------------------------------------------------------- Running io.github.bonigarcia.wdm.test.AppiumTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.576 sec <<< FAILURE! - in io.github.bonigarcia.wdm.test.AppiumTest test(io.github.bonigarcia.wdm.test.AppiumTest) Time elapsed: 8.573 sec <<< ERROR! org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181' Driver info: driver.version: AndroidDriver at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49) Caused by: java.lang.reflect.InvocationTargetException at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49) Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_181' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) at io.github.bonigarcia.wdm.test.AppiumTest.setupTest(AppiumTest.java:49) Results : Tests in error: AppiumTest.setupTest:49 » SessionNotCreated Unable to create a new remote sess... Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 ``` @butomo1989 How did you execute it to ensure that it works fine?
Author
Owner

@budtmo commented on GitHub (Jan 17, 2019):

I use the newest image. Could you try to use 1.6-p2 ?

<!-- gh-comment-id:455178942 --> @budtmo commented on GitHub (Jan 17, 2019): I use the newest image. Could you try to use [1.6-p2](https://github.com/butomo1989/docker-android/releases/tag/1.6-p2) ?
Author
Owner

@bonigarcia commented on GitHub (Jan 17, 2019):

I see the same problem with 1.6-p2 and 1.6-p1.

<!-- gh-comment-id:455181926 --> @bonigarcia commented on GitHub (Jan 17, 2019): I see the same problem with 1.6-p2 and 1.6-p1.
Author
Owner

@budtmo commented on GitHub (Jan 17, 2019):

ahhh.. I use for app testing and it seems that you use it for web testing. I need to take a look. does it work on the previous version: 1.5-p6? @bonigarcia

<!-- gh-comment-id:455201179 --> @budtmo commented on GitHub (Jan 17, 2019): ahhh.. I use for app testing and it seems that you use it for web testing. I need to take a look. does it work on the previous version: 1.5-p6? @bonigarcia
Author
Owner

@bonigarcia commented on GitHub (Jan 17, 2019):

@butomo1989 I don't know.

<!-- gh-comment-id:455201792 --> @bonigarcia commented on GitHub (Jan 17, 2019): @butomo1989 I don't know.
Author
Owner

@anton264 commented on GitHub (Apr 4, 2019):

Not sure if this is related but when using your example in docker-compose:
When using device samsung_galaxy_s6_8.1 i get "Error in Appium server: 'app' option is required for reinstall"

However when using samsung_galaxy_s6_5.1.1 everything is fine

I noticed that the first device does not seem to have a default browser, is this related?

<!-- gh-comment-id:480008488 --> @anton264 commented on GitHub (Apr 4, 2019): Not sure if this is related but when using your example in docker-compose: When using device samsung_galaxy_s6_8.1 i get "Error in Appium server: 'app' option is required for reinstall" However when using samsung_galaxy_s6_5.1.1 everything is fine I noticed that the first device does not seem to have a default browser, is this related?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-android#94
No description provided.