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

57,964

Solution 1

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

Solution 2

You can do the following:

  • Kill emulator and Android Studio
  • Open Android Studio and "Rebuild" that basically deletes the build folder and recreates it.

Solution 3

I had a breakpoint in a return statement, when I removed it everything ran as it should. So give that a try too (removing all breakpoints).

Solution 4

killing the "adb" process helped me recover from this error. Just try restarting the adb.

Share:
57,964

Related videos on Youtube

Vitalii Romaniv
Author by

Vitalii Romaniv

Updated on August 11, 2020

Comments

  • Vitalii Romaniv
    Vitalii Romaniv almost 4 years

    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?

  • Vince Banzon
    Vince Banzon over 4 years
    Right on spot. Thank you.