Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create new session after run few sessions #197

Closed
nghiadhd opened this issue Dec 6, 2016 · 1 comment
Closed

Cannot create new session after run few sessions #197

nghiadhd opened this issue Dec 6, 2016 · 1 comment

Comments

@nghiadhd
Copy link

nghiadhd commented Dec 6, 2016

I wrote a test script to measure long run capability of Appium.
However after a few sessions, the appium stub at create new session

[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"988633304d4b323634"}}}

I used 'adb' to check "chrome" process on device and see that many chrome processes are leaking

./adb shell ps | grep chrome                        
u0_a85    2757  3184  1578696 194580 SyS_epoll_ 0000000000 S com.android.chrome
u0_i39    2804  3184  1201756 86092 SyS_epoll_ 0000000000 S com.android.chrome:sandboxed_process0
u0_a85    2836  3184  1212104 93312 SyS_epoll_ 0000000000 S com.android.chrome:privileged_process0
u0_a86    10842 3183  1664788 59756 SyS_epoll_ 0000000000 S com.sec.android.app.chromecustomizations
u0_a85    30465 3184  1548556 182592 SyS_epoll_ 0000000000 S com.android.chrome
u0_a85    30671 3184  1234504 89732 SyS_epoll_ 0000000000 S com.android.chrome

Because my device is non-root so I cannot kill "chrome" process by 'shell pkill' or 'am force-stop com.android.chrome'.
Now my device cannot work with appium any more until restarting to clean up leaking processes

Environment:
Appium: 1.6.1/1.6.2
Chromedriver: 2.25
Nodejs: v6.8.0
NPM: 3.10.8

Device:
Galaxy S7: SM-G930F
Android: 6.0.1
Chrome: 54.0.2840.85

Start commands:

  • Appium
    node build/lib/main.js --command-timeout "7200" --debug-log-spacing --default-capabilities '{"platformName":"Android"}' --default-device

  • Client
    UDID=988633304d4b323634 PLATFORM=Android npm run wd

Appium's log: https://gist.github.com/nghiadhd/88c8bf0e14ac32f2f47f3e3052d2ddfa
Testscript: https://gist.github.com/nghiadhd/8388fe2b2e9e1917298e0b9d4d52d952

@rkavalap
Copy link

rkavalap commented Dec 6, 2016

Issue moved to appium/appium #7407 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants