Skip to content

feat: force single running instance#6923

Merged
lorux0 merged 23 commits intodevfrom
feat/one-running-instance
Mar 6, 2026
Merged

feat: force single running instance#6923
lorux0 merged 23 commits intodevfrom
feat/one-running-instance

Conversation

@lorux0
Copy link
Copy Markdown
Collaborator

@lorux0 lorux0 commented Jan 30, 2026

What does this PR change?

Fixes #6266

Implements a instance.lock file that allows to check if there are multiple instances running in the machine. You are only allowed to run multiple instances if the arg is passed --multi-instance.

Test Instructions

Open the client multiple times. A new popup should be shown allowing you to exit the application only.
Open the client with --multi-instance param. Check that you can run it multiple times.

NOTE: on mac you might have to run it with open -n Decentraland.app --args --multi-instance to run it multiple times.

Additionally from the creator hub or running a local scene, you should be able to run multiple instances if you want (for multiplayer purposes).

How to test from the Creator Hub:

  1. Replace the explorer latest build installed by the launcher (mac example: ~/Library/Application Support/DecentralandLauncherLight/v0.xxx.0-alpha/Decentraland.app) by the build generated from this PR
  2. Install this Creator Hub: feat: multi instance support creator-hub#1187
  3. Once you try to run DCL from the CH, it will open the launcher and it should run the build you replaced
  4. Check that you can open multiple explorer instances from the CH

How to test running a local scene :

  1. Run the build manually without any especial args
  2. Ensure that the launcher runs with this build (like you did for CH)
  3. Run any local scene with latest sdk version
  4. Run npm run start --multi-instance
  5. Both explorer instances should run normally

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

Code Review Reference

Please review our Code Review Standards before submitting.

@lorux0 lorux0 added the force-build Used to trigger a build on draft PR label Jan 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 30, 2026

@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Jan 30, 2026
@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Feb 2, 2026
This reverts commit d6e3c5e.
@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Feb 2, 2026
@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Feb 2, 2026
@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Feb 2, 2026
@lorux0 lorux0 added force-build Used to trigger a build on draft PR and removed force-build Used to trigger a build on draft PR labels Feb 2, 2026
@lorux0 lorux0 marked this pull request as ready for review February 2, 2026 17:17
@lorux0 lorux0 requested review from a team as code owners February 2, 2026 17:17
# Conflicts:
#	Explorer/Assets/DCL/Infrastructure/Global/AppArgs/AppArgsFlags.cs
@lorux0 lorux0 added the clean-build Used to trigger clean build on PR label Feb 3, 2026
@lorux0 lorux0 added clean-build Used to trigger clean build on PR and removed force-build Used to trigger a build on draft PR clean-build Used to trigger clean build on PR labels Feb 3, 2026
@lorux0 lorux0 removed the clean-build Used to trigger clean build on PR label Feb 3, 2026
Copy link
Copy Markdown
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

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

✅ QA Verified on Windows and macOS.

  • Opening the client multiple times without parameters correctly triggers the single-instance restriction.
  • On macOS, clicking the app again redirects to the already running instance (expected behavior).
    • When launching a second instance via terminal without --multi-instance, the exit modal is shown as expected.
  • Launching with --multi-instance allows running multiple instances correctly on both platforms.
  • ⚠️ Couldn't check Creator Hub because it's an issue pending on the creator-hub team.

Behavior matches the expected flow described in the PR. Good to merge 🚀

🧵 working thread for context.

Windows Evidence:

6923-evi.mp4
capture_260204_094146

MacOs Evidence

mac.mp4

@lorux0
Copy link
Copy Markdown
Collaborator Author

lorux0 commented Feb 4, 2026

This PR must be merged after this task is done: decentraland/creator-hub#1092

@Ludmilafantaniella Ludmilafantaniella self-requested a review February 4, 2026 13:50
# Conflicts:
#	Explorer/Assets/DCL/Infrastructure/Global/AppArgs/AppArgsFlags.cs
#	Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs
#	Explorer/Assets/Scenes/Main.unity
Copy link
Copy Markdown
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

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

Verified on Windows and Mac
QA validation performed:

  • Opened the client multiple times → second instance is blocked with popup
  • Verified only exit option is available (no parallel launch)
  • Launched with --multi-instance → multiple instances run correctly
  • Confirmed Mac flow using open -n Decentraland.app --args --multi-instance

Fixes:

  • #6266 – Multiple client instances now restricted for regular users
  • #5202 – Preview instances now allow independent logins and proper multiplayer visibility

Creator Hub PR #1187 – Multi-instance Support

QA validation performed:

  • Multi-instance toggle only visible for scenes with @dcl/sdk >= 7.20.4
  • Toggle hidden for older SDK versions
  • --multi-instance flag correctly passed/omitted
  • No CLI errors when switching between supported/unsupported scenes
  • Confirmed toggle is only present in Preview Options (not App Settings)

No regressions detected across normal client or preview flows.

Status: Approved for merge 🚀

EXPLORER EVIDENCE:

MultipleInstances-Explorer.mp4
mac-multi-instance.mp4

CREATOR HUB EVIDENCE":

Ch-multiinstances.mp4
CH.mp4
Image Image

LOCAL SCENES:

localScene.mp4

✅Smoke Test:

  • ✔️ Log In/Log Out
  • ✔️ Backpack and wearables in world
  • ✔️ Emotes in world and in backpack
  • ✔️ Teleport with map/coordinates/Jump In
  • ✔️ Chat and multiplayer
  • ✔️ Profile card
  • ✔️ Camera
  • ✔️ Skybox
  • ✔️ Settings

@AnsisMalins
Copy link
Copy Markdown
Contributor

# Conflicts:
#	Explorer/Assets/DCL/Infrastructure/Global/AppArgs/AppArgsFlags.cs
@lorux0 lorux0 enabled auto-merge (squash) March 5, 2026 17:14
@AnsisMalins
Copy link
Copy Markdown
Contributor

@lorux0 lorux0 merged commit 596c84c into dev Mar 6, 2026
9 of 10 checks passed
@lorux0 lorux0 deleted the feat/one-running-instance branch March 6, 2026 18:44
@AnsisMalins
Copy link
Copy Markdown
Contributor

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.

[QA] Explorer | Restrict Multiple Client Instances

4 participants