[
https://issues.apache.org/jira/browse/CB-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614560#comment-13614560
]
Joe Bowser commented on CB-2644:
--------------------------------
Error Code 3 usually happens when your server has an error and crashes! I ran
into this the other day when working on some express code to test the EXIF bug.
My problem was a mis-named URI. I'd check your server code to see what
happened.
> fileTransfer.download fails sometimes with error code 3
> -------------------------------------------------------
>
> Key: CB-2644
> URL: https://issues.apache.org/jira/browse/CB-2644
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.5.0
> Environment: Android 4.0
> Reporter: Javier Olivieri
> Assignee: Andrew Grieve
> Labels: download, fileTransfer,
>
> fileTransfer.download fails sometimes with error code 3...
> Some files were saved ok... but some files didnt save...
> 03-11 02:06:11.360: E/FileTransfer(6750):
> {"target":"\/\/\/mnt\/sdcard\/140-platos-3-big2.jpg","source":"http:\/\/gogress.com\/digitalmenu\/panel\/assets\/uploads\/files\/platos\/140-platos-3-big2.jpg","http_status":0,"code":3}
> 03-11 02:06:11.360: E/FileTransfer(6750): java.net.ConnectException: failed
> to connect to gogress.com/96.125.161.205 (port 80): connect failed:
> ECONNREFUSED (Connection refused)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.io.IoBridge.connect(IoBridge.java:114)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.net.Socket.connect(Socket.java:842)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpConnection.<init>(HttpConnection.java:77)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> org.apache.cordova.FileTransfer$4.run(FileTransfer.java:675)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> java.lang.Thread.run(Thread.java:856)
> 03-11 02:06:11.360: E/FileTransfer(6750): Caused by:
> libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.io.Posix.connect(Native Method)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.io.IoBridge.connectErrno(IoBridge.java:127)
> 03-11 02:06:11.360: E/FileTransfer(6750): at
> libcore.io.IoBridge.connect(IoBridge.java:112)
> 03-11 02:06:11.360: E/FileTransfer(6750): ... 17 more
> and .. other files are saved correctly.
> 03-11 02:06:26.390: D/FileTransfer(6750): Saved file:
> ///mnt/sdcard/61-platos-10-big2.jpg
> 03-11 02:06:26.390: D/CordovaLog(6750): download complete:
> file:///mnt/sdcard/61-platos-10-big2.jpg
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira