Search Issue Tracker

Won't Fix

Won't Fix in 1.0.X

Votes

0

Found in [Package]

1.0.0-pre.6

Issue ID

NCCBUG-164

Regression

No

"HttpException`1: HTTP/1.1 400 Bad Request" is thrown when calling JoinAllocationAsync()

Package: Multiplayer Netcode for GameObjects

-

Reproduction steps:
1. Open the attached project "Case_1408196" and load Scene "SampleScene"
2. Enter Play Mode
3. In the Game View click "START CLIENT"
4. Observe the Console

Expected result: No HTTP exceptions are thrown
Actual result: "HttpException`1: HTTP/1.1 400 Bad Request" is thrown in the Console

Reproducible with: 1.0.0-pre.2 (2020.3.32f1) 1.0.0-pre.6 (2020.3.32f1, 2021.2.18f1, 2022.1.0b14, 2022.2.0a9)

  1. Resolution Note:

    There are no fixes planned for this Bug

  2. Resolution Note (1.0.X):

    The issue is likely due to the field you are accessing via Text Mesh Pro.

    I was able to get your project working by changing the text object referenced in the UIManager to TMP_InputField and also by hardcoding the join string. I also updated the Relay, NGO, and Transport packages to the latest released, but I don't believe this should impact your results.

    Let me know if this works for you.

Comments (1)

  1. alperen10

    Aug 03, 2024 17:41

    The problem is caused by adding spaces to the join code. Try to solve it as follows:

    JoinAllocation relayAllaction = await RelayService.Instance.JoinAllocationAsync(_inputField.text.Substring(0, 6));

    instead of
    JoinAllocation relayAllaction = await RelayService.Instance.JoinAllocationAsync(_inputField.text);

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.