Search Issue Tracker

In Progress

Under Consideration for 2021.3.X, 2022.3.X, 6000.0.X

Fix In Review for 6000.1.X

Votes

19

Found in

6000.0.23f1

Issue ID

UUM-83744

Regression

No

"TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR" error when a lot of web requests are sent within a few minutes

--

-

Reproduction steps:
1. Open the attached “repro_IN-86007“ project
2. Open the “Assets/Scenes/YGO Deck Builder.unity“ Scene
3. In the Hierarchy, select the “GameObject“ GameObject
4. In the Inspector, the “Web Request Test (Script)” Component, press the “Send“ button
5. Observe the Console

Expected result: All of the requests return “OK | [requestNumber]“ and no errors ever appear
Actual result: After around 1500-1700 requests, the request gets stuck and the “TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR“ error appears

Reproducible with: 6000.0.23f1
Couldn’t test with: 2021.3.44f1, 2022.3.50f1 - Unresolvable compilation errors

Reproducible on: Windows 10 (22H2)
Not reproducible on: No other environments tested

Note: Restarting the Editor resets the request quota

  1. Resolution Note (fix version 6000.1):

    Fixed the regression in our MbedTLS builds that caused the entropy pool to dry up or get corrupted after many TLS connections.

Comments (7)

  1. luantruong1999

    Oct 15, 2024 19:50

    I encountered a similar issue on 2022.3.45f1 and 2022.3.50f1

  2. Cloudburst-Leah

    Oct 14, 2024 23:00

    Quickly built a test project using info from this report (+ similar reports) and can confirm this bug is reproducible and is similar if not exact the same issue reported in UUM-83468. As the issue is related to TLS, it doesn't matter whether HTTPClient or UnityWebRequest is used, as long as TLS is used (https or wss if you're using websockets)

    I'm aware that UUM-83468 was closed as By Design, however I believe this was a misunderstanding on the part of Unity's staff on how the error manifests, so hopefully this report is more clear.

  3. MomSesImSpcl

    Oct 11, 2024 18:47

    Just to clarify, this example uses the HttpClient not the UnityWebRequest.

  4. joeysipos

    Oct 11, 2024 16:39

    Note that all Unity Web Requests fail after this error is shown. No internet connection can be made after this happens. It's cause from something breaking in the Web Requests class after a certain amount of Web Requests are made. A restart of the editor or game is required to regain internet connection.

  5. joeysipos

    Oct 11, 2024 15:16

    Please don't close this bug "As By Design" again... This is a major issue that is impacting our product. Which uses Cesium for Unity. Cesium will make 20 to 100 web request calls at a time to download terrain data from the cloud. At which point will brake about 5 to 15 min into a game session, causing our users to have to restart the game everytime. Which is a major showstopper. I can also confirm this issue happens in 2022.3.49f1. It's the same issue as stated in the bug that was somehow resolved "As by Design"? https://issuetracker.unity3d.com/issues/unable-to-complete-ssl-connection-exceptions-are-thrown-and-connection-fails-when-a-large-amount-of-webrequests-are-made

  6. MomSesImSpcl

    Oct 09, 2024 23:22

    Did some more testing and the error always occurs around 1650 (+- a few).
    And the time between requests doesn't matter, i have around 1650 request for one unity session, until i restart the editor.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.