Closed CGarces closed 3 years ago
It's really strange.
How reproduce the error.
Create /usr/bin/flickr-downloader with the following content
#!/bin/bash
if [ ! -f ~/.config/flickr-downloadr/token.repo ]; then
sudo cert-sync /etc/ssl/certs/ca-certificates.crt
fi
/opt/flickrdownloadr/bin/flickr-downloadr.exe
Be sure that ~/.config/flickr-downloadr
folder not exist
The certificates will be imported, login should work fine, I can get my photos.
Close the program and run again, the Unhandled Exception appears. I need to rm -rf ~/.config/flickr-downloadr to get the tool working again.
Unhandled Exception:
System.Net.WebException: Error: SecureChannelFailure (The authentication or decryption has failed.) ---> System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x00040] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <e220be0b0a364427860ee43376ab6f2b>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x0003b] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <e220be0b0a364427860ee43376ab6f2b>:0 ---> System.IO.IOException: Unable to write data to the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
at System.Net.Sockets.Socket.EndSend (System.IAsyncResult result) [0x00033] in <6c7c03f48a9747c8a644da4f63a34480>:0
at System.Net.Sockets.NetworkStream.EndWrite (System.IAsyncResult asyncResult) [0x0005f] in <6c7c03f48a9747c8a644da4f63a34480>:0
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndWrite (System.IAsyncResult asyncResult) [0x000af] in <6c7c03f48a9747c8a644da4f63a34480>:0
at Mono.Security.Protocol.Tls.RecordProtocol.EndSendRecord (System.IAsyncResult asyncResult) [0x00040] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.RecordProtocol.SendRecord (Mono.Security.Protocol.Tls.ContentType contentType, System.Byte[] recordData) [0x0000b] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (Mono.Security.Protocol.Tls.Alert alert) [0x00027] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (System.Exception& ex) [0x00021] in <e220be0b0a364427860ee43376ab6f2b>:0
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00057] in <e220be0b0a364427860ee43376ab6f2b>:0
at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in <6c7c03f48a9747c8a644da4f63a34480>:0
at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000e] in <6c7c03f48a9747c8a644da4f63a34480>:0
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x00044] in <6c7c03f48a9747c8a644da4f63a34480>:0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <6c7c03f48a9747c8a644da4f63a34480>:0
at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <6c7c03f48a9747c8a644da4f63a34480>:0
at FloydPink.Flickr.Downloadr.Logic.UpdateCheckLogic.UpdateAvailable (FloydPink.Flickr.Downloadr.Model.Preferences preferences) [0x00053] in <ad386597db914146b84689f1bca42c43>:0
at FloydPink.Flickr.Downloadr.Presentation.LoginPresenter.ApplyUser (FloydPink.Flickr.Downloadr.Model.User user) [0x0001b] in <37bacda32e4f441b8e01b49a30028cef>:0
at FloydPink.Flickr.Downloadr.Logic.LoginLogic+<CallApplyUser>c__async0.MoveNext () [0x00092] in <ad386597db914146b84689f1bca42c43>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__1 (System.Object state) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
I found the offending file: prefs.repo
If I remove prefs.repo before launch flickr-downloadr it works ok.
I have added rm -f ${XDG_CONFIG_HOME:-$HOME/.config}/flickr-downloadr/prefs.repo
at /opt/flickrdownloadr/flickrdownloadr
as workarround.
Can you check the latest version that was released a few hours back to see if this issue still persists, @CGarces ?
👍
I'm using flickr-downloadr from the deb package on Debian 8 stable.
After fix one error in the login (#37)
I get another error after try to download something from my account.