Skip to content

ci: Update of CI dependencies and test fixes#3970

Open
michalChrobot wants to merge 2 commits intodevelop-2.0.0from
test-and-ci-check
Open

ci: Update of CI dependencies and test fixes#3970
michalChrobot wants to merge 2 commits intodevelop-2.0.0from
test-and-ci-check

Conversation

@michalChrobot
Copy link
Copy Markdown
Member

@michalChrobot michalChrobot commented May 5, 2026

Purpose of this PR

This PR was created mainly because I noticed failing Android and WebGL jobs. While I was at it I also updated few CI deps (wrench + ubuntu image)

As for Android issue (happens on all editors)

It seems that it was caused by @EmandM #3944 with case being

Before PR #3944, the test correctly handled the platform difference:

// Old test (before #3944) — correct:
#if UNITY_EDITOR
    LogAssert.Expect(LogType.Error, messageToCheck);       // editor logs an error
#else
    LogAssert.Expect(LogType.Exception, $"Exception: {messageToCheck}");  // Android throws
#endif

After PR #3944, the #else branch was removed:

// New test (after #3944) — broken on Android:
LogAssert.Expect(LogType.Error, new Regex("NetworkManager cannot be nested"));

But NetworkManagerCheckForParent in NetworkManager.cs was not updated — it still throws an exception on non-editor platforms:

NetworkManager.cs
Lines 1008-1020

internal bool NetworkManagerCheckForParent(bool ignoreNetworkManagerCache = false)
{
#if UNITY_EDITOR
    var isParented = NetworkManagerHelper.NotifyUserOfNestedNetworkManager(this, ignoreNetworkManagerCache);
#else
    var isParented = transform.root != transform;
    if (isParented)
    {
        throw new Exception(GenerateNestedNetworkManagerMessage(transform));
    }
#endif
    return isParented;
}

On Android the #else branch runs: it throws an Exception, which Unity logs as LogType.Exception. The test now expects LogType.Error, so Unity's test runner sees an unhandled log message and fails.

To fix this I updated NetworkManagerCheckForParent to use the new Log system instead of throwing but @EmandM correct me on this

As for WebGL issue (happens only for trunk)

This seems unrelated to NGO, is partially duplicated by https://jira.unity3d.com/browse/UUM-141469 and seems to be caused by https://github.cds.internal.unity3d.com/unity/unity/pull/101284 (https://github.cds.internal.unity3d.com/unity/unity/pull/101284/commits/ca79fcd7d91fac415f57fb26b194b021a33f0c31). I will follow up on this

Jira ticket

N/A

Documentation

N/A

Testing & QA (How your changes can be verified during release Playtest)

Green CI run of all jobs

Backports

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant