mendhak / gpslogger

:satellite: Lightweight GPS Logging Application For Android.
https://gpslogger.app
Other
1.99k stars 609 forks source link

dropbox upload #1157

Closed rol1 closed 3 months ago

rol1 commented 3 months ago

Hi *,

when I try to upload files, automatical or manual, to Dropbox I get this error. I restarted gpslogger as well as Dropbox. I also resetted the connection between them, but the Error ist still there. I use a Xiaomi Redmi Note 13Pro

`Datei konnte nicht hochgeladen werden

Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) com.dropbox.core.NetworkIOException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.dropbox.core.v2.DbxRawClientV2.uploadStyle(DbxRawClientV2.java:224) at com.dropbox.core.v2.files.DbxUserFilesRequests.upload(DbxUserFilesRequests.java:2118) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:117) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:18) at com.dropbox.core.v2.DbxUploadStyleBuilder.uploadAndFinish(DbxUploadStyleBuilder.java:92) at com.mendhak.gpslogger.senders.dropbox.DropboxJob.onRun(DropboxJob.java:75) at com.birbit.android.jobqueue.Job.safeRun(Job.java:229) at com.birbit.android.jobqueue.JobHolder.safeRun(JobHolder.java:132) at com.birbit.android.jobqueue.ConsumerManager$Consumer.handleRunJob(ConsumerManager.java:407) at com.birbit.android.jobqueue.ConsumerManager$Consumer.access$000(ConsumerManager.java:326) at com.birbit.android.jobqueue.ConsumerManager$Consumer$2.handleMessage(ConsumerManager.java:354) at com.birbit.android.jobqueue.messaging.SafeMessageQueue.consume(SafeMessageQueue.java:36) at com.birbit.android.jobqueue.ConsumerManager$Consumer.run(ConsumerManager.java:389) at java.lang.Thread.run(Thread.java:1012) Caused by: javax.net.ssl.SSLHandshakeException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:356) at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:919) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:896) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0) at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:236) at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:218) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30) at com.dropbox.core.http.StandardHttpRequestor.getOutputStream(StandardHttpRequestor.java:123) at com.dropbox.core.http.StandardHttpRequestor.access$000(StandardHttpRequestor.java:28) at com.dropbox.core.http.StandardHttpRequestor$Uploader.(StandardHttpRequestor.java:133) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:72) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:28) at com.dropbox.core.v2.DbxRawClientV2.uploadStyle(DbxRawClientV2.java:221) ... 13 more Caused by: javax.net.ssl.SSLProtocolException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method) at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:570) at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095) at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876) ... 38 more

Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) javax.net.ssl.SSLHandshakeException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:356) at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:919) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:896) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0) at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:236) at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:218) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30) at com.dropbox.core.http.StandardHttpRequestor.getOutputStream(StandardHttpRequestor.java:123) at com.dropbox.core.http.StandardHttpRequestor.access$000(StandardHttpRequestor.java:28) at com.dropbox.core.http.StandardHttpRequestor$Uploader.(StandardHttpRequestor.java:133) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:72) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:28) at com.dropbox.core.v2.DbxRawClientV2.uploadStyle(DbxRawClientV2.java:221) at com.dropbox.core.v2.files.DbxUserFilesRequests.upload(DbxUserFilesRequests.java:2118) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:117) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:18) at com.dropbox.core.v2.DbxUploadStyleBuilder.uploadAndFinish(DbxUploadStyleBuilder.java:92) at com.mendhak.gpslogger.senders.dropbox.DropboxJob.onRun(DropboxJob.java:75) at com.birbit.android.jobqueue.Job.safeRun(Job.java:229) at com.birbit.android.jobqueue.JobHolder.safeRun(JobHolder.java:132) at com.birbit.android.jobqueue.ConsumerManager$Consumer.handleRunJob(ConsumerManager.java:407) at com.birbit.android.jobqueue.ConsumerManager$Consumer.access$000(ConsumerManager.java:326) at com.birbit.android.jobqueue.ConsumerManager$Consumer$2.handleMessage(ConsumerManager.java:354) at com.birbit.android.jobqueue.messaging.SafeMessageQueue.consume(SafeMessageQueue.java:36) at com.birbit.android.jobqueue.ConsumerManager$Consumer.run(ConsumerManager.java:389) at java.lang.Thread.run(Thread.java:1012) Caused by: javax.net.ssl.SSLProtocolException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method) at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:570) at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095) at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876) ... 38 more

Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) javax.net.ssl.SSLProtocolException: Read error: ssl=0x703f73b988: Failure in SSL library, usually a protocol error error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x6fabb9d100:0x00000003) at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method) at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:570) at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095) at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:896) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0) at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:236) at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:218) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30) at com.dropbox.core.http.StandardHttpRequestor.getOutputStream(StandardHttpRequestor.java:123) at com.dropbox.core.http.StandardHttpRequestor.access$000(StandardHttpRequestor.java:28) at com.dropbox.core.http.StandardHttpRequestor$Uploader.(StandardHttpRequestor.java:133) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:72) at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:28) at com.dropbox.core.v2.DbxRawClientV2.uploadStyle(DbxRawClientV2.java:221) at com.dropbox.core.v2.files.DbxUserFilesRequests.upload(DbxUserFilesRequests.java:2118) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:117) at com.dropbox.core.v2.files.UploadBuilder.start(UploadBuilder.java:18) at com.dropbox.core.v2.DbxUploadStyleBuilder.uploadAndFinish(DbxUploadStyleBuilder.java:92) at com.mendhak.gpslogger.senders.dropbox.DropboxJob.onRun(DropboxJob.java:75) at com.birbit.android.jobqueue.Job.safeRun(Job.java:229) at com.birbit.android.jobqueue.JobHolder.safeRun(JobHolder.java:132) at com.birbit.android.jobqueue.ConsumerManager$Consumer.handleRunJob(ConsumerManager.java:407) at com.birbit.android.jobqueue.ConsumerManager$Consumer.access$000(ConsumerManager.java:326) at com.birbit.android.jobqueue.ConsumerManager$Consumer$2.handleMessage(ConsumerManager.java:354) at com.birbit.android.jobqueue.messaging.SafeMessageQueue.consume(SafeMessageQueue.java:36) at com.birbit.android.jobqueue.ConsumerManager$Consumer.run(ConsumerManager.java:389) at java.lang.Thread.run(Thread.java:1012)` Thanks

mendhak commented 3 months ago

Do you know which version of Android you have? And the app version too.

Dropbox switched to TLS 1.2 in 2022, so the TLSV1_ALERT_PROTOCOL_VERSION message that I see in the output above is unusual.

Are you in an environment where your traffic is going through any proxies or middleware, any devices, VPNs, anything like that, I'm wondering what could be causing a TLS 1 related error.

What happens if you install the Conscrypt Provider app, then restart and try again?

My main verification regarding Dropbox is running these commands:

openssl s_client -connect api.dropboxapi.com:443 -tls1
openssl s_client -connect api.dropboxapi.com:443 -tls1_1
openssl s_client -connect api.dropboxapi.com:443 -tls1_2

The first two don't return a certificate, so Dropbox shouldn't be presenting TLS 1... unless I misunderstood that error, and the client side is only able to work with TLS 1 :confused:

rol1 commented 3 months ago

Android Version: 13 TKQ1.221114.001 Gpslogger Version: 106 I'm online without Proxy Using the App you recommend will be my task for tomorrow.

mendhak commented 3 months ago

Gpslogger Version: 106

Oh I think the problem is related to the GPSLogger version then. When Dropbox made the TLS 1.2 change, I also had to update the Dropbox SDK around the same time, in this commit in version 120.

I think you could try the Conscrypt provider, but I don't think it will work if the Dropbox SDK is simply not selecting the right TLS version. In which case the only other option is to try to upgrade to a later version.

rol1 commented 3 months ago

I See Version 131-RC2 in F-Droid, but I get an unknown Error when I try to install IT. IT also tells me that IT was build for an older Android Version.

rol1 commented 3 months ago

Version 130 ist installable on my Cellphone

mendhak commented 3 months ago

I think the 'older version' warning can be ignored, it's because the app targets low versions of Android. The unknown error, try a few times more, does it eventually install?

rol1 commented 3 months ago

Version 130 is working as expected