Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: uncaughtException: Cannot read property 'sockets' of null from Appium for Android emulator

I am getting the following errors in Appium console (mostly) during launching my application in Andriod emulator. The application is sencha/cordova based app but I dont think it is due to that.

error: uncaughtException: Cannot read property 'sockets' of null date=Thu Jan 29 2015 17:53:06 GMT-0800 (Pacific Standard Time), pid=4256, uid=null, gid=null, cwd=C:\Appium\Appium\node_modules\appium, execPath=C:\Appium\Appium\node.exe, version=v0.10.26, argv=[C:\Appium\Appium\node.exe, C:\Appium\Appium\node_modules\appium\lib\server\main.js, --address, 127.0.0.1, --port, 4723, --app, C:\mobile_apps\Mobile-release.apk, --avd, Table11, --pre-launch, --platform-name, Android, --platform-version, 19, --automation-name, Appium, --log-no-color], rss=50974720, heapTotal=37021696, heapUsed=22398760, loadavg=[0, 0, 0], uptime=203658.1265101, trace=[column=25, file=C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=, line=193, method=null, native=false, column=null, file=null, function=Array.forEach, line=null, method=forEach, native=true, column=11, file=C:\Appium\Appium\node_modules\appium\node_modules\underscore\underscore.js, function=Function..each..forEach, line=79, method=.each..forEach, native=false, column=5, file=C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=UiAutomator.handleBootstrapOutput, line=183, method=handleBootstrapOutput, native=false, column=8, file=C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=UiAutomator.outputStreamHandler, line=172, method=outputStreamHandler, native=false, column=17, file=events.js, function=Socket.EventEmitter.emit, line=95, method=EventEmitter.emit, native=false, column=14, file=_stream_readable.js, function=, line=746, method=null, native=false, column=17, file=events.js, function=Socket.EventEmitter.emit, line=92, method=EventEmitter.emit, native=false, column=10, file=_stream_readable.js, function=emitReadable_, line=408, method=null, native=false, column=5, file=_stream_readable.js, function=emitReadable, line=404, method=null, native=false, column=9, file=_stream_readable.js, function=readableAddChunk, line=165, method=null, native=false], stack=[TypeError: Cannot read property 'sockets' of null, at null. (C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js:193:25), at Array.forEach (native), at Function..each..forEach (C:\Appium\Appium\node_modules\appium\node_modules\underscore\underscore.js:79:11), at UiAutomator.handleBootstrapOutput (C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js:183:5), at UiAutomator.outputStreamHandler (C:\Appium\Appium\node_modules\appium\lib\devices\android\uiautomator.js:172:8), at Socket.EventEmitter.emit (events.js:95:17), at Socket. (_stream_readable.js:746:14), at Socket.EventEmitter.emit (events.js:92:17), at emitReadable_ (_stream_readable.js:408:10), at emitReadable (_stream_readable.js:404:5), at readableAddChunk (_stream_readable.js:165:9)]

like image 588
Raghu K Nair Avatar asked Jan 30 '15 01:01

Raghu K Nair


1 Answers

I had the same issue. Restarting appium server after putting override existing session works for me.

like image 122
Artur Aleksanyan Avatar answered Oct 11 '22 16:10

Artur Aleksanyan