E/art﹕ Failed sending reply to debugger: Broken pipe, but application still runs

Vitaly Romaniv picture Vitaly Romaniv · Jul 15, 2015 · Viewed 57.3k times · Source

When I run my application many lines appear in the logcat but only one error:

E/art﹕ Failed sending reply to debugger: Broken pipe.

What does it mean? And how can I fix it?

Answer

David Rawson picture David Rawson · Sep 5, 2017

Explaining the error:

E/ART: Failed sending reply to debugger: Broken pipe.

What is E/ART?

ART is the Android RunTime. This is the bytecode interpreter on your Android phone. The E simply indicates the logging level of ERROR.

What is "sending reply to debugger"?

Debugging on the Android phone is done using the adb (Android Debugging Bridge). The adb process runs on your dev machine (your laptop or PC) and a daemon runs on the Android device (i.e., the emulator or handset).

What is a broken pipe?

Your dev machine and the Android device communicate like a client server and a broken pipe means that the communication has become invalid. For instance, the client (the Android device) is trying to send a reply to the server (the adb process running on the dev machine) but the server has already closed the socket.

How to fix it

First make sure your app is building correctly by performing a clean/rebuild.

Then if you are running your app using USB debugging on a real phone then you can often fix the problem by unplugging the USB cable and then plugging it back in to reestablish the client/server connection.

If this doesn't work, you can disconnect the USB cable and (stop the emulator if necessary) and close Android Studio. This is often enough to stop the adb process. Then when you open Android Studio again it will restart and the connection will be reestablished.

If this doesn't work, you can try stopping the adb server manually using the instructions in this question. For instance, you can try opening command prompt or terminal and going to the sdk/platform-tools directory and typing:

adb kill-server
adb start-server