appium: Android bootstrap socket crashed
The problem
Sometimes I have this error. And I have this error after I switch on appium 1.6.5@beta
Encountered internal error running command: Error: Android bootstrap socket crashed: Error: This socket has been ended by the other party
Environment
- Appium version (or git revision) that exhibits the issue: 1.6.5@beta
- Last Appium version that did not exhibit the issue (if applicable): 1.6.4
- Desktop OS/version used to run Appium: OS X
- Node.js version (unless using Appium.app|exe): v7.5.0
- Mobile platform/version under test: Android 6.0.1
- Real device or emulator/simulator: Real device
- Appium CLI or Appium.app|exe: CLI
Details
[Appium] Had trouble ending session 30de1cd6-c53e-47ca-9208-bb7faad93618: Android bootstrap socket crashed: Error: This socket has been ended by the other party
[MJSONWP] Encountered internal error running command: Error: Android bootstrap socket crashed: Error: This socket has been ended by the other party
at Socket.<anonymous> (../../lib/bootstrap.js:87:21)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Socket.writeAfterFIN [as write] (net.js:297:8)
at ../../lib/bootstrap.js:112:25
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AndroidBootstrap.sendCommand$ (../../lib/bootstrap.js:108:18)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at AndroidBootstrap.sendCommand (../../lib/bootstrap.js:103:38)
at AndroidBootstrap.shutdown$ (../../lib/bootstrap.js:148:18)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at AndroidBootstrap.shutdown (../../lib/bootstrap.js:139:18)
at AndroidDriver.deleteSession$ (../../lib/driver.js:405:28)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[INFO] 05:01:55: [WebDriverEvent]
Sorry guys I don’t have full logs. Maybe problem return #6332 ?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 46 (7 by maintainers)
@gamesguru Thanks for the feedback. You still have two options: either continue complaining about bugs like hundreds or even thousands of other people here or start contributing to Appium source and fix the things that bother you. This is the main advantage and the ideology of all open source products.
it’s all conspiracies. the moon landing, the JFK assassination, appium working on multiple devices or for more than 40 minutes at a time (or however often adb/uiautomator have hiccups on average).
being a largely open-source project, testing is likely at a bottleneck. it is annoying to say the least when legitimate issues are constantly closed and inquires simply directly back to a generic, probably untested guide.
i made a C# project using just adb and uiautomator, no Nugets or anything. it parses xml, taps what you need, reboots the device if uiautomator crashes and is generally a well-engineered solution. it’s specialized to one app, but you can borrow the whole uiViewer and pReader class without modifying much. parts of the testLogic class can also be lifted.
uiautomator takes 2-4 seconds to return an xml dump, so it’s slower than appium but at least more reliable. we are running tests for days with 7-10 devices without much issue. Check the project out on my page, it’s called “ocast”
@Vishnu1067 pls refer this https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/parallel-tests.md#parallel-android-tests
Check this post: https://github.com/appium/appium/issues/11773
@manishthakray did you happen to raise a new issue? (I looked around the issues section, but couldn’t find a recent issue on this topic.) I’m getting the same issue socket issues when running in parallel with Java 1.8.1 and appium client is 6.1.0 when getting Dimensions.
@saikrishna321 Thank you for the doc sharing.
Before i was using
systemPort:9000
after red the docs, i have changed systemPort and included automationName and noSign capabilities. Now my parallel execution is more consistency and no issues so far after verified 15 times of execution.@gamesguru Thanks for taking the time to be snarky in the project’s issues. It’s much appreciated.