java.io.IOException: write failed: EPIPE (Broken pipe)
See original GitHub issueI get the following error trying to share a file from the assets folder:
E/TransferOutThread: Exception transferring file
E/TransferOutThread: java.io.IOException: write failed: EPIPE (Broken pipe)
E/TransferOutThread: at libcore.io.IoBridge.write(IoBridge.java:542)
E/TransferOutThread: at java.io.FileOutputStream.write(FileOutputStream.java:186)
E/TransferOutThread: at com.commonsware.cwac.provider.AbstractPipeStrategy$TransferOutThread.run(AbstractPipeStrategy.java:96)
E/TransferOutThread: Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
E/TransferOutThread: at libcore.io.Posix.writeBytes(Native Method)
E/TransferOutThread: at libcore.io.Posix.write(Posix.java:258)
E/TransferOutThread: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
E/TransferOutThread: at libcore.io.IoBridge.write(IoBridge.java:537)
E/TransferOutThread: at java.io.FileOutputStream.write(FileOutputStream.java:186)
E/TransferOutThread: at com.commonsware.cwac.provider.AbstractPipeStrategy$TransferOutThread.run(AbstractPipeStrategy.java:96)
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.setType("audio/*");
share.putExtra(Intent.EXTRA_STREAM, PROVIDER.buildUpon().appendPath(soundName + ".mp3").build());
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(share, "Share audio"));
I’m using the last version of cwac-provider
, with Android sdkVersion 23
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (7 by maintainers)
Top 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. ... java.io.IOException: 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: [java.io.IOException] : write failed: EPIPE (Broken pipe)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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: https://drive.google.com/file/d/0ByCtNqXoOZUEaTNDU3M0V3JRMmc/view?usp=sharing
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 theUri
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!