Appium server shuts down automatically when the Android Notification Centre is opened in device

Hello All,

I am opening the device Android Notification Centre using driver.openNotification method.
But the Appium server shuts down automatically when the notification drawer is opened.

Please refer to the following error message that appears in the Appium logs:

error: uncaughtException: Cannot read property ‘sockets’ of null date=Wed Jul 29 2015 16:13:01 GMT+0530 (India Standard Time), pid=4312, uid=null, gid=null, cwd=C:\Program Files (x86)\Appium\node_modules\appium, execPath=C:\Program Files (x86)\Appium\node.exe, version=v0.10.26, argv=[C:\Program Files (x86)\Appium\node.exe, C:\Program Files (x86)\Appium\node_modules\appium\lib\server\main.js, --address, 127.0.0.1, --port, 4723, --app, C:\NIshant\Xmatters_Workspace\xMattersAndoidAutomation\xmatters-android-v1.7.0.apk, --pre-launch, --platform-name, Android, --platform-version, 18, --automation-name, Appium, --device-name, Samsung Galaxy S3 Android 4.3, --log-no-color], rss=75325440, heapTotal=61533956, heapUsed=48221728, loadavg=[0, 0, 0], uptime=19658.5462131, trace=[column=25, file=x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=[object Object]. (C:\Program Files, line=195, method= (C:\Program Files, native=false, column=9, file=x86)\Appium\node_modules\appium\node_modules\underscore\underscore.js, function=Function..each..forEach (C:\Program Files, line=153, method=.each..forEach (C:\Program Files, native=false, column=5, file=x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=[object Object].UiAutomator.handleBootstrapOutput (C:\Program Files, line=185, method=UiAutomator.handleBootstrapOutput (C:\Program Files, native=false, column=8, file=x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js, function=[object Object].UiAutomator.outputStreamHandler (C:\Program Files, line=174, method=UiAutomator.outputStreamHandler (C:\Program Files, 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, column=10, file=stream_readable.js, function=Socket.Readable.push, line=127, method=Readable.push, native=false, column=21, file=net.js, function=Pipe.onread, line=528, method=onread, native=false], stack=[TypeError: Cannot read property ‘sockets’ of null, at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js:195:25), at Function..each..forEach (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\underscore\underscore.js:153:9), at [object Object].UiAutomator.handleBootstrapOutput (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js:185:5), at [object Object].UiAutomator.outputStreamHandler (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\uiautomator.js:174: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), at Socket.Readable.push (_stream_readable.js:127:10), at Pipe.onread (net.js:528:21)]

Node Server Process Ended

Please help!!

I have observed that this issue occurs whenever the Pre-launch Application is checked in the Appium settings.
Also, with the Pre-launch Application checked, ADB loses device connection after setNetworkConnection method is invoked.