Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out. write failed: EPIPE (Broken pipe)

See original GitHub issue

Issue Description

I get the following error trying to share a file from the assets folder:

E/TransferOutThread: Exception transferring file
E/TransferOutThread: write failed: EPIPE (Broken pipe)
E/TransferOutThread:     at
E/TransferOutThread:     at
E/TransferOutThread:     at com.commonsware.cwac.provider.AbstractPipeStrategy$
E/TransferOutThread:  Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
E/TransferOutThread:     at Method)
E/TransferOutThread:     at
E/TransferOutThread:     at
E/TransferOutThread:     at
E/TransferOutThread:     at 
E/TransferOutThread:     at com.commonsware.cwac.provider.AbstractPipeStrategy$ 

The file exists, I’ve tried sending a non-existent file and the error was a FileNotFoundException. I think I’m creating the Intent and everything correctly, but I paste it here anyway:

Intent share = new Intent(Intent.ACTION_SEND);
share.putExtra(Intent.EXTRA_STREAM, PROVIDER.buildUpon().appendPath(soundName + ".mp3").build());
startActivity(Intent.createChooser(share, "Share audio"));

I’m using the last version of cwac-provider, with Android sdkVersion 23

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

jjosebacommented, Nov 15, 2015

I’ve isolated the problem to the simplest code. It’s just an Activity that launches the sharing intent in its onStart() method. I’ve uploaded the complete project here:

commonsguycommented, Nov 25, 2015

With regards to Telegram, as I don’t use it, I don’t have a great way of testing it specifically. You might try a test with a file:/// with the same content; it’s possible that Telegram is fine with the Uri but just doesn’t like the content for some reason. If you come up with fresh evidence, or a way for me to test this that doesn’t involve me signing up for Telegram, file a fresh issue.

With respect to the docs, I just pushed a fix – thanks for pointing that out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: write failed: EPIPE (Broken pipe) Error on write file
You are trying to use a system command from /system/bin. I assume you'd need root permissions to invoke that on the emulator. But...
Read more >
Printing Error: Broken pipe (Write failed) - Oracle Support
Symptoms. When attempting to print a BI publisher report, the following error occurs: Document delivery failed. Error deliver document to ...
Read more >
Android Question Running iptables script - B4X
I almos try creating a java lib for this, to run the script. but no lock. ... write failed: EPIPE (Broken pipe)...
Read more >
Broken Pipe Error in Python - GeeksforGeeks
A broken Pipe Error is generally an Input/Output Error, which is occurred at the Linux System level. The error has occurred during the...
Read more >
Root access on adb shell but not for apps - XDA Forums
When i am trying to call a root shell command from my app i am getting: [] : write failed: EPIPE (Broken pipe)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found