Repository navigation
feat: Improve error message on connection failure [2.X] - #4208
Merged
simon-lemay-unity merged 1 commit intoOct 23, 2026
Merged
Conversation
| { | ||
| reasons.Add($"Server/host might not be reachable. Try \"ping {ConnectionData.Address}\" in a terminal."); | ||
| reasons.Add("The firewall on the server/host might be blocking the connection attempts."); | ||
| if (m_UseEncryption && !m_UseWebSockets) |
Contributor
There was a problem hiding this comment.
In browser builds with UseWebSockets false and UseEncryption true, failed direct connections incorrectly report DTLS as a possible cause. CreateDriver forces WebSocketNetworkInterface under UNITY_WEBGL && !UNITY_EDITOR, even when UseWebSockets is false. The connection therefore uses TLS over WebSockets, and recommending WebSockets sends users toward a protocol already in use. The Relay diagnostic has the same flag mismatch. Base these conditions on the effective protocol, including the WebGL fallback.
🤖 Helpful? 👍/👎
6 tasks
EmandM
approved these changes
Oct 23, 2026
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop-2.0.0 #4208 +/- ##
=================================================
- Coverage 74.20% 74.18% -0.03%
=================================================
Files 172 172
Lines 28200 28227 +27
=================================================
+ Hits 20926 20940 +14
- Misses 7274 7287 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
EmandM
pushed a commit
that referenced
this pull request
Oct 27, 2026
feat: Improve error message on connection failure
EmandM
added a commit
that referenced
this pull request
Oct 30, 2026
* fix: Yamato jobs not testing built player (Backport of: #4194) * fix: Yamato jobs not testing built player * Next round of fixes * Set addressables to build on players * dotnet-fix * Fix console tests * Try again to remove graphics from desktop players * Fix DA NetworkObjectDeserializationFailure test * Remove the temporarily added N4E settings * Fix the test failures * Remove fix that was more a symptom than a cause (keep it simple) * Match the deregistration to the registration logic * Don't finish cleaning up if any scene is still loading * Fix the U-PR config * Fix IL2CPP player tests * Remove CoreCLR stuff * feat: Improve error message on connection failure [2.X] (#4208) feat: Improve error message on connection failure * Disabled automatic release preparation Disabled recurring trigger as in our current situation it would be more messy to handle automated release step. I will leave it manual for now * chore: Ensure the rerun strategy is baked into the built players (#4218) * fix: generate canonical bools in NetworkVariable serialization tests (#4198) * test: generate canonical bools in NetworkVariable serialization tests RandGenBytes<bool> filled each bool with a random byte, so most values were neither 0 nor 1. On mac arm64 IL2CPP the List<bool> and NativeHashMap<K, bool> cases then failed with both sides printing identical all-True contents. RandGenBool returns only false or true. * test: use RandGenBool for the NativeArray<bool> case * test: make changed2 always differ from original2 in collection generators With RandGenBool an overwrite keeps the existing value half the time, so when no elements were added or removed, changed2 could equal original2 and the "do not match" assertions failed. Each overwrite now redraws until it differs from the original element. --------- Co-authored-by: Emma <emma.mcmillan@unity3d.com> (cherry picked from commit b5c186c) --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Simon Lemay <simon.lemay@unity3d.com> Co-authored-by: Michał Chrobot <michal.chrobot@unity3d.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Backport of PR #4207.
Jira ticket
UUM-155178
Changelog
Didn't think it was worth updating.
Documentation
Testing & QA
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?Up-port
#4207
Backports
N/A