openbullet / OpenBullet2

OpenBullet reinvented
https://docs.openbullet.dev/
MIT License
1.78k stars 479 forks source link

httprequestexception the ssl connection could not be established see inner exception #499

Closed ronnie32 closed 2 years ago

ronnie32 commented 3 years ago

Hi there, Having a problem with OB2 Native and Web, any request I'm trying to make returns"httprequestexception the ssl connection could not be established see inner exception", even for the builtin requests like captcha solving balance check, any help please ?

openbullet commented 3 years ago

Please go to settings and enable verbose mode, then get the error again and post the full exception here thanks.

ronnie32 commented 3 years ago

HttpRequestException: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken) at CaptchaSharp.HttpClientExtensions.GetAsync(HttpClient httpClient, String url, StringPairCollection pairs, CancellationToken cancellationToken) at CaptchaSharp.HttpClientExtensions.GetStringAsync(HttpClient httpClient, String url, StringPairCollection pairs, CancellationToken cancellationToken) at CaptchaSharp.Services.TwoCaptchaService.GetBalanceAsync(CancellationToken cancellationToken) at RuriLib.Blocks.Captchas.Methods.CheckBalance(BotData data) at RuriLib.Blocks.Captchas.Methods.SolveRecaptchaV2(BotData data, String siteKey, String siteUrl, String sData, Boolean enterprise, Boolean isInvisible, Boolean useProxy, String userAgent) at Submission#0.<>d__0.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray1 precedingExecutors, Func2 currentExecutor, StrongBox1 exceptionHolderOpt, Func2 catchExceptionOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray1 precedingExecutors, Func2 currentExecutor, Func2 catchExceptionOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptStateTaskExtensions.CastAsync[S,T](Task`1 task) at RuriLib.Models.Debugger.ConfigDebugger.Run()

JReming85 commented 3 years ago

I am assuming its refusing to connect to the site because their SSL cert is expired or does not match the FQDN.

Try accessing it using HTTP:// instead of HTTPS:// to see if that helps, otherwise you might need to use Puppeteer instead of Rurilib and manually allow the invalid cert. Unles OB2 has a way to ignore cert errors.

If it doesnt have a bypass cert validation, that might be a good enhancement.

ronnie32 commented 3 years ago

Ah, I guess thats why I had problem to use CaptchasIO in OB 1.2.2 as well, someone mentionned it , issue #715 @openbullet I will be glad to give you an API key so you can fix the issue with that solving service, would be sad to waste my 1 month subscription...

JReming85 commented 3 years ago

Ah, I guess thats why I had problem to use CaptchasIO in OB 1.2.2 as well, someone mentionned it , issue #715 @openbullet I will be glad to give you an API key so you can fix the issue with that solving service, would be sad to waste my 1 month subscription...

You should just be able to enter it as custom, use the FQDN they provide. Do they also not do a non SSL version? I think most services do both.

ronnie32 commented 3 years ago

Ah, I guess thats why I had problem to use CaptchasIO in OB 1.2.2 as well, someone mentionned it , issue #715 @openbullet I will be glad to give you an API key so you can fix the issue with that solving service, would be sad to waste my 1 month subscription...

You should just be able to enter it as custom, use the FQDN they provide. Do they also not do a non SSL version? I think most services do both.

I haven't found the answer about SSL in their FAQ, about custom, unless I missed something, I don't think it works as there is some param to parse into the headers and OB won't let do that, here is their document https://api.captchas.io/document/

openbullet commented 3 years ago

@ronnie32 send it to ruri (at) openbullet [dot] dev and I will take a look

ronnie32 commented 3 years ago

ruri (at) openbullet [dot] dev

Sent!

JReming85 commented 3 years ago

Also it should function correctly if you just added it as Custom 2Captcha Host api.captchas.io , port 80

It actually checks the key for me so I am sure it would work (gives me Invalid key, but would give me a 400 error or ssl error if it was going to redirect me)

EDIT:

2captcha emulates anticaptcha (antigate) which most 3rd party captcha solvers emulate. So in general custom 2captcha should work for most of the non listed captcha solvers out there.

openbullet commented 3 years ago

@ronnie32 please try the method @JReming85 suggested and let me know if it works as I currently cannot get my hands on OB2

openbullet commented 2 years ago

Closing stale issue