Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 830
Vitaly Romaniv Avatar asked Jul 15 '15 16:07

Vitaly Romaniv


2 Answers

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 
like image 79
David Rawson Avatar answered Sep 18 '22 22:09

David Rawson


You can do the following:

  • Kill emulator and Android Studio
  • Open Android Studio and "Rebuild" that basically deletes the build folder and recreates it.
like image 42
Karim Fikani Avatar answered Sep 22 '22 22:09

Karim Fikani