Search Unity

What's "Curl error 56"?

Discussion in 'Editor & General Support' started by Peter77, Dec 16, 2019.

  1. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you provide steps to reproduce? I agree there seems to be an issue but I tried the steps here and didn't see any error with Unity 2020.1.13f1, I only see the divide by zero exception that I trigger in a button click after I disconnect the network https://forum.unity.com/threads/whats-curl-error-56.794703/page-2#post-6296494 I suspect with my router and my current network configuration here, I might not see the error. A Charles Proxy capture would be helpful. Once you start seeing the error, you could launch Charles Proxy and capture the traffic and save to .chls file. Install the root certificate from the Charles Proxy Help menu, and reboot. https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity This will help us to troubleshoot.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    To my knowledge this should be fixed in all latest Unity versions. If you can reproduce it in any of the latest Unity versions, please provide exact details.
     
  3. capyvara

    capyvara

    Joined:
    Mar 11, 2010
    Posts:
    80
    This problem is caused by plugins (or Unity itself) doing UnityWebRequests that are failing, in my case it was Firebase's trying to send analytics during build time and our company router was somehow blocking it.

    Go to Firebase config and disable in editor analytics, also disable for Google's External Dependency Manager for Unity (EDM4U).

    As per curl.h error 56 is:
    CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */


    Unity (2019.4.21 at least) suppresses
    CURLE_COULDNT_RESOLVE_PROXY, CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT, CURLE_SSL_CONNECT_ERROR
    by by default (so it prints but doesn't raise errors).

    UnityWebRequest has a private suppressErrorsToConsole property that allows to set this, imho Unity should make it public (or you can use reflection).
     
  4. jorge_acm

    jorge_acm

    Joined:
    Dec 12, 2020
    Posts:
    6
    Hi, I have a similar problem, when I install google admob SDK, they just don't work anymore when compiling (build and run) I get the following error "Curl error 56: Recv failure: Connection was reset". It is something weird, since it worked fine a few weeks ago, I updated my game and suddenly it no longer worked, I opened another project, without modifying anything, and the same error appeared. Apparently it is a problem with the Google admob SDK, since when I uninstall it, the game works correctly on the phone. Does anyone have any idea how to fix this? Thank you
    UNITY 2020.2.11f1 - sdk googleMobileAds-5.4.0 is the latest
    UNITY 2020.1
     
  5. Karry-su

    Karry-su

    Joined:
    Nov 23, 2015
    Posts:
    7
    I got a crash report which cause by "Curl error 56: Receiving data failed with unitytls error code 1048578" on a Android device, not on my Unity Editor.
    I don't know how to reproduce it. I just want to say this problem will not only occurs on Editor.

    This app was built by Unity 2020.3.1f1 .
     
    Last edited: May 10, 2021
  6. ABerlemont

    ABerlemont

    Joined:
    Sep 27, 2012
    Posts:
    67
    Hey there,

    I had the 1048578 error code pop up in a build. Only once, very rare instance.
    Just to check if there are any news on if it's fixed since your message in January ?

    My game build was made with Unity 2019.4.9f1

    Thanks :)
     
    NatalieBaldwin likes this.
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We would need specific steps to reproduce in your case.
     
  8. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Recently I've been experiencing a similar situation. Unity Editor crashes several times a day because of:

    Code (CSharp):
    1. Crashed Thread:        4  CurlRequest
    2.  
    3. Exception Type:        EXC_CRASH (SIGABRT)
    4. Exception Codes:       0x0000000000000000, 0x0000000000000000
    5. Exception Note:        EXC_CORPSE_NOTIFY
    6.  
    7. Application Specific Information:
    8. abort() called
    9. Unity(1490,0x7000054dc000) malloc: *** error for object 0x7fa65c507850: pointer being freed was not allocated
    Even with an empty project. Any thoughts on that?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please see my previous post.
     
  10. s-saens

    s-saens

    Joined:
    Aug 14, 2019
    Posts:
    8
    Hi, I still have same problem on 2021.2.15f of apple silicon version. I'm using m1 macbook air, mac os 12.2.1

    I did :
    - Imported Google Play Game Service(GPGS) package
    > It reproduced a gradle error when the GPGS resolves Android. So I changed JDK path manually (added '/' at last of the default path) and this gradle error got fixed. (.. well, this could be an another issue.)
    - Changed my JAVA_HOME variable
    - Changed my .bash_profile

    I checked out to my git commit before importing GPGS, and it still reproduces same error for 5 times, but after the fifth, it doesn't appear anymore.
     
    Last edited: Apr 11, 2022
  11. artoonie

    artoonie

    Joined:
    Feb 9, 2017
    Posts:
    22
    Hi @JeffDUnity3D, I cannot reproduce reliably, but the following steps led to five instances of the error. After these five, the error stopped occurring and can no longer be reproduced. I did not change anything on my end. It's interesting that both me and the above poster had that same result: after 5 times, it stops being reproducible.

    1. Use the Unity User Reporting prefab
    2. Submit a User Report on an Android device
    3. When it reaches 100%, it then fails

    This tracks with what others saw - that it's related to Unity Analytics too.
     
  12. MaevaT

    MaevaT

    Joined:
    Sep 1, 2020
    Posts:
    1
    Hi ! Same as artoonie, cannot reproduce reliably. We have Editor Analytics unchecked but have the error sometimes. The thing is, and the annoying part, it's also happening in builds. We are using Unity Analytics and Playfab for saving data and if we have this error, Playfab won't work. Playfab is set using Unity Web Request.

    I can't really provide you Charles Proxy captures because it's a company project.
    Don't hesitate to contact me directly to provide you stuffs.
     
  13. ScottPeal

    ScottPeal

    Joined:
    Jan 14, 2013
    Posts:
    61
    Just downloaded the latest 2021.3.15f1 on a brand new Windows 10 laptop with a brand new HDRP sample project and also getting this message in console.

    Curl error 56: Received HTTP code 407 from proxy after CONNECT
     
    Last edited: Dec 2, 2022
  14. Ali_Akgun

    Ali_Akgun

    Joined:
    May 9, 2016
    Posts:
    1
    Curl error 56: Receiving data failed with unitytls error code 1048578

    I solve but Api still crashing..
    I just change to min api level to Android kitkat 4.4.. it was Lollypop 5.0..
    Error message gone, i can install to phone but Api cant open on phone.. Now İ must fix crash problem.. And I dont have any error message