Skip to content

fix: deep link to world redirects to Genesis after account change - #8848

Merged
Maurizio-dcl merged 6 commits into
devfrom
fix/8802-deep-link-into-a-world-takes-to-genesis-city-instead
Jun 4, 2026
Merged

fix: deep link to world redirects to Genesis after account change#8848
Maurizio-dcl merged 6 commits into
devfrom
fix/8802-deep-link-into-a-world-takes-to-genesis-city-instead

Conversation

@Maurizio-dcl

@Maurizio-dcl Maurizio-dcl commented May 21, 2026

Copy link
Copy Markdown
Contributor

Pull Request Description

Fix #8802

What does this PR change?

This PR moves the world access check from bootstrap to post-auth in the loading flow, this fixes a bug where changing accounts would lead to an inconsistent state regarding world permission since they were checked only against the initial identity.

Moved world access check from bootstrap to post-auth in the loading flow, so it runs against the identity the user actually picked (rather than the cached one).
Removed the now-dead IsUserAuthorisedToAccessWorldAsync from IRealmController.

Test Instructions

Prerequisites

  • Launch this PR's build with --realm italy2026.dcl.eth --position 20,20 --debug args.
  • Two accounts available: one with access to italy2026.dcl.eth, one without (can be tested with any world to which at least one of your accounts have access).

Test Steps

  1. Primary repro (cached account has NO access, switch to one that does):

    • Make sure the cached account does NOT have access to the target restricted world
    • Open the client via deep link to the restricted world
    • On the auth screen, click "Change Account" and log in with the account that DOES have access
    • Click "Enter Decentraland"
    • Expected: lands in the world (no Genesis fallback)
  2. Reverse case (cached account HAS access, switch to one that doesn't):

    • Cached account has access to the restricted world
    • Open the client via deep link to that world
    • On the auth screen, change to an account without access
    • Click "Enter Decentraland"
    • Expected: loading screen shows, then the user is sent to Genesis with a chat message "Could not enter '' due to world permissions. You were sent to Genesis Plaza."
  3. Direct entry regression:

    • Cached account has access → deep link to that world → enter without switching accounts
    • Expected: lands in the world at the deep-linked coordinates
  4. Public world:

    • Deep link to a public/unrestricted world → enter with any account
    • Expected: lands in the world
  5. Normal launch (no deep link):

    • Expected: goes to home/Genesis as usual

Quality Checklist

  • Changes have been tested locally
  • Documentation has been updated (if required)
  • Performance impact has been considered
  • For SDK features: Test scene is included

- Moved world access check from bootstrap to post-auth in the loading flow, so it runs against the identity the user actually picked (rather than
  the cached one). Remove the now-dead IsUserAuthorisedToAccessWorldAsync
  from IRealmController.
@Maurizio-dcl Maurizio-dcl self-assigned this May 21, 2026
@Maurizio-dcl Maurizio-dcl added the force-build Used to trigger a build on draft PR label May 21, 2026
@m3taphysics

Copy link
Copy Markdown
Contributor

PR #8848, run #26229701217

Builds: Windows change, Windows baseline, macOS change, macOS baseline

Framework 13 i7

Metric Change Baseline Delta Improvement
Samples 2700 2700
CPU average 33.3 ms 33.3 ms 0.0 ms -0.0%
CPU 1% worst 33.6 ms 33.5 ms 0.1 ms -0.3%
CPU 0.1% worst 35.6 ms 34.5 ms 1.1 ms -3.3% 🔴
GPU average 7.9 ms 8.1 ms -0.1 ms 1.7%
GPU 1% worst 19.2 ms 19.6 ms -0.4 ms 2.1%
GPU 0.1% worst 25.2 ms 26.3 ms -1.0 ms 4.0% 🟢

@Maurizio-dcl Maurizio-dcl added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Jun 1, 2026
@m3taphysics

Copy link
Copy Markdown
Contributor

PR #8848, run #26742207444

Builds: Windows change, Windows baseline, macOS change, macOS baseline

Framework 13 i7

Metric Change Baseline Delta Improvement
Samples 2700 2699
CPU average 33.3 ms 33.3 ms -0.0 ms 0.0%
CPU 1% worst 33.5 ms 34.9 ms -1.4 ms 4.0% 🟢
CPU 0.1% worst 34.9 ms 49.2 ms -14.3 ms 29.0% 🟢
GPU average 8.0 ms 7.2 ms 0.8 ms -10.8% 🔴
GPU 1% worst 17.2 ms 19.2 ms -2.0 ms 10.2% 🟢
GPU 0.1% worst 19.8 ms 24.1 ms -4.4 ms 18.1% 🟢

@Maurizio-dcl
Maurizio-dcl marked this pull request as ready for review June 2, 2026 08:11
@Maurizio-dcl
Maurizio-dcl requested review from a team as code owners June 2, 2026 08:11
@github-actions
github-actions Bot requested a review from anicalbano June 2, 2026 08:11

@sandrade-dcl sandrade-dcl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I only left a comment about a doubt that I would like you to take a look, please. Thanks!

@m3taphysics

Copy link
Copy Markdown
Contributor

PR #8848, run #26808743981

Builds: Windows change, Windows baseline, macOS change, macOS baseline

Framework 13 i7

Values are the median across 3 run(s); the (min–max) range shows how much the runs varied. A metric is only flagged when the change is larger than both the 3% threshold and that run-to-run variation.

Metric Change Baseline Delta Improvement
Samples 2700 (×3) 2700 (×3)
CPU average 33.3 ms 33.3 ms 0.0 ms -0.0%
CPU 1% worst 34.1 ms (33.5–34.1) 33.8 ms (33.4–33.8) 0.3 ms -0.9%
CPU 0.1% worst 39.2 ms (33.6–40.2) 36.5 ms (33.6–39.1) 2.8 ms -7.6%
GPU average 7.7 ms (7.5–7.8) 9.5 ms (8.4–10.0) -1.7 ms 18.1% 🟢
GPU 1% worst 18.8 ms (17.9–19.8) 18.8 ms (18.5–19.4) 0.0 ms -0.0%
GPU 0.1% worst 23.1 ms (22.7–23.9) 25.9 ms (25.9–26.0) -2.8 ms 10.9% 🟢
Exceptions logged 22 18 +4 🔴

@claude

This comment has been minimized.

Comment thread Explorer/Assets/DCL/Infrastructure/Global/Dynamic/RealmController.cs Outdated
@m3taphysics

Copy link
Copy Markdown
Contributor

PR #8848, run #26812819865

Builds: Windows change, Windows baseline, macOS change, macOS baseline

Framework 13 i7

Values are the median across 3 run(s); the (min–max) range shows how much the runs varied. A metric is only flagged when the change is larger than both the 3% threshold and that run-to-run variation.

Metric Change Baseline Delta Improvement
Samples 2700 (×3) 2700 (×3)
CPU average 33.3 ms 33.3 ms 0.0 ms -0.0%
CPU 1% worst 33.8 ms (33.8–33.9) 33.9 ms (33.5–34.1) -0.1 ms 0.3%
CPU 0.1% worst 36.6 ms (36.5–37.5) 36.3 ms (35.1–39.6) 0.3 ms -0.7%
GPU average 7.7 ms (7.2–8.3) 8.3 ms (7.3–8.3) -0.6 ms 7.3%
GPU 1% worst 19.5 ms (16.8–21.0) 19.9 ms (17.5–20.6) -0.5 ms 2.3%
GPU 0.1% worst 25.0 ms (20.8–25.6) 25.0 ms (24.0–25.5) -0.0 ms 0.2%
Exceptions logged 18 14 +4 🔴

@claude

This comment has been minimized.

Comment thread Explorer/Assets/DCL/Infrastructure/Global/Dynamic/RealmController.cs Outdated
@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Re-reviewing after latest commits

  • Read changed files
  • Check if previous blocking issues were resolved
  • Review latest changes
  • Post final review

View job run

@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Maurizio-dcl's task in 1m 45s —— View job


Re-reviewing after latest commits

  • Read changed files
  • Check if previous blocking issues were resolved
  • Review latest changes
  • Post final review

Root-Cause Assessment

PASS — The root cause (world access checked at bootstrap against the cached/pre-auth identity) is correctly fixed by deferring the check to VerifyWorldAccessAndFallbackIfNeededAsync inside ShowWhileExecuteTaskAsync, after the user has confirmed their identity. This is not a workaround.


Both Previous Blocking Issues: RESOLVED ✅

Issue 1: IRealmController.Fake.IsUserAuthorisedToAccessWorldAsync
Removed in commit 582f123b. The Fake nested class no longer contains this stub. ✅

Issue 2: RealmController.TryExtractWorldName
Removed in commit 2cd36d7f. The private static method and all its dead dependencies (IWeb3IdentityCache, IWorldPermissionsService fields) are gone from RealmController. ✅

OperationCanceledException handling is correct — catch (OperationCanceledException) { return; } silently absorbs cancellation (commit 5539107e/19f845a2). ✅


No New Blocking Issues

The final shape of VerifyWorldAccessAndFallbackIfNeededAsync (RealUserInAppInitializationFlow.cs:239) is clean:

  • Guard clauses skip the check for local scene development, non-world realms, and null domain.
  • OperationCanceledException is filtered, not rethrown.
  • Network failure during the check triggers Genesis fallback (defensive policy, intentional).
  • PasswordRequired also falls back to Genesis — correct for the startup/deep-link path (the interactive password prompt is handled elsewhere via PrivateWorldsPlugin).

Non-Blocking Warnings

+4 exceptions logged — The performance bot reports +4 exceptions vs. baseline in the two most recent runs (normal Genesis playthrough, no deep link). These may be unrelated to the auth-flow path changed here. Worth confirming before merge.

Empty world name in fallback message — When TryExtractWorldName returns false, worldName is string.Empty and the chat message reads: "Could not enter '' due to world permissions. You were sent to Genesis Plaza." Consider falling back to the raw domain string for a better user message. Non-blocking.


REVIEW_RESULT: PASS ✅
COMPLEXITY: COMPLEX
COMPLEXITY_REASON: Modifies auth flow, world permissions service integration, async UniTask patterns, plugin/container wiring, and the initialization flow sequence.
QA_REQUIRED: YES

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Claude reviewed this PR and found no blocking issues, but assessed it as complex — human DEV review is still required before merging.

@DafGreco DafGreco left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ 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:

  • [✔️ ] Log In/Log Out
  • [✔️ ] Backpack and wearables in world
  • [ ✔️] Emotes in world and in backpack
  • [ ✔️] Teleport with map/coordinates/Jump In
  • [ ✔️] Chat and multiplayer
  • [ ✔️] Settings

⚠️ Important comment ⚠️
We found that after loggin in with an account with permission and then logging out and loggin in with an account without permissions does not trigger any message on the chat regarding to not having permissions to enter the world
This has been a topic that is found on prd and this PR so in any case needed we can create a ticket later

Evidence:

20260603-1249-28.7951655.mp4
Image

@m3taphysics

Copy link
Copy Markdown
Contributor

PR #8848, run #26894354241

Builds: Windows change, Windows baseline, macOS change, macOS baseline

How to read this table
  • Each build is measured 3 times. The values are the median, and (min–max) is the lowest and highest of those runs — a wide range means the metric is noisy and small differences are not trustworthy.
  • Δ is Change minus Baseline (a negative Δ means Change is faster).
  • 🟢 faster / 🔴 slower — a real difference: larger than both 3% and the run-to-run range.
  • ⚪ within noise — the difference is smaller than how much the build varies between its own runs, so it cannot be told apart from random variation. Treat it as no change.
  • Exceptions logged — exceptions found in the run logs; more than the baseline is flagged 🔴 even when frame times look fine.

Framework 13 i7

Metric Baseline Change Δ Result
Samples 2701 (×3) 2700 (×3)
CPU average 33.3 ms 33.3 ms -0.0 ms ⚪ within noise
CPU 1% worst 34.4 ms (33.9–34.7) 33.7 ms (33.5–33.8) -0.7 ms ⚪ within noise
CPU 0.1% worst 43.3 ms (37.5–45.2) 35.7 ms (34.7–36.0) -7.5 ms ⚪ within noise
GPU average 7.3 ms (7.3–7.4) 8.2 ms (8.2–8.6) 0.9 ms 🔴 12% slower
GPU 1% worst 19.6 ms (18.1–20.2) 18.0 ms (17.1–18.1) -1.6 ms ⚪ within noise
GPU 0.1% worst 22.9 ms (22.8–28.9) 23.9 ms (21.4–25.2) 0.9 ms ⚪ within noise
Exceptions logged 46 18 -28 🟢 fewer errors

@Maurizio-dcl
Maurizio-dcl merged commit 2a359a6 into dev Jun 4, 2026
17 of 19 checks passed
@Maurizio-dcl
Maurizio-dcl deleted the fix/8802-deep-link-into-a-world-takes-to-genesis-city-instead branch June 4, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

force-build Used to trigger a build on draft PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deep link into a world takes to Genesis City instead

4 participants