FlareSolverrSharp icon indicating copy to clipboard operation
FlareSolverrSharp copied to clipboard

"The cookies provided by FlareSolverr are not valid"

Open Divi-0 opened this issue 7 months ago • 0 comments

Hi, when I send a request with the ClearenceHandler in C# I get an exception with the message "The cookies provided by FlareSolverr are not valid". Here is the code that I am executing

var handler = new ClearanceHandler("http://localhost:8191/")
{
    MaxTimeout = 60000
};

var client = new HttpClient(handler);
var request = new HttpRequestMessage
{
    RequestUri = new Uri("https://www.crunchyroll.com", UriKind.Absolute),
    Method = HttpMethod.Get
};
var response = await client.SendAsync(request);

But when I send a request via curl everything works fine, I get a valid response

curl -L -X POST 'http://localhost:8191/v1' -H 'Content-Type: application/json' --data-raw '{
  "cmd": "request.get",
  "url": "https://www.crunchyroll.com",
  "maxTimeout": 60000
}'

The log messages in the FlareSolverr container are for both methods the same.

I saw that the ClearenceHandler is sending 3 request, 2 via the normal HttpClient and one with the FlareSolverr and then just apply the cookies. Could this maybe cause a problem?

FlareSolverr v3.3.25 FlareSolverrSharp v3.0.7

Divi-0 avatar Jul 12 '25 00:07 Divi-0