Rifluxyss / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Error while sending report to Google Form (SocketTimeoutException: Read timed out) #98

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Starting an app that init's ACRA, however, the Android device doesn't have a 
network connection
2.
3.

What is the expected output? What do you see instead?
Uploading of crash reports fails when app performs ACRA.init(this) at start of 
app.

What version of the product are you using? On what operating system?
4.2.3 on Android 2.2
Linux version 2.6.32

Please provide any additional information below.
D/ACRA    ( 1214): Retrieve application default SharedPreferences.
D/ACRA    ( 1214): Set OnSharedPreferenceChangeListener.
D/ACRA    ( 1214): ACRA is enabled for myapp.com, intializing...
D/ACRA    ( 1214): Looking for error files in /data/data/myapp.com/files
V/ACRA    ( 1214): About to start ReportSenderWorker from 
#checkReportOnApplicationStart
D/ACRA    ( 1214): Add user comment to null
D/ACRA    ( 1214): #checkAndSendReports - start
D/ACRA    ( 1214): Looking for error files in /data/data/myapp.com/files
I/ACRA    ( 1214): Sending file 1323883604000-IS_SILENT.stacktrace
D/ACRA    ( 1214): Sending report a243f9af-22f2-466c-ac50-b8d3f0ce38c5
D/ACRA    ( 1214): Connect to 
https://spreadsheets.google.com/formResponse?formkey=xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxx&ifq
D/ACRA    ( 1214): Setting httpPost headers
D/ACRA    ( 1214): Sending request to 
https://spreadsheets.google.com/formResponse?formkey=xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxx&ifq
E/ACRA    ( 1214): Failed to send crash report for 
1323883604000-IS_SILENT.stacktrace
E/ACRA    ( 1214): org.acra.sender.ReportSenderException: Error while sending 
report to Google Form.
E/ACRA    ( 1214):  at 
org.acra.sender.GoogleFormSender.send(GoogleFormSender.java:64)
E/ACRA    ( 1214):  at 
org.acra.ErrorReporter.sendCrashReport(ErrorReporter.java:850)
E/ACRA    ( 1214):  at 
org.acra.ErrorReporter.checkAndSendReports(ErrorReporter.java:960)
E/ACRA    ( 1214):  at 
org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:142)
E/ACRA    ( 1214): Caused by: java.net.SocketTimeoutException: Read timed out
E/ACRA    ( 1214):  at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeread(Native 
Method)
E/ACRA    ( 1214):  at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.access$300(OpenSSLSocket
Impl.java:55)
E/ACRA    ( 1214):  at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(Open
SSLSocketImpl.java:542)
E/ACRA    ( 1214):  at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInp
utBuffer.java:103)
E/ACRA    ( 1214):  at 
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInput
Buffer.java:191)
E/ACRA    ( 1214):  at 
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.
java:82)
E/ACRA    ( 1214):  at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:1
74)
E/ACRA    ( 1214):  at 
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abstract
HttpClientConnection.java:179)
E/ACRA    ( 1214):  at 
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultC
lientConnection.java:235)
E/ACRA    ( 1214):  at 
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Abstra
ctClientConnAdapter.java:259)
E/ACRA    ( 1214):  at 
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecut
or.java:279)
E/ACRA    ( 1214):  at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:12
1)
E/ACRA    ( 1214):  at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirecto
r.java:410)
E/ACRA    ( 1214):  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:5
55)
E/ACRA    ( 1214):  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:4
87)
E/ACRA    ( 1214):  at org.acra.util.HttpRequest.sendPost(HttpRequest.java:109)
E/ACRA    ( 1214):  at org.acra.util.HttpRequest.sendPost(HttpRequest.java:80)
E/ACRA    ( 1214):  at org.acra.util.HttpUtils.doPost(HttpUtils.java:59)
E/ACRA    ( 1214):  at 
org.acra.sender.GoogleFormSender.send(GoogleFormSender.java:62)
E/ACRA    ( 1214):  ... 3 more
D/ACRA    ( 1214): #checkAndSendReports - finish

Original issue reported on code.google.com by alexbiem...@gmail.com on 19 Dec 2011 at 11:54

GoogleCodeExporter commented 8 years ago
Note: at the time of this output, the Android device did have a Local IP.

I fixed the Read Timed Out error within my app using this solution:
http://stackoverflow.com/questions/2278132/httpsurlconnection-stalling-out-when-
getinputstream-is-called/8528434#8528434

Original comment by alexbiem...@gmail.com on 20 Dec 2011 at 12:01

GoogleCodeExporter commented 8 years ago
With ACRA 4.2.3, the default SocketTimeout used is 3000ms. You can raise it to 
5000ms if you prefer with the @ReportsCrashes(socketTimeout = 5000) or any 
other value.

In future versions of ACRA, you can adjust both connectionTimeout and 
socketTimeout, and their default values are respectively 3000ms and 5000ms.

Original comment by kevin.gaudin on 20 Dec 2011 at 12:43

GoogleCodeExporter commented 8 years ago
It's help for me when I set socketTimeout = 25000

Original comment by nikolay....@gmail.com on 29 Feb 2012 at 12:22

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 7 Sep 2012 at 9:31