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

[BUG] curl_cffi.curl.CurlError: Failed to perform, curl: (16). #367

Open
mehmetuken opened this issue Aug 11, 2024 · 8 comments
Open

[BUG] curl_cffi.curl.CurlError: Failed to perform, curl: (16). #367

mehmetuken opened this issue Aug 11, 2024 · 8 comments
Assignees
Labels
bug Something isn't working needs more info This bug report is not complete

Comments

@mehmetuken
Copy link

Describe the bug
Getting error curl_cffi.curl.CurlError: Failed to perform, curl: (16).

To Reproduce

    warnings.filterwarnings("ignore")
    ja3 = ",".join(
        [
            "771",
            "4865-4866-4867-49195-49196-52393-49199-49200-52392",
            "0-23-65281-10-11-35-16-5-13-51-45-43-21",
            "29-23-24",
            "0",
        ]
    )
    akamai = "4:16777216|16711681|0|m,p,a,s"

    extra_fp = {
        "tls_signature_algorithms": [
            "ecdsa_secp256r1_sha256",
            "rsa_pss_rsae_sha256",
            "rsa_pkcs1_sha256",
            "ecdsa_secp384r1_sha384",
            "rsa_pss_rsae_sha384",
            "rsa_pkcs1_sha384",
            "rsa_pss_rsae_sha512",
            "rsa_pkcs1_sha512",
            "rsa_pkcs1_sha1"
        ]
    }

    r = requests.Session()
    r.ja3 = ja3
    r.akamai = akamai
    r.extra_fp = extra_fp
    r.proxies = {"http": proxy_url, "https": proxy_url}
    return r

Expected behavior

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/curl_cffi/requests/session.py", line 984, in request
    c.perform()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/curl_cffi/curl.py", line 292, in perform
    self._check_error(ret, "perform")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/curl_cffi/curl.py", line 137, in _check_error
    raise error
curl_cffi.curl.CurlError: Failed to perform, curl: (16) . See https://curl.se/libcurl/c/libcurl-errors.html first for more details.

The above exception was the direct cause of the following exception:

Versions

  • OS: macos arm
  • curl_cffi version curl_cffi==0.7.1
  • pip freeze
  • curl_cffi==0.7.1

Additional context

  • Which session are you using? SYNC sessin
@mehmetuken mehmetuken added the bug Something isn't working label Aug 11, 2024
@mehmetuken mehmetuken changed the title [BUG] [BUG] curl_cffi.curl.CurlError: Failed to perform, curl: (16). Aug 11, 2024
@perklet
Copy link
Collaborator

perklet commented Aug 11, 2024 via email

@mehmetuken
Copy link
Author

Can you reproduce the issue without proxy? 来自手机回复

On Sun, Aug 11, 2024 at 16:28 Mehmet Tüken @.> wrote: Assigned #367 <#367> to @yifeikong https://github.com/yifeikong. — Reply to this email directly, view it on GitHub <#367 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH4ZX76574XTVK6SKTAD33ZQ4OEJAVCNFSM6AAAAABMKRXCN6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTHAZTGMBVGUYDSMA . You are receiving this because you were assigned.Message ID: @.>

No, i don't. Only using proxy.

@perklet
Copy link
Collaborator

perklet commented Aug 11, 2024

It's probably related to your proxy. Try limit the connection to http 1.1, it seems some proxies does not handle http/2 very well.

@FayzulSaimun
Copy link

I am having the same issue with and without proxies. It mostly happens with proxies.

@gallamine
Copy link
Contributor

I too am seeing this issue. Only with proxies though.

@markjacksoncerberus
Copy link

Is the site you're trying to request a cloudflare protected site?

I have this issue when using lower quality IPs. My best guess is that cloudflare responds abnormally as a challenge and it fails to negotiate tls.

Using my same fingerprints that I know are good but from residential IP / premium residential proxies I get all 200s no error. But using unlimited datacenter proxies, for example, I see this error among several others like: 'Proxy CONNECT aborted', 'CONNECT tunnel failed', 'BoringSSL SSL_connect' etc

@vadim234321
Copy link

Same problem with proxy,anyone solve this issue? Im use residental proxies

@lexiforest lexiforest added the needs more info This bug report is not complete label Oct 6, 2024
@jlhqq2960799699
Copy link

Is there a situation where this fingerprint is used up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info This bug report is not complete
Projects
None yet
Development

No branches or pull requests

8 participants