IAP CRASHES Unity with: UnityTls error code: 7 in

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::operator->() 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…

1 Like

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 Sample IAP Project

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.

  1. 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

:frowning:

Sorry, I’m not familiar with that error.

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 Sample IAP Project
Crash with same error in Unity 2019.2.14f1, 2019.2.12f1

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.

    public void TestTimeout()
    {
        string url = "https://httpstat.us/200?sleep=10000";
        UnityWebRequest request = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
        request.SetRequestHeader("Content-Type", "application/json");
        request.downloadHandler = new DownloadHandlerBuffer();
        request.timeout = 5;

        StartCoroutine(ProcessTestTimeout(request));
    }

    private IEnumerator ProcessTestTimeout(UnityWebRequest request)
    {
        Debug.Log("~~~> ProcessTestTimeout");
        yield return request.SendWebRequest();
        Debug.Log("<~~~ ProcessTestTimeout");
        Debug.Log("<~~~ response: " + request.downloadHandler.text);
        Debug.Log("<~~~ isDone: " + request.isDone);
        Debug.Log("<~~~ isHttpError: " + request.isHttpError);
        Debug.Log("<~~~ isNetworkError: " + request.isNetworkError);
    }

Crash:

    public void TestAbort()
    {
        string url = "https://httpstat.us/200?sleep=5000";
        UnityWebRequest request = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
        request.SetRequestHeader("Content-Type", "application/json");
        request.downloadHandler = new DownloadHandlerBuffer();

        StartCoroutine(ProcessTestAbort(request));
    }
  
    private IEnumerator ProcessTestAbort(UnityWebRequest request)
    {
        Debug.Log("~~~~> 1");
        request.SendWebRequest();
        Debug.Log("~~~~> 2");
        yield return new WaitForSeconds(1);
        Debug.Log("~~~~> 3");
        request.Abort();
        Debug.Log("~~~~> 4");
    }

Crash:

Tested scripts on iOS and Android. Builds throws error to console, but not crashing.

Same error today

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

Same error here, project worked fine so far (its already released), I upgraded to unity 2019 and this happened.

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.

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.

I also suddenly got this error = = These versions will have errors 2019.2.11f1 , 2019.2.12f1, 2019.2.13f1, 2019.2.14f1

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);

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.

1 Like

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.

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?

(Case 1202961) Unity IAP Curl error 35

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.

Got it, we’re on it. We’ve identified the issue, and will be addressing it ASAP

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!

1 Like