fix: catch canceled exceptions when Teleporting#8858
fix: catch canceled exceptions when Teleporting#8858alejandro-jimenez-dcl wants to merge 2 commits into
Conversation
|
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
This comment has been minimized.
This comment has been minimized.
|
Claude finished @alejandro-jimenez-dcl's task in 3m 18s —— View job Review Complete
Root-Cause CheckProblem: Fix: The PR correctly routes Blocking IssueMissing test update —
Before the fix, // current — fails for CancelledResult
Assert.That(outerReport!.GetStatus().TaskStatus,
result.Success ? Is.EqualTo(UniTaskStatus.Succeeded) : Is.EqualTo(UniTaskStatus.Faulted));Required fix (line 64–65): // Report must be modified by the loading screen
UniTaskStatus expectedStatus = result.Success
? UniTaskStatus.Succeeded
: result.Error?.State is TaskError.Cancelled
? UniTaskStatus.Canceled
: UniTaskStatus.Faulted;
Assert.That(outerReport!.GetStatus().TaskStatus, Is.EqualTo(expectedStatus));
REVIEW_RESULT: FAIL ❌ |
|
PR #8858, run #26288527889 Builds: Windows change, Windows baseline, macOS change, macOS baseline Framework 13 i7
|
DafGreco
left a comment
There was a problem hiding this comment.
✔️ PR reviewed and approved by QA on both platforms following instructions playing both happy and un-happy path
Regressions for this ticket had been performed in order to verify that the normal flow is working as expected:
- [✔️ ] Backpack and wearables in world
- [✔️ ] Emotes in world and in backpack
- [✔️ ] Teleport with map/coordinates/Jump In
- [ ✔️] Chat and multiplayer
- [✔️ ] Profile card
- [✔️ ] Settings
Checks made 🚀
Teleported through:
- Map ✔️
- Jump in button ✔️
- Commands on chat✔️
- Jump in from friends panel ✔️
- Teleport through jump in to genesis plaza button✔️
No new issues were found during this checkups
Pull Request Description
What does this PR change?
Fixes Sentry issue UNITY-EXPLORER-NHG:
System.Exception: Cancelled: OperationCanceledExceptionreported fromAsyncLoadProcessReport.WaitUntilFinishedAsync(70 events / 47 users since 2026-03-07).Root cause: when a scene load operation returned
EnumResult.CancelledResult(TaskError.Cancelled),LoadingScreen.ExecuteOperationAsynccalledloadReport.SetResult(result.AsResult()).SetResultwraps any failure intonew Exception(errorMessage), converting the cancellation into a plainExceptionwhose messageis
"Cancelled: OperationCanceledException".WaitUntilFinishedAsync's genericcatch (Exception)branch then reported it to Sentry viaReportHub.LogException.Fix: in
LoadingScreen.cs:46-56, route theCancelledstate directly toloadReport.SetCancelled(), which propagatesOperationCanceledExceptionthrough the completion source.WaitUntilFinishedAsynccatches OCE separately and does not report it to Sentry. All other paths still go throughSetResult.Test Steps
Check that teleporting work as expected.
Reproduction (optional, dev-only)
Enable the
Abort Scene Loadingdebug widget (DEBUG panel), set Type toCANCELand coords to a scene currently loading. Before the fix: Sentry exception fires. After the fix: silent cancellation, no exception.Quality Checklist