[GH-ISSUE #125] 8.1 emulator - Android restarts every few minutes #87

Closed
opened 2026-03-01 15:40:16 +03:00 by kerem · 13 comments
Owner

Originally created by @pawelus on GitHub (Oct 18, 2018).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/125

Operating System:
CentOS 7

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

Docker Version:
18.06.1-ce

Docker-compose version (Only if you use it):
1.21.2, build a133471

Docker Command to start docker-android:
docker-compose

Expected Behavior

Android should not restart when performing actions (e.g. opening Chrome or Settings)

Actual Behavior

Android restarts in emulator at random moments. Sometimes it's enough to open settings and Android will restart. I can't get it to work for more than 5 minutes without a restart
This doesn't happen on 7.1.1 image

Docker compose file

version: "3"

services:
  selenium-hub:
    image: selenium/hub:3.14.0-beryllium
    container_name: selenium-hub
    ports:
      - "4444:4444"
  
  android_web:
    image: butomo1989/docker-android-x86-8.1
    privileged: true
    depends_on: 
      - selenium-hub
    ports:
      - "6080:6080"
    environment:
      - DEVICE=Samsung Galaxy S6
      - CONNECT_TO_GRID=True
      - APPIUM=True
      - SELENIUM_HOST=selenium-hub
      - MOBILE_WEB_TEST=True
      - AUTO_RECORD=False
Originally created by @pawelus on GitHub (Oct 18, 2018). Original GitHub issue: https://github.com/budtmo/docker-android/issues/125 Operating System: CentOS 7 Docker Image: **butomo1989/docker-android-x86-8.1** Docker Version: 18.06.1-ce Docker-compose version (Only if you use it): 1.21.2, build a133471 Docker Command to start docker-android: docker-compose ## Expected Behavior Android should not restart when performing actions (e.g. opening Chrome or Settings) ## Actual Behavior Android restarts in emulator at random moments. Sometimes it's enough to open settings and Android will restart. I can't get it to work for more than 5 minutes without a restart This doesn't happen on 7.1.1 image ## Docker compose file ``` version: "3" services: selenium-hub: image: selenium/hub:3.14.0-beryllium container_name: selenium-hub ports: - "4444:4444" android_web: image: butomo1989/docker-android-x86-8.1 privileged: true depends_on: - selenium-hub ports: - "6080:6080" environment: - DEVICE=Samsung Galaxy S6 - CONNECT_TO_GRID=True - APPIUM=True - SELENIUM_HOST=selenium-hub - MOBILE_WEB_TEST=True - AUTO_RECORD=False ```
kerem closed this issue 2026-03-01 15:40:16 +03:00
Author
Owner

@rad96 commented on GitHub (Oct 19, 2018):

Happens for me too, checked logs and doesn't see anything suspicious
Also, android 8.0 works fine

<!-- gh-comment-id:431308162 --> @rad96 commented on GitHub (Oct 19, 2018): Happens for me too, checked logs and doesn't see anything suspicious Also, android 8.0 works fine
Author
Owner

@vikassach commented on GitHub (Oct 22, 2018):

Yes happening for my tests as well. For test I ran ui/espresso/BasicSample in https://github.com/googlesamples/android-testing.git. Of the two tests first one passes but second one fails as emulator shows android is restarting. Running a single test passes but android restarts after the test.

<!-- gh-comment-id:431783698 --> @vikassach commented on GitHub (Oct 22, 2018): Yes happening for my tests as well. For test I ran ui/espresso/BasicSample in https://github.com/googlesamples/android-testing.git. Of the two tests first one passes but second one fails as emulator shows android is restarting. Running a single test passes but android restarts after the test.
Author
Owner

@pawelus commented on GitHub (Oct 26, 2018):

Same thing happens for 9.0

<!-- gh-comment-id:433373642 --> @pawelus commented on GitHub (Oct 26, 2018): Same thing happens for 9.0
Author
Owner

@Julioevm commented on GitHub (Oct 30, 2018):

I believe I'm having the same issue. When appium tries to look if the app I'm testing is installed, by executing: /root/platform-tools/adb -P 5037 -s emulator-5554 install /app/xxx.apk

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 install /app/com.inditex.oysho.apk' exited with code 1'; Stderr: 'adb: failed to install /app/xxx.apk: cmd: Can't find service: package'; Code: '1'
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'DESKTOP-BTHHNFN', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_172'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 install /app/com.inditex.oysho.apk' exited with code 1'; Stderr: 'adb: failed to install /app/com.inditex.oysho.apk: cmd: Can't find service: package'; Code: '1'

I am monitoring the emulator and it looks like it resets at this point, causing the error above.
Happens both in 8.1 and 9.0 but works fine in 7.1.1

<!-- gh-comment-id:434367135 --> @Julioevm commented on GitHub (Oct 30, 2018): I believe I'm having the same issue. When appium tries to look if the app I'm testing is installed, by executing: /root/platform-tools/adb -P 5037 -s emulator-5554 install /app/xxx.apk > org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 install /app/com.inditex.oysho.apk' exited with code 1'; Stderr: 'adb: failed to install /app/xxx.apk: cmd: Can't find service: package'; Code: '1' > Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' > System info: host: 'DESKTOP-BTHHNFN', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_172' > Driver info: driver.version: AndroidDriver > remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 install /app/com.inditex.oysho.apk' exited with code 1'; Stderr: 'adb: failed to install /app/com.inditex.oysho.apk: cmd: Can't find service: package'; Code: '1' I am monitoring the emulator and it looks like it resets at this point, causing the error above. Happens both in 8.1 and 9.0 but works fine in 7.1.1
Author
Owner

@DieterRogiest commented on GitHub (Nov 4, 2018):

A few days ago I was able to have samsung galaxy s6 running without restarting on 8.1.
Yesterday it kept restarting, also for Nexus 5. On 8.0 Nexus 5 did not restart.
This morning I removed my docker images and pulled them again. On 8.1 SGS6 restarted once but then I was able to use the chrome browser on it. I killed the pid of the qemu command and fixed the screen resolution settings of the SGS6 and started it again with command /bin/bash ./src/appium.sh, so I could see my website without errors.

The Nexus 5 seems even more unstable than SGS6 (on 8.1). On 8.1 I was able to use the chrome browser of the nexus 5 after killing the qemu command, start it again with /bin/bash ./src/appium.sh, it rebooted again a few times , I disabled Location it rebooted again and then I could use the chrome browser. No idea what's the pattern for having it work without restarting.

<!-- gh-comment-id:435650700 --> @DieterRogiest commented on GitHub (Nov 4, 2018): A few days ago I was able to have samsung galaxy s6 running without restarting on 8.1. Yesterday it kept restarting, also for Nexus 5. On 8.0 Nexus 5 did not restart. This morning I removed my docker images and pulled them again. On 8.1 SGS6 restarted once but then I was able to use the chrome browser on it. I killed the pid of the qemu command and fixed the screen resolution settings of the SGS6 and started it again with command /bin/bash ./src/appium.sh, so I could see my website without errors. The Nexus 5 seems even more unstable than SGS6 (on 8.1). On 8.1 I was able to use the chrome browser of the nexus 5 after killing the qemu command, start it again with /bin/bash ./src/appium.sh, it rebooted again a few times , I disabled Location it rebooted again and then I could use the chrome browser. No idea what's the pattern for having it work without restarting.
Author
Owner

@JoeSSS commented on GitHub (Nov 4, 2018):

The problem must be on the emulator side, the same happens for me on another project for emulators > 8.1

Does somebody has a possibility to try running this on pure linux w/o docker? I believe it will happen also in this configuration, but who knows.. I even created an issue against emulator a long time ago, but no answer.. https://issuetracker.google.com/issues/113676492

<!-- gh-comment-id:435658226 --> @JoeSSS commented on GitHub (Nov 4, 2018): The problem must be on the emulator side, the same happens for me on another project for emulators > 8.1 Does somebody has a possibility to try running this on pure linux w/o docker? I believe it will happen also in this configuration, but who knows.. I even created an issue against emulator a long time ago, but no answer.. https://issuetracker.google.com/issues/113676492
Author
Owner

@DieterRogiest commented on GitHub (Nov 4, 2018):

I installed Android Studio on my Kubuntu 18.04 and ran the emulator:
~/Android/Sdk/emulator$ ./emulator -avd Nexus_5X_API_28_x86 -netdelay none -netspeed full
it did not crash (so no constant restarting).
(API 28 is Android 9.0 Pie)
So I think the problem is with the docker images. I have no idea how they are created. @butomo1989 , can you ask whoever invented docker-android images to figure out why the emulated androids in the docker containers crash regularly since api 27 or 26 ? (a few times they did not crash for me)
I had to uninstall the Android Studio as it took too much space on my / partition.
Also this Studio was too heavy for my intel i3 from 2012 and the 4GB RAM. Running the emulator alone was much less heavy (you need kvm installed and vmx in /proc/cpuinfo of course).

<!-- gh-comment-id:435689456 --> @DieterRogiest commented on GitHub (Nov 4, 2018): I installed Android Studio on my Kubuntu 18.04 and ran the emulator: ~/Android/Sdk/emulator$ ./emulator -avd Nexus_5X_API_28_x86 -netdelay none -netspeed full it did not crash (so no constant restarting). (API 28 is Android 9.0 Pie) So I think the problem is with the docker images. I have no idea how they are created. @butomo1989 , can you ask whoever invented docker-android images to figure out why the emulated androids in the docker containers crash regularly since api 27 or 26 ? (a few times they did not crash for me) I had to uninstall the Android Studio as it took too much space on my / partition. Also this Studio was too heavy for my intel i3 from 2012 and the 4GB RAM. Running the emulator alone was much less heavy (you need kvm installed and vmx in /proc/cpuinfo of course).
Author
Owner

@JoeSSS commented on GitHub (Nov 4, 2018):

@DieterRogiest interesting info.

The thing is that it is pure Linux: https://github.com/butomo1989/docker-android/blob/master/docker/Emulator_x86
maybe we just miss a library or smth..

<!-- gh-comment-id:435699958 --> @JoeSSS commented on GitHub (Nov 4, 2018): @DieterRogiest interesting info. The thing is that it is pure Linux: https://github.com/butomo1989/docker-android/blob/master/docker/Emulator_x86 maybe we just miss a library or smth..
Author
Owner

@rad96 commented on GitHub (Nov 15, 2018):

Got this in adb logcat on every crash
image

<!-- gh-comment-id:439116858 --> @rad96 commented on GitHub (Nov 15, 2018): Got this in adb logcat on every crash ![image](https://user-images.githubusercontent.com/2121715/48569426-16296300-e91b-11e8-8b18-cca336c5c2bf.png)
Author
Owner

@MalteToenjes commented on GitHub (Jan 16, 2019):

I got the same issues with Ubuntu 18 & Samsung Galaxy S6

<!-- gh-comment-id:454809419 --> @MalteToenjes commented on GitHub (Jan 16, 2019): I got the same issues with Ubuntu 18 & Samsung Galaxy S6
Author
Owner

@bmarsaud commented on GitHub (Mar 18, 2019):

Same issue here on Ubuntu/Debian/OpenSuse with Android 8.1 and 9, it restart when the settings button is clicked.

Also, it always reboot 2/3 times after first boot when used in a docker swarm. No problem on a non-swarm architecture. Don't know if it's related to this issue.

<!-- gh-comment-id:473831609 --> @bmarsaud commented on GitHub (Mar 18, 2019): Same issue here on Ubuntu/Debian/OpenSuse with Android 8.1 and 9, it restart when the settings button is clicked. Also, it always reboot 2/3 times after first boot when used in a docker swarm. No problem on a non-swarm architecture. Don't know if it's related to this issue.
Author
Owner

@trinhpham commented on GitHub (Jul 3, 2019):

The log from @rad96 contains some word about mem (Memory). I think you all should consider to review the remaining RAM of the host to make sure no OOM exception happen.
I suggest to monitor using command free -m and docker stats --all

<!-- gh-comment-id:507931228 --> @trinhpham commented on GitHub (Jul 3, 2019): The log from @rad96 contains some word about `mem` (Memory). I think you all should consider to review the remaining RAM of the host to make sure no OOM exception happen. I suggest to monitor using command `free -m` and `docker stats --all`
Author
Owner

@budtmo commented on GitHub (May 9, 2023):

8.1 is not supported anymore. Please check the documentation about the version that are supported now.

<!-- gh-comment-id:1540738974 --> @budtmo commented on GitHub (May 9, 2023): 8.1 is not supported anymore. Please check the documentation about the version that are supported now.
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#87
No description provided.