Google云端硬盘上传错误:“系统调用期间的I / O错误,软件导致连接中止”

时间:2018-03-27 09:06:47

标签: android rest google-drive-api google-drive-android-api

我开发了一个Android应用程序,用户可以使用该应用程序将大文件(大小约为1到2 GB)上传到他/她的 Google云端硬盘帐户

我正在使用Android的Google Drive Rest API有时,上传操作失败,但出现以下异常:

javax.net.ssl.SSLException: Read error: ssl=0xcfe9ee80: I/O error during system call, Software caused connection abort
    at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
    at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:758)
    at com.android.okhttp.okio.Okio$2.read(Okio.java:141)
    at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
    at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:316)
    at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:310)
    at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:206)
    at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:239)
    at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:104)
    at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:1156)
    at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:976)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:509)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:438)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:567)
    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
    at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:37)
    at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
    at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545)
    at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:417)
    at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:427)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)

我有以下问题:

  1. 出现此类错误的原因是什么?
  2. 这是与网络速度有关的问题吗?
  3. 这是Google Drive API的问题吗?如果是,如何避免此错误?
  4. 我使用 Android 7.0 测试应用。

    我很感激有关此主题的任何建议和想法。谢谢。

0 个答案:

没有答案