Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1337x] (testing) Exception (1337x): The cookies provided by FlareSolverr are not valid: The cookies provided by FlareSolverr are not valid #481

Closed
BenBJD opened this issue Aug 25, 2022 · 29 comments
Assignees
Labels
bug Something isn't working confirmed

Comments

@BenBJD
Copy link

BenBJD commented Aug 25, 2022

Environment

  • FlareSolverr version: 2.2.6
  • Last working FlareSolverr version: 2.2.6
  • Operating system: Ubuntu 22.04
  • Are you using Docker: yes
  • FlareSolverr User-Agent (see log traces or / endpoint): Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
  • Are you using a proxy or VPN? no
  • Are you using Captcha Solver: yes
  • If using captcha solver, which one: flaresolverr
  • URL to test this issue: https://1337x.unblockit.bet/sort-search/top gun maverick/time/desc/1/

Description

Flaresolverr seems to think it's solving the challenge but Jackett seems to think the cookies arent valid

Logged Error Messages

(Nothing seems to be going wrong)

2022-08-25T21:07:09+01:00 INFO REQ-9 Incoming request => POST /v1 body: {"maxTimeout":55000,"cmd":"request.get","url":"https://1337x.unblockit.bet/cat/Movies/time/desc/1/"}
2022-08-25T21:07:16+01:00 INFO REQ-9 Cloudflare detected
2022-08-25T21:07:17+01:00 INFO REQ-9 Challenge solved
2022-08-25T21:07:19+01:00 INFO REQ-9 Response in 9.997 s

Screenshots

Screenshot 2022-08-25 211114

@Hyperz
Copy link

Hyperz commented Aug 25, 2022

Yeah something seems to have changed. Flaresolverr thinks it solved the challenge and only returns a cf_chl_prog cookie with a value of b.

@HDoujinDownloader
Copy link

Having the same issue over here with nhentai.net-- FlareSolverr thinks the challenge is solved, but is returning an invalid solution.

@MrTyton
Copy link

MrTyton commented Aug 25, 2022

Same with fanfiction.net

@rmail2006
Copy link

Cloudflare must have been updated. I'm getting this for 1337, limetorrents, eztv and YTS

@ivanjx
Copy link

ivanjx commented Aug 26, 2022

Debug log:

2022-08-26T07:44:10+00:00 INFO REQ-3 Incoming request => POST /v1 body: {"cmd":"request.get","url":"https://nhentai.net/","maxTimeout":60000}
2022-08-26T07:44:10+00:00 DEBUG REQ-3 Creating new session...
2022-08-26T07:44:10+00:00 DEBUG REQ-3 Launching web browser...
2022-08-26T07:44:12+00:00 DEBUG REQ-3 Navigating to... https://nhentai.net/
2022-08-26T07:44:13+00:00 INFO REQ-3 Cloudflare detected
2022-08-26T07:44:13+00:00 DEBUG REQ-3 Javascript challenge element '#trk_jschal_js' detected.
2022-08-26T07:44:13+00:00 DEBUG REQ-3 Waiting for Cloudflare challenge...
2022-08-26T07:44:13+00:00 DEBUG REQ-3 Javascript challenge element '#trk_jschal_js' detected.
2022-08-26T07:44:13+00:00 DEBUG REQ-3 Challenge element is hidden
2022-08-26T07:44:14+00:00 DEBUG REQ-3 Validating HTML code...
2022-08-26T07:44:15+00:00 INFO REQ-3 Challenge solved
2022-08-26T07:44:15+00:00 DEBUG REQ-3 Reloading the page
2022-08-26T07:44:15+00:00 INFO REQ-3 Response in 5.739 s

Postman response:

{
    "status": "ok",
    "message": "",
    "startTimestamp": 1661499850144,
    "endTimestamp": 1661499855883,
    "version": "v2.2.6",
    "solution": {
        "url": "https://nhentai.net/",
        "status": 503,
        "headers": {
            "date": "Fri, 26 Aug 2022 07:44:15 GMT",
            "content-type": "text/html; charset=UTF-8",
            "x-frame-options": "SAMEORIGIN",
            "permissions-policy": "accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()",
            "cache-control": "private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
            "expires": "Thu, 01 Jan 1970 00:00:01 GMT",
            "expect-ct": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
            "report-to": "{\"endpoints\":[{\"url\":\"https:\/\/a.nel.cloudflare.com\/report\/v3?s=b96lQ%2FTmQ86%2FZVOvtGUeNHrnyFP8pWhP%2FhbiZsjuy5HJqz686B3eH9mx4fz73W3o1BUMjgF%2BIEmw5hj3cSXc63x6FO0GLjKlukFgk1GEgcudsshZGUVWhEkHbVuv\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
            "nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
            "vary": "Accept-Encoding",
            "server": "cloudflare",
            "cf-ray": "740af0f219988989-SIN",
            "x-firefox-spdy": "h2"
        },
        "response": "<!DOCTYPE html><html lang=\"en-US\"><head>\n    <title>Just a moment...</title>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n    <meta name=\"robots\" content=\"noindex,nofollow\">\n    <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n    <link href=\"/cdn-cgi/styles/challenges.css\" rel=\"stylesheet\">\n    <meta http-equiv=\"refresh\" content=\"35\">\n\n<script src=\"/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=740af0f219988989\"></script></head>\n<body class=\"no-js\">\n    <div class=\"main-wrapper\" role=\"main\">\n    <div class=\"main-content\">\n        <h1 class=\"zone-name-title h1\">\n            <img class=\"heading-favicon\" src=\"/favicon.ico\" onerror=\"this.onerror=null;this.parentNode.removeChild(this)\">\n            nhentai.net\n        </h1>\n        <h2 class=\"h2\" id=\"challenge-running\">\n            Checking if the site connection is secure\n        </h2>\n        <noscript>\n            <div id=\"challenge-error-title\">\n                <div class=\"h2\">\n                    <span class=\"icon-wrapper\">\n                        <div class=\"heading-icon warning-icon\"></div>\n                    </span>\n                    <span id=\"challenge-error-text\">\n                        Enable JavaScript and cookies to continue\n                    </span>\n                </div>\n            </div>\n        </noscript>\n        <div id=\"trk_jschal_js\" style=\"display:none;background-image:url('/cdn-cgi/images/trace/jsch/nojs/transparent.gif?ray=740af0f219988989')\"></div>\n        <div id=\"challenge-body-text\" class=\"core-msg spacer\">\n            nhentai.net needs to review the security of your connection before proceeding.\n        </div>\n        <form id=\"challenge-form\" action=\"/?__cf_chl_f_tk=zTu5KhiFeGt2EEfaC3VrbbqDhW95EkSj_.Rf6DKF_wI-1661499855-0-gaNycGzNBmU\" method=\"POST\" enctype=\"application/x-www-form-urlencoded\">\n            <input type=\"hidden\" name=\"md\" value=\"K5.Ta_TBQrbypml1gdqyXZiaS_U8cxOd20tIrnH2VOE-1661499855-0-AbBIKUjPQvoBIVy2E6XT19sLd56fjBLORy8oNb_x4RZXgozSoF9a9QhjVV2Vw93nfJP_k7eMx8z8_kaJuyzqp5nPvVePNTwK3sSNVRV6bo2dgJc9TNeMDM6djRDCH_BIPgQhg3SL3Y9NgXLD3PgbiRUDOHy_WGybaBQOulijUHw140Jo-HJgHEEuAh2zvwSsMnRYKAf0M7tkvrqinlWKndCKNHOwm3Wp0YSoTRPOb4dHUDvmCM35h48IuZK7KPKrX0jVZ9lnwfLZB_aIpXYKykXKTR1nvgmuSPbWqT7I35VH31LK712NWeP0jg1ogSgynsYdK2L3FvXIZNaxdJZ9S4gCj_e0Qcdo6Zr3Y2u0XGA07Y78vD8RUoC1V-kpwQ5rP98VSVZIrQCbyk3ZF51LViJf_kHb3PAFDw0dqOJAg4dglV8zPEJedkFEnXFfey3RSJM9LoMu5tADkQdqBrxXHwcJKveCODSGrk0VthNFmxEKVExrOKcAFgU3xuKPQjTFCMP3mD68XVwQpbYAQLvcj3KRcorsN-4eCeDioOmwYvFR\">\n            <input type=\"hidden\" name=\"r\" value=\"UuGbOFFUThIdNgUO87R3sp7eb7rzGxVu3Es1IUzs5Mw-1661499855-0-ActLYpY6s1Rgc0WZUci4OlAWcT+HXLlF0bAqw5CJcXjTrp7hX1m9bclwbeRyvb+TbikqN3ew46rdYSH+SSGXMAhMQbjwMTkoil9LEmC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woC78T5XnAMde5hCYZo10ptVfMCgxWzRL8vEMm+MPS0ZjiDXxRSxJObn3+xQTR9SupACzyfnKw6siuLMi8qOgQQsdL8IKkDe4Fsmw5S4s5xrd7J+5H+4lsDYM2uk0iV+4OZk8FBxD1dJ8Bjz0Rx09jPy+Qq2GeQ/AO8GZdq6iVxZTVDAl/AjNuZGYRx7eW9MwnZLW+HOXhHly054FtAW+jem6aIC/yqJVAJYdYd/g5DoP82/cNv/bycY5T71J73zrFd4r0GSj54eDR4IDVLj8B4wJEooKGRwmFdd8vwywn8eJoU9EVxCIx7TDLYjKqnx43mAWZwGYqFN0wSMIJPmpE6A6fNtqkX7v0G0JGku55kiFclTkSif/h2p/dFito\">\n        </form>\n    </div>\n</div>\n<script>\n    (function(){\n        window._cf_chl_opt={\n            cvId: '2',\n            cType: 'non-interactive',\n            cNounce: '95022',\n            cRay: '740af0f219988989',\n            cHash: 'd51129d6e9b5021',\n            cUPMDTk: \"\/?__cf_chl_tk=zTu5KhiFeGt2EEfaC3VrbbqDhW95EkSj_.Rf6DKF_wI-1661499855-0-gaNycGzNBmU\",\n            cFPWv: 'b',\n            cTTimeMs: '1000',\n            cTplV: 4,\n            cRq: {\n                ru: 'aHR0cHM6Ly9uaGVudGFpLm5ldC8=',\n                ra: 'TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjo5NC4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94Lzk0LjA=',\n                rm: 'R0VU',\n                d: 'f7XHUz/qd1Ff0JNUQx17MfZsjV+2QvuwZ3bn8gKCC5wfgK4wWWedGxMPLMAHYblUpwalt3apAZPoGD/IAIxroufSiB5lqfGRq7a2q382q2HIx7wu2XAgrphzwvUKiJ1fpCrv11B4cb/1Mcve9IeWSfnyZQ1o0HY3MAcJ6JEq0X6VZkImeNmPY7qyEQ8XwT5dlueQb9+GP8bIhEod49kfK4FDbbNqVrsSLPkJxfnB4Vc+YbcuPBySZ4c6qAIRNqmHogSXAROrR0CefSxkhOvxvSHKBPxUIKI6NFV2AXrB/GKpBJBF7rXWn4zEoOkDGt+YQGvtfJLCPV4D5purux4nkgWuuZ6UdZNzB5odfq9X5pkaQScSV/tFySTQaK0joZ1i29EhhgiG8TPCUVnbj8P5qYqCNmCjuJCnXGxywuawSw+CzEFxJRNrMUOpmeuz8NnYan4EAFio3O5IWswxn/wSjNl+32mr+cZf9jWiFOp53yih8jmN4xVwCGGxqaLThmmcSZ6nChzDmhT0dmNlcrJETwRhXPVeAUodnri+3NtsaNY=',\n                t: 'MTY2MTQ5OTg1NS42OTUwMDA=',\n                m: 'MCzBN1sK2jpH0rLQywjN0xtikcK3eQRIlXHHXGUmblQ=',\n                i1: 'Qre9km29NaljH5e9lBKWJg==',\n                i2: 'MbBH8Y80rokKVJ6zMsSbtA==',\n                zh: 'ly4kcBS4ol4YTtHkFG/l5UE7PpXe2CqLUaBe5/meJm8=',\n                uh: 'iO9fZ36as/RpCSymoJBp7f9caiUB71p8ki00+55w/vA=',\n                hh: 'PFXTBoFvRkjuHQ/ExPheF2PK6XLgCoj2oqupI5mki1U=',\n            }\n        };\n        var trkjs = document.createElement('img');\n        trkjs.setAttribute('src', '/cdn-cgi/images/trace/jsch/js/transparent.gif?ray=740af0f219988989');\n        trkjs.setAttribute('style', 'display: none');\n        document.body.appendChild(trkjs);\n        var cpo = document.createElement('script');\n        cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=740af0f219988989';\n        window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;\n        window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;\n        if (window.history && window.history.replaceState) {\n            var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;\n            history.replaceState(null, null, \"\/?__cf_chl_rt_tk=zTu5KhiFeGt2EEfaC3VrbbqDhW95EkSj_.Rf6DKF_wI-1661499855-0-gaNycGzNBmU\" + window._cf_chl_opt.cOgUHash);\n            cpo.onload = function() {\n                history.replaceState(null, null, ogU);\n            };\n        }\n        document.getElementsByTagName('head')[0].appendChild(cpo);\n    }());\n</script><img src=\"/cdn-cgi/images/trace/jsch/js/transparent.gif?ray=740af0f219988989\" style=\"display: none\">\n\n    <div class=\"footer\" role=\"contentinfo\">\n        <div class=\"footer-inner\">\n            <div class=\"clearfix diagnostic-wrapper\">\n                <div class=\"ray-id\">Ray ID: <code>740af0f219988989</code></div>\n            </div>\n            <div class=\"text-center\">\n                Performance &amp; security by\n                <a rel=\"noopener noreferrer\" href=\"https://www.cloudflare.com?utm_source=challenge&amp;utm_campaign=j\" target=\"_blank\">Cloudflare</a>\n            </div>\n        </div>\n    </div>\n\n\n</body></html>",
        "cookies": [
            {
                "name": "cf_chl_prog",
                "value": "b",
                "domain": "nhentai.net",
                "path": "/",
                "expires": 1661503455,
                "size": 12,
                "httpOnly": false,
                "secure": false,
                "session": false
            }
        ],
        "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0"
    }
}

@ivanjx
Copy link

ivanjx commented Aug 26, 2022

a quick fix before the real problem is fixed is to just add a bit of delay (in my case 30s was enough for now):

const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
...
// spinner is hidden, could be a captcha or not
log.debug('Challenge element is hidden')
log.debug("Waiting for 30 secs");
await delay(30 * 1000);
// wait until redirecting disappears
...

hope it helps

@ipaqi
Copy link

ipaqi commented Aug 27, 2022

In case it helps, this is the output via FanFicFlare in Calibre of trying to access fanfiction.net

HTTP Error in FFF '<!DOCTYPE html><html lang="en-US"><head>
<title>Just a moment...</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
<meta http-equiv="refresh" content="35">

<script src="/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=7417513b6b7573b7"></script></head>
<body class="no-js">
<div class="main-wrapper" role="main">
<div class="main-content">
<h1 class="zone-name-title h1">
<img class="heading-favicon" src="/favicon.ico" onerror="this.onerror=null;this.parentNode.removeChild(this)">
www.fanfiction.net
</h1>
<h2 class="h2" id="challenge-running">
Checking if the site connection is secure
</h2>
<noscript>
<div id="challenge-error-title">
<div class="h2">
<span class="icon-wrapper">
<div class="heading-icon warning-icon"></div>
</span>
<span id="challenge-error-text">
Enable JavaScript and cookies to continue
</span>
</div>
</div>
</noscript>
<div id="trk_jschal_js" style="display:none;background-image:url('/cdn-cgi/images/trace/jsch/nojs/transparent.gif?ray=7417513b6b7573b7')"></div>
<div id="challenge-body-text" class="core-msg spacer">
www.fanfiction.net needs to review the security of your connection before proceeding.
</div>
<form id="challenge-form" action="/s/14114069/1/Legends-Never-Die?__cf_chl_f_tk=pYsobsptcVGSpvu41oaFTIVdgDZ_3Ovw.nPNK2R8Sfk-1661629628-0-gaNycGzNBuU" method="POST" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="md" value="2D3hFBleeQStPGcFe8E5C4GG7vJTXOBsan9Cg3dcxIA-1661629628-0-AWXOxktRmORkWM4Wbm5FBUNqEPhxoBzvZVqX101XG55NVl_9bPSayUv--rmwG7LDwx6JnCQANfZezA1GV-2oi1YZ2u6uDCB-S62BMx4sEckEsCj5RP1orVyFbbq-xX35o6tuTwCj_5zCD2fFVshqq5sAH1xayFguU0H9tacHI7PBwKIZfT8IscJ2T0d0MAI5DiI8etCFZHUNKijC4-6SiLDEs6q69IfnNSFIb06e9G2EjxAsd-2g_tMAkfhKuZ6zyU0zD8KjfYoDnRnhECA3OWIFvH451E_1qAFJJsBbRlAB0YS2Il2FsUwLdiLPHda1xgMDOQvBI9n60lQDDSNizEz2Mks54A84PNolfgImprIVLvtWsz6svKEAtiKb5cXz-TbFlES8EBmyCdTs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woU2TV7KXhVoEnxGIBQX9FaGXlTniKKK/1Hhrmv2anG5Qd4PYQEEJWeSOQMxLEG285KlmxIDm6+EKeCiP8YwwvwTd8IP7OD6hXef6MQGJYEVdTcPvXH4PoVBqU0sroybWuHWgJ13hfBbNzoHucenc32um/OudfPS3G3aNMIEV8uy1sItfw9K0lQ+fmj+0lQpr92lSDUQFVFMx3gPevFs4axrvQ+8xtseSoPGKPrXS5oQZ5VHqp0acajffCVGE2rd04O4tj5av/5FwSt9Em5BZ2XTVDVcuLuK/JbPTdvWWtqgx76QfE8v8kKRWPjAXLwTLqOfop11pKE2Y+Yo1b46lpKU0ZeANANHX61OsYEe7bhphf1DQ+IDho/TUrQBwDfnYFcoyqL0YvR9fl2e1jvU2wY9IegZtcEszObT/STN6RNLTxEC5FCDsbTQ/Y74iet4q85pYl9XcrC3tZm5aK01tpoXBCD6nhtMNFRHmAQCJEBRVzE8lpfKiuB4JfUtPFLRi4c7/RgZdQGO3LtUMmx7oMXastD+cz4ZMYDOdq4gE0W8eN85ryLyKilSwQbNOmNNjTbBqvkc9hbm4sLWMGCGIouKl4pi+EQyUlL/ZPs2z+kUW5jHxkU+5mqfUHkepwC9ti9AzAfge0FoCnkjqq8wIssBiDEViS31sJYt5EaStBOyyBVOmvuhkCSn5vNSEL2DwwAG55BzvyzwVET/EODysYv8AAvr8tieu1iMndl85RCMVz04U/2Z/g3Pi8Uu9X642GjYTvntOHVplGZJ1fxrpm/zhoL+Xh2e9tJNJYBdHLe4eda5Q4K3j4oixrwX8+pRGiYdthhpA/BokJLlXiE4TPEhu/jTzddFcTLpqohD7HV4Jm1EfsK3X8l8i+xfLr0vyPdfgFtYE5r+qIVTCpRxKRkMbSuW90ZD4VWBjUPudcGfTshnvL5XUoNbg1kiKBPatLu51zmPKy5PD8dzVvOHQ4OhaXlEHbrJUXNvEetkProHDPQj7z">
</form>
</div>
</div>
<script>
(function(){
window._cf_chl_opt={
cvId: '2',
cType: 'non-interactive',
cNounce: '46549',
cR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=',
i1: 'st3ChT3OzSK4fnv1F3pPCA==',
i2: 'rdftlL6oW653D/wn11HZxA==',
zh: 'ZpaXvzspOrwreFFqBU0xW4uemSZhlFuabF38XN6L/9o=',
uh: 'zPK4YQv1GPRZj/xM4YyrZiTUvvoYLYA2uXRMX2Jot40=',
hh: 'q+cqS/21CpTeI/iaB+9HyTCbvjOCqa8bvFUXdzDnXKU=',
}
};
var trkjs = document.createElement('img');
trkjs.setAttribute('src', '/cdn-cgi/images/trace/jsch/js/transparent.gif?ray=7417513b6b7573b7');
trkjs.setAttribute('style', 'display: none');
document.body.appendChild(trkjs);
var cpo = document.createElement('script');
cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=7417513b6b7573b7';
window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
if (window.history && window.history.replaceState) {
var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
history.replaceState(null, null, "/s/14114069/1/Legends-Never-Die?__cf_chl_rt_tk=pYsobsptcVGSpvu41oaFTIVdgDZ_3Ovw.nPNK2R8Sfk-1661629628-0-gaNycGzNBuU" + window._cf_chl_opt.cOgUHash);
cpo.onload = function() {
history.replaceState(null, null, ogU);
};
}
document.getElementsByTagName('head')[0].appendChild(cpo);
}());
</script><img src="/cdn-cgi/images/trace/jsch/js/transparent.gif?ray=7417513b6b7573b7" style="display: none">

&lt;div class=&quot;footer&quot; role=&quot;contentinfo&quot;&gt;
    &lt;div class=&quot;footer-inner&quot;&gt;
        &lt;div class=&quot;clearfix diagnostic-wrapper&quot;&gt;
            &lt;div class=&quot;ray-id&quot;&gt;Ray ID: &lt;code&gt;7417513b6b7573b7&lt;/code&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;text-center&quot;&gt;
            Performance &amp;amp; security by
            &lt;a rel=&quot;noopener noreferrer&quot; href=&quot;https://www.cloudflare.com?utm_source=challenge&amp;amp;utm_campaign=j&quot; target=&quot;_blank&quot;&gt;Cloudflare&lt;/a&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

</body></html>'(503) URL:'https://www.fanfiction.net/s/14114069/1/Legends-Never-Die'

@ghwjp
Copy link

ghwjp commented Aug 28, 2022

a quick fix before the real problem is fixed is to just add a bit of delay (in my case 30s was enough for now):

const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
...
// spinner is hidden, could be a captcha or not
log.debug('Challenge element is hidden')
log.debug("Waiting for 30 secs");
await delay(30 * 1000);
// wait until redirecting disappears
...

Sorry, guys, I am kind of a newbie to jackett/sonarr, how can I apply the above solution to my system?
Is this a command or I need to add it to some config file? Or...?
Thanks for your kind attention and explanation.
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))

@chris-fp
Copy link

spinner is hidden, could be a captcha or not

@ghwjp I think this needs adding into the source code and re-compiling. Those of us using Windows will have to wait for a new version to be compiled.

@chris-fp
Copy link

How is the testing going - hoping the fix can be implemented soon.

@Romangelo
Copy link

Still no update?

@ecchirealm
Copy link

I don't this this has been fixed

@kBraDrs
Copy link

kBraDrs commented Sep 3, 2022

Have the same issue unfortunately. I am using Jackett at the moment, I've been fiddling all day, even tried Prowlarr, now I am thinking that this is a FlareResolverr issue.
I get the below error, same with most other indexers.

Exception (yts): The cookies provided by FlareSolverr are not valid: The cookies provided by FlareSolverr are not valid

@Iceboy-6
Copy link

Iceboy-6 commented Sep 3, 2022

Have the same issue unfortunately. I am using Jackett at the moment, I've been fiddling all day, even tried Prowlarr, now I am thinking that this is a FlareResolverr issue. I get the below error, same with most other indexers.

Exception (yts): The cookies provided by FlareSolverr are not valid: The cookies provided by FlareSolverr are not valid

Bug was already confirmed and the team is working on it. We only can wait.

You can quick fix/avoid this problem using unblockninja proxies (to bypass cloudflare challenges), like https://1337x.unblockninja.com .

Cheers

I don't this this has been fixed

Yes, issue is still open in GitHub.

@ghwjp
Copy link

ghwjp commented Sep 4, 2022

Let's give the developers some time and appreciate their contribution. :)

@ted423
Copy link

ted423 commented Sep 10, 2022

image

it's can work without FlareSolverr , but test failed and tip me to use .
and still can't pass test

Jackett.Common.IndexerException: Exception (0magnet): The cookies provided by FlareSolverr are not valid
 ---> FlareSolverrSharp.Exceptions.FlareSolverrException: The cookies provided by FlareSolverr are not valid
   at FlareSolverrSharp.ClearanceHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Jackett.Common.Utils.Clients.HttpWebClient2.Run(WebRequest webRequest) in /home/vsts/work/1/s/src/Jackett.Common/Utils/Clients/HttpWebClient2.cs:line 179
   at Jackett.Common.Utils.Clients.WebClient.GetResultAsync(WebRequest request) in /home/vsts/work/1/s/src/Jackett.Common/Utils/Clients/WebClient.cs:line 209
   at Jackett.Common.Indexers.BaseWebIndexer.RequestWithCookiesAsync(String url, String cookieOverride, RequestType method, String referer, IEnumerable`1 data, Dictionary`2 headers, String rawbody, Nullable`1 emulateBrowser) in /home/vsts/work/1/s/src/Jackett.Common/Indexers/BaseIndexer.cs:line 516
   at Jackett.Common.Indexers.CardigannIndexer.PerformQuery(TorznabQuery query) in /home/vsts/work/1/s/src/Jackett.Common/Indexers/CardigannIndexer.cs:line 1414
   at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query, Boolean isMetaIndexer) in /home/vsts/work/1/s/src/Jackett.Common/Indexers/BaseIndexer.cs:line 324
   --- End of inner exception stack trace ---
   at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query, Boolean isMetaIndexer) in /home/vsts/work/1/s/src/Jackett.Common/Indexers/BaseIndexer.cs:line 324
   at Jackett.Common.Indexers.BaseWebIndexer.ResultsForQuery(TorznabQuery query, Boolean isMetaIndexer) in /home/vsts/work/1/s/src/Jackett.Common/Indexers/BaseIndexer.cs:line 680
   at Jackett.Common.Services.IndexerManagerService.TestIndexer(String name) in /home/vsts/work/1/s/src/Jackett.Common/Services/IndexerManagerService.cs:line 309
   at Jackett.Server.Controllers.IndexerApiController.Test() in /home/vsts/work/1/s/src/Jackett.Server/Controllers/IndexerApiController.cs:line 132
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jackett.Server.Middleware.CustomExceptionHandler.Invoke(HttpContext httpContext) in /home/vsts/work/1/s/src/Jackett.Server/Middleware/CustomExceptionHandler.cs:line 61

@elvisisvan
Copy link

elvisisvan commented Sep 11, 2022

a quick fix before the real problem is fixed is to just add a bit of delay (in my case 30s was enough for now):

const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
...
// spinner is hidden, could be a captcha or not
log.debug('Challenge element is hidden')
log.debug("Waiting for 30 secs");
await delay(30 * 1000);
// wait until redirecting disappears
...

hope it helps

i opened vscode and edited the file solver.js inside flaresolverr/dist/services folder according to your suggestion, stop/restart jackett:
image
it did not work:
image
have i done it correctly or was i missing something? can you share what exactly did you do to get it working?

@ivanjx
Copy link

ivanjx commented Sep 11, 2022

@elvary https://gist.github.com/realivanjx/f9aee9384ec78cd8513af3e4e0d40172

@ivanjx
Copy link

ivanjx commented Sep 11, 2022

revert all of your changes and replace the file i provided

ilike2burnthing added a commit that referenced this issue Sep 12, 2022
@ilike2burnthing
Copy link
Contributor

v2.2.7 now out.

This uses the fix from @realivanjx, so a big thank you to them.

Hopefully when @ngosang has some free time they can resolve the issue without the need for the delay.

@Deathnetworks
Copy link

Deathnetworks commented Sep 12, 2022

v2.2.7 now out.

This uses the fix from @realivanjx, so a big thank you to them.

Hopefully when @ngosang has some free time they can resolve the issue without the need for the delay.

Sadly still getting the cookie issue - The cookies provided by FlareSolverr are not valid

while it tells me
2022-09-12T02:38:19+00:00 INFO REQ-5 Incoming request => POST /v1 body: {"maxTimeout":180000,"cmd":"request.get","url":"https://ranobes.net/chapters/223656/"} 2022-09-12T02:38:21+00:00 INFO REQ-5 Cloudflare not detected 2022-09-12T02:38:22+00:00 INFO REQ-5 Response in 2.761 s

And that URL has cloudflare protection, something is happening likely cloudflare updated :@

So, I'm confuddled.

Stupid cloudflare.... >.<

Side-Note: Ranobes.net worked with flaresolverr perfectly a few days ago
image

I can't see any other place there might be an issue in identifying if cloudflare is running other than

} else if (response.headers().vary && response.headers().vary.trim() == 'Accept-Encoding,User-Agent' &&

Which due to response.headers().vary.trim() == 'Accept-Encoding,User-Agent' not matching the actual response header exactly it leads to the else condition which nullifies the previous cf detection via the server identification in the headers.

But, I'm no expert on flaresolverr code.. So could be miles off

Edit:
2022-09-12T03:25:33+00:00 INFO REQ-18 Incoming request => POST /v1 body: {"maxTimeout":180000,"cmd":"request.get","url":"https://noblemtl.com/series/logging-10000-years-into-the-future/"} 2022-09-12T03:25:35+00:00 INFO REQ-18 Cloudflare detected 2022-09-12T03:26:06+00:00 INFO REQ-18 Challenge solved 2022-09-12T03:26:07+00:00 INFO REQ-18 Response in 33.438 s

Successfully detected and solved, while having 'similiar' response header as ranobe...

image
image

Nope, no idea... Brain is mush

@ilike2burnthing
Copy link
Contributor

Feel free to tinker, test it out, and submit a PR - https://github.com/FlareSolverr/FlareSolverr#from-source-code

@ivanjx
Copy link

ivanjx commented Sep 12, 2022

@Deathnetworks

in my case cf is not detected. not showing with a browser too.

2022-09-12T03:54:44+00:00 INFO REQ-1 Incoming request => POST /v1 body: {"cmd":"request.get","url":"https://ranobes.net/chapters/223656/","maxTimeout":60000}
2022-09-12T03:54:51+00:00 INFO REQ-1 Cloudflare not detected
2022-09-12T03:54:53+00:00 INFO REQ-1 Response in 8.107 s

@Deathnetworks
Copy link

I'm narrowing in on the issues....
Using debug+Nightinggale REST Client, i've seen there's basically no issue with flaresolverr. The response comes back properly with cookies etc and no issues with cloudflare.

Thus the issue MUST be with FlaresolverrSharp (which I'm gonna assume everyone is using as the bridge, since I can't find the message "The cookies provided by FlareSolverr are not valid: The cookies provided by FlareSolverr are not valid"

I've still got a few hours before I got to get sorted for a flight (which will leave me PC-less for a week 0.0), I'll have a look at it and see where the issue is coming from at the least.

@Deathnetworks
Copy link

Deathnetworks commented Sep 12, 2022

I got a theory, not 100% how to implement the fix to it....

But, the theory is along the lines of - the cloudflare protection is some form of 'unique view' checker, which means it generates a 1 time use cookie...
Now, the issue that brings up is - If we copy the cookies to a new request the UNIQUE cookie causes a status 403 - Reason Forbidden.

This causes an issue due to flaresolverrsharp doing the process -

  1. Attempt raw get
  2. if fail (status 403/500) -> send to flaresolverr
  3. copy cookies from flareresponse into request
  4. attempt new raw get using flare cookies
  5. if fail (status 403/500) -> bitch and moan

Fix

  • Detect the issue and then use flare response
  • See if flare response looks good, then just return it instead of bothering to re-re-re-request - Which more often than not seems to look fine to me?

@Deathnetworks
Copy link

Right.... Maybe this works, maybe it doesn't... Worked in testing, but that's not the real world

Possible fix =>
src/FlareSolverrSharp/ChallengeDetector.cs - Changed
https://gist.github.com/Deathnetworks/c95316fed4a6532288bf951fc6eceb32#file-challengedetector-cs

Code

if (ChallengeDetector.IsClearanceRequired(response))
                {
                    if (response.Headers.Contains("CF-Chl-Bypass") && response.Headers.FirstOrDefault(x => x.Key == "CF-Chl-Bypass").Value.First() == "1"
                        && flareSolverrResponse.Status == "ok")
                    {
                        HttpResponseMessage msg = new HttpResponseMessage() { Content = new StringContent(flareSolverrResponse.Solution.Response) };
                        msg.Headers.Add("status", flareSolverrResponse.Solution.Status);                        
                        //msg.Headers.Add("content-type", "text/html; charset=utf-8");
                        msg.Headers.Add("date", flareSolverrResponse.Solution.Headers.Date);


                        return msg;
                    }
                    throw new FlareSolverrException("The cookies provided by FlareSolverr are not valid");
                }

It ain't pretty, but it works (for me)

@ngosang
Copy link
Member

ngosang commented Sep 17, 2022

Update to FlareSolverr 2.2.8
https://github.com/FlareSolverr/FlareSolverr/releases/tag/v2.2.8

I just removed the 30 s delay hack, it should solve the challenges faster.
@ilike2burnthing Thank you very much for managing the issues!

@ngosang ngosang closed this as completed Sep 17, 2022
@ghostdevv
Copy link

I am on latest but still having this issue

@ilike2burnthing
Copy link
Contributor

Open a new issue, providing the information requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests