Search Unity

IAP CRASHES Unity with: UnityTls error code: 7 in

Discussion in 'Unity IAP' started by ebuddha, Dec 3, 2019.

Thread Status:
Not open for further replies.
  1. ebuddha

    ebuddha

    Joined:
    May 25, 2019
    Posts:
    4
    Hello, I am using unity 2019.2.14 and 2019.2.11 in Mac Mojave.

    I am using only android build.

    I suddenly started to have this problem with editor crashing (always even in empty projects) during calling this code:

    Void Start () {
    StandardPurchasingModule module = StandardPurchasingModule.Instance(); //<<< this is line 45
    ConfigurationBuilder builder = ConfigurationBuilder.Instance(module);
    builder.AddProduct("my_product_id", ProductType.Consumable);
    UnityPurchasing.Initialize(this, builder);
    }
    Here is the Editor.Log reports this after crash:

    Loaded scene 'Temp/__Backupscenes/0.backup'
    Deserialize: 21.317 ms
    Integration: 71.101 ms
    Integration of assets: 0.051 ms
    Thread Wait Time: 20.086 ms
    Total Operation Time: 112.554 ms
    UnityIAP Version: 1.23.1
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(Object)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance()
    MyStoreClass:Start() (at Assets/Scripts/MyStoreClass.cs:45)

    (Filename: Assets/Scripts/MyStoreClass.cs Line: 45)

    error:00000000:lib(0):func(0):reason(0)Curl error 35: Handshake did not perform verification. UnityTls error code: 7

    (Filename: ./Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 734)

    Function SoundChannelInstance *SoundChannel::eek:perator->() const may only be called from main thread!

    (Filename: ./Modules/Audio/Public/sound/SoundManager.cpp Line: 35)

    * Assertion at threads.c:1788, condition `internal' not met

    Obtained 36 stack frames.

    ....

    when I disable UnityPurchasing.Initialize(this, builder); it does not crash.

    I tired IAP init as UnityPurchasing.Initialize() also in empty projects and it always crashes Unity editor.

    Please help me to solve my problem.

    Thanks...
     
    c0nd3v likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You mentioned "suddenly", what changed? Make a backup first, then try deleting your Temp and Library folders. What happens when you build and deploy to Android? What platform did you target under Window/Unity IAP/Android ? Can you open the Sample IAP Project https://forum.unity.com/threads/sample-iap-project.529555/
     
  3. ebuddha

    ebuddha

    Joined:
    May 25, 2019
    Posts:
    4
    Hello, Few days ago I copied my project and modified it by adding firebase. In firebase settings I now realized that made a mistake that entered wrong SHA1 key and I linked to project my google play project. Now I disconnected them.
    With your instructions:

    under Window/Unity IAP/Android it targets google play

    1) I builded and deployed to an android device. It didn't crash in phone however initialize of IAP failed with android studio logcat >>

    12-04 04:39:58.651 3780-3801/? I/Unity: OnInitializeFailedToStart NoProductsAvailable
    UnityEngine.Logger:Log(LogType, Object)
    MyStoreClass:OnInitializeFailed(InitializationFailureReason)

    I have products in google play I checked multiple times - I checked the google play key in IAP services settings. Besides that I previously made successful in app test purchases from phone.

    2) After 1.5 hours it suddenly worked on the phone :

    12-04 04:53:59.409 5999-6018/? I/Unity: OnInitializedStartedNow
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Purchasing.PurchasingManager:CheckForInitialization()

    It still crashes in the unity editor...

    I have deleted Temp and Library folder it still crashed.

    I downloaded sample IAP project and it also crashes the editor when I press play for "myscene" .

    I am normally using a Mac desktop but also I downloaded one of my backup projects to my Mac laptop(Mojave) and its unity editor (2019.2.11)crashed too.

    I have tried on empty projects,

    I have tried on sample IAP project

    I have tried on various archive versions of my project(Before and After versions of Firebase)

    I used 2019.2.11 and 2019.2.14 unity editors

    Tried on 2 different Macs

    Empty or not every project is crashing in two different Mac computers.

    What can be causing this? > error:00000000:lib(0):func(0):reason(0)Curl error 35: Handshake did not perform verification. UnityTls error code: 7

    :(
     
    Last edited: Dec 4, 2019
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, I'm not familiar with that error.
     
  5. solid_

    solid_

    Joined:
    Jul 10, 2015
    Posts:
    12
    Same issue happening today.
    Unity Editor crash and close after pressing play button.
    When i disable UnityIAP initialisation - all fine.

    I was able to catch the error in frame mode whithout crash:

    Curl error 35: Handshake did not perform verification. UnityTls error code: 7

    0x000000014271290C (Unity) StackWalker::GetCurrentCallstack
    0x0000000142715DE1 (Unity) StackWalker::ShowCallstack
    0x0000000140FA4665 (Unity) GetStacktrace
    0x00000001432CA85B (Unity) DebugStringToFile
    0x0000000142E35E14 (Unity) TransportCurl::TransformCurlErrorToWebError
    0x0000000142E331F3 (Unity) CurlExecutor::CurlExecute
    0x000000014202D86E (Unity) JobQueue::Exec
    0x000000014203416B (Unity) JobQueue::Steal
    0x000000014202E043 (Unity) JobQueue::ExecuteJobFromQueue
    0x000000014202FBCD (Unity) JobQueue::processJobs
    0x0000000142035166 (Unity) JobQueue::WorkLoop
    0x000000014255B457 (Unity) Thread::RunThreadWrapper
    0x00000000772859CD (kernel32) BaseThreadInitThunk
    0x00000000774BA561 (ntdll) RtlUserThreadStart

    Sample IAP Project https://forum.unity.com/threads/sample-iap-project.529555/
    Crash with same error in Unity 2019.2.14f1, 2019.2.12f1
     
    Last edited: Dec 4, 2019
  6. wicea

    wicea

    Joined:
    Jan 23, 2016
    Posts:
    18
    Unity 2019.2.14f1
    OS: Windows and OS X

    Same problem. Yesterday my project with Unity IAP started crashing on loading IAP when running in Unity Editor.

    Also I discovered problems with UnityWebRequest - when using timeout or Abort project also has crashing.
    Tested on new project, cleaned Temp and Library.

    Code (CSharp):
    1.     public void TestTimeout()
    2.     {
    3.         string url = "https://httpstat.us/200?sleep=10000";
    4.         UnityWebRequest request = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
    5.         request.SetRequestHeader("Content-Type", "application/json");
    6.         request.downloadHandler = new DownloadHandlerBuffer();
    7.         request.timeout = 5;
    8.  
    9.         StartCoroutine(ProcessTestTimeout(request));
    10.     }
    11.  
    12.     private IEnumerator ProcessTestTimeout(UnityWebRequest request)
    13.     {
    14.         Debug.Log("~~~> ProcessTestTimeout");
    15.         yield return request.SendWebRequest();
    16.         Debug.Log("<~~~ ProcessTestTimeout");
    17.         Debug.Log("<~~~ response: " + request.downloadHandler.text);
    18.         Debug.Log("<~~~ isDone: " + request.isDone);
    19.         Debug.Log("<~~~ isHttpError: " + request.isHttpError);
    20.         Debug.Log("<~~~ isNetworkError: " + request.isNetworkError);
    21.     }
    Crash:
    Code (CSharp):
    1.     public void TestAbort()
    2.     {
    3.         string url = "https://httpstat.us/200?sleep=5000";
    4.         UnityWebRequest request = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
    5.         request.SetRequestHeader("Content-Type", "application/json");
    6.         request.downloadHandler = new DownloadHandlerBuffer();
    7.  
    8.         StartCoroutine(ProcessTestAbort(request));
    9.     }
    10.  
    11.     private IEnumerator ProcessTestAbort(UnityWebRequest request)
    12.     {
    13.         Debug.Log("~~~~> 1");
    14.         request.SendWebRequest();
    15.         Debug.Log("~~~~> 2");
    16.         yield return new WaitForSeconds(1);
    17.         Debug.Log("~~~~> 3");
    18.         request.Abort();
    19.         Debug.Log("~~~~> 4");
    20.     }
    Crash:
    Tested scripts on iOS and Android. Builds throws error to console, but not crashing.

     
    Last edited: Dec 4, 2019
  7. luismb23

    luismb23

    Joined:
    Apr 26, 2018
    Posts:
    3
    Same error today
     
  8. avindak

    avindak

    Joined:
    Mar 5, 2019
    Posts:
    11
    Hi,
    UnityPurchasing.Initialize(this, builder);
    Crashes my editor.
    Reinstalled and everythign .
    Removed caches, deleted all app data directories, cloned a new copy from git.
    Its working on other computers but not on my Windows 10 machine.

    ump.log:
    {"level":"info","message":"Starting Server","timestamp":"2019-12-04T10:28:54.008Z"}
    {"level":"info","message":"Server started on port [56784]","timestamp":"2019-12-04T10:28:54.012Z"}
    {"level":"info","message":"Health Request received","timestamp":"2019-12-04T10:28:54.263Z"}
    {"level":"error","message":"[Unity Package Manager (Upm)]\nParent process [11336] was terminated","timestamp":"2019-12-04T10:30:14.060Z"}


    Editor.log
    [IAPManager] Initializing IAP now...
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    BizzyBeeGames.Logger:Log(String, String) (at Assets\Scripts\...\Framework\Scripts\Utilities\Logger.cs:79)
    BizzyBeeGames.IAPManager:Init() (at Assets\Scripts\...\Framework\Scripts\IAP\IAPManager.cs:134)
    BizzyBeeGames.IAPManager:Start() (at Assets\Scripts\...\Framework\Scripts\IAP\IAPManager.cs:107)
    (Filename: Assets/Scripts/..../Framework/Scripts/Utilities/Logger.cs Line: 79)
    error:00000000:lib(0):func(0):reason(0)Curl error 35: Handshake did not perform verification. UnityTls error code: 7
    (Filename: C:\buildslave\unity\build\Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 734)
    * Assertion at ..\mono\metadata\threads.c:1788, condition `internal' not met
     
  9. wtfkeklol

    wtfkeklol

    Joined:
    Feb 9, 2016
    Posts:
    5
    Same error here, project worked fine so far (its already released), I upgraded to unity 2019 and this happened.
     
  10. Biondy

    Biondy

    Joined:
    Nov 4, 2019
    Posts:
    3
    Hi, I encounter Curl error 35 : Handshake did not perform verification. UnityTls error code : 7
    and I am wondering what that was.
    I don't have problem with IAP, but the problem lies on Ads.
    When Ads showing, I freeze the layer and stop the timer app for the game.
    But actually the buffer time for Ads showing is a problem for me. From user stand point, it looks like my game is crashed while it actually waiting for Ads to show.
     
  11. D_Kond

    D_Kond

    Joined:
    Mar 3, 2015
    Posts:
    25
    Hello, I have the same error. I had a problem with my unity project in the dashboard. I archived it and linked it with the new one. I think it became the reason of this error. Maybe I'm wrong and it's just a coincidence. This one occurs after the builder initialization (Unity IAP).

    "Error: Curl error 35: Handshake did not perform verification. UnityTls error code: 7"

    By the way, the error doesn't refer to any code.

    I want to add that, despite the error in the editor, everything else works fine. including and himself build.
     
    Last edited: Dec 4, 2019
  12. MDLEEXP

    MDLEEXP

    Joined:
    Sep 13, 2017
    Posts:
    1
    I also suddenly got this error = = These versions will have errors 2019.2.11f1 , 2019.2.12f1, 2019.2.13f1, 2019.2.14f1
     
  13. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Hello All,

    I started experiencing the same editor crash yesterday afternoon (UTC) for no apparent reason.

    Editor.log reports this (on Win10, Unity 2019.2.14f1)...

    UnityIAP Version: 1.23.1
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(Object)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance()
    UnityEngine.Behaviour:set_enabled(Boolean)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) (at C:\buildslave\unity\build\Runtime\Export\Scripting\MonoBehaviour.bindings.cs:91)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)
    error:00000000:lib(0):func(0):reason(0)Curl error 35: Handshake did not perform verification. UnityTls error code: 7
    (Filename: C:\buildslave\unity\build\Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 734)

    Not initialising Unity Purchasing works around the issue for now...

    //UnityPurchasing.Initialize(this, builder);
     
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I too see the error in the console when using recent builds of 2019, but it doesn't crash the Editor and IAP initialization still succeeds. Can users confirm that it actually causes the Editor to disappear (crash) to the desktop? I'm using 2019.2.14f1 . A red error in the console is not an Editor crash, but is something we will need to address.
     

    Attached Files:

    Don_K likes this.
  15. Developmental

    Developmental

    Joined:
    Jun 29, 2017
    Posts:
    3
    I had to use Fiddler to figure out where the handshake was failing.
    IAP initialization was throwing the error.

    Curl error 35: Handshake did not perform verification. UnityTls error code: 7

    The Editor did not crash for me.

    Fiddler shows:
    HTTPS handshake to ecommerce.iap.unity3d.com (for #19) failed. System.IO.IOException Authentication failed because the remote party has closed the transport stream.

    IAP tries to connect to ecommerce.iap.unity3d.com:443
    HTTPS on ecommerce.iap.unity3d.com fails.

    Bug report was submitted.

    A nice feature would be to have the Curl error messages show the failing destination IP/Domain especially if you also use libcurl in your project.
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So it's not a crash, but an error that, for now, can be safely ignored until we address it. Can you provide the Bug report ID?
     
  17. Developmental

    Developmental

    Joined:
    Jun 29, 2017
    Posts:
    3
    (Case 1202961) Unity IAP Curl error 35
     
  18. markviola-hitgrab

    markviola-hitgrab

    Joined:
    Jul 25, 2018
    Posts:
    1
    Using Unity 2019.2.13f and it crashes the editor when I play the game in the Editor. I was able to build the game and it runs fine on my Android device. Like some of the other people in this thread, commenting out:

    UnityPurchasing.Initialize

    will make the game playable.

    For the people who don't get the editor to crash, what type of desktop are you using? Windows of Mac? We have a Macbook that has the same version of the build and it gets the error message but no editor crash. But on the two other Windows machines that we have, the editor will crash.
     
  19. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, we're on it. We've identified the issue, and will be addressing it ASAP
     
    Last edited: Dec 4, 2019
  20. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Hi Jeff,

    For me (Win10, Unity 2019.2.14f1) the editor crashes to the desktop (silently)

    Hope that helps.

    Although I see you've identified the issue and are on it. Thank you!
     
    JeffDUnity3D likes this.
  21. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    This has been fixed, apologies on the inconvenience. We had a misconfigured server endpoint .
     
    avindak, PeachyPixels and Veenomous like this.
  22. DaveKap

    DaveKap

    Joined:
    Mar 6, 2013
    Posts:
    94
    Confirmed, I can now run my game in the editor with crashing.
     
  23. solid_

    solid_

    Joined:
    Jul 10, 2015
    Posts:
    12
    Yesterday Unity Editor crashed with message
    upload_2019-12-5_9-29-23.png

    Today all work fine
     
  24. eladleb4

    eladleb4

    Joined:
    Apr 25, 2016
    Posts:
    57
    Thanks for the quick response @JeffDUnity3D , my empty project which crashed yesterday now runs correctly.
     
  25. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Just confirming it's fixed the editor crashing to the desktop issue for me. Thanks Jeff.
     
  26. Homeship

    Homeship

    Joined:
    Mar 4, 2016
    Posts:
    9
    Same problem today.

    Week ago I baked an occlusion for one game level - OK.
    Yesterday I started to bake an occlusion for second game level. It was working 26 hours, and crashes before the end of baking. Excellent...

    Version is '2018.4.10f1 (a0470569e97b) revision 10503941'; Using compiler version '191326128'
    OS: 'Windows 7 (6.1.0) 64bit'

    Code (CSharp):
    1. Unity Editor by Unity Technologies [version: Unity 2018.4.10f1_a0470569e97b]
    2.  
    3. Unity.exe caused an Access Violation (0xc0000005)
    4.   in module Unity.exe at 0033:405c4810.
    5.  
    6. Error occurred at 2019-12-11_132350.
    7.  
    8. 93% physical memory in use.
    9. 16329 MB physical memory [999 MB free].
    10. 8381 MB process peak paging file [8344 MB used].
    11. 7486 MB process peak working set [7422 MB used].
    12. System Commit Total/Limit/Peak: 19427MB/33128MB/30782MB
    13. System Physical Total/Available: 16329MB/999MB
    14. System Process Count: 163
    15. System Thread Count: 2567
    16. System Handle Count: 64792
    17.  
    18. Read from location 0000000000000068 caused an access violation.
    19.  
    20. Context:
    21. RDI:    0x0000000000000000  RSI: 0x0000000030332c98  RAX:   0x0000000000000000
    22. RBX:    0x0000000000000117  RCX: 0x0000000000000000  RDX:   0x000000014451a5c0
    23. RIP:    0x00000001405c4810  RBP: 0x000000000022e300  SegCs: 0x0000000100000033
    24. EFlags: 0x0000000000010202  RSP: 0x000000000022e1c8  SegSs: 0x000000010000002b
    25. R8:     0x000000014466d540  R9:  0x0000000142d7e100  R10:   0x00000000ffce648c
    26. R11:    0x000000000022e1e0  R12: 0x0000000000000460  R13:   0x0000000000000118
    27. R14:    0x0000000005601320  R15: 0x0000000000000118
    UPD: Send a bug report (Case 1204616)
     
    Last edited: Dec 11, 2019
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Separate issue, please open a new thread
     
Thread Status:
Not open for further replies.