Prerequisites
Please check the following before continuing:
Environment
- OS: Windows
- TIDAL Version: 2.43.2.21-release (W: 2026.09.01) (NP: 3.1.5.322)
- Luna Client Version: 1.16.6-beta
Description
Reloading @luna/lib causes a dependency-order race.
During the reload sequence, dependent plugins are unloaded, but some of them are loaded again before @luna/ui has finished loading and has been restored to luna.core.modules.
This causes repeated transient failures such as:
Error: Cannot find module @luna/ui in luna.core.modules
I can reproduce this consistently by repeatedly reloading only @luna/lib.
Steps to Reproduce
Steps to reproduce the behavior:
- Start TIDAL with Luna.
- Open Luna Settings.
- Find
@luna/lib.
- Click Reload.
- Open DevTools with Ctrl-Shift-I and watch the console.
- Repeat the reload several times.
- Observe dependent plugins trying to load before
@luna/ui is available.
Expected Behavior
Reloading @luna/lib should restore its dependency chain in the correct order.
Plugins that depend on @luna/ui should only be loaded after @luna/ui has finished loading and is present in luna.core.modules.
The reload should complete without transient module-resolution failures.
Actual Behavior
After @luna/lib is reloaded, Luna starts loading several dependent plugins while @luna/ui is still unavailable.
For example:
[@luna/core].LunaPlugin[@luna/lib] Unloaded
[@luna/core].LunaPlugin[@luna/lib] Loaded
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @luna/ui
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @solomag/lunatic-ui
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @luna/dev
[@luna/core].LunaPlugin[@luna/lib] Loading dependant DiscordRPC
This is followed by failures like:
[@luna/core].LunaPlugin[@solomag/lunatic-ui] [DEV] Failed to load
Error: Cannot find module @luna/ui in luna.core.modules
and:
[@luna/core].LunaPlugin[@luna/dev] Failed to load
Error: Cannot find module @luna/ui in luna.core.modules
The same can also happen to other plugins that depend on @luna/ui, such as DiscordRPC.
Shortly afterwards, @luna/ui finishes loading and the failed dependants are loaded again:
[@luna/core].LunaPlugin[@luna/ui] Loaded
[@luna/core].LunaPlugin[@luna/ui] Loading dependant @solomag/lunatic-ui
[@luna/core].LunaPlugin[@luna/ui] Loading dependant @luna/dev
[@luna/core].LunaPlugin[@luna/ui] Loading dependant DiscordRPC
So the final state can recover, but the reload sequence itself is racy and causes unnecessary failed loads.
Screenshots / Logs
To open console to view logs & errors press Ctrl-Shift-I.
Relevant log excerpt:
[@luna/core].LunaPlugin[@luna/lib] Unloaded
[@luna/core].LunaPlugin[@luna/lib] Loaded
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @luna/ui
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @solomag/lunatic-ui
[@luna/core].LunaPlugin[@luna/lib] Loading dependant @luna/dev
[@luna/core].LunaPlugin[@luna/lib] Loading dependant DiscordRPC
[@luna/core].LunaPlugin[@solomag/lunatic-ui] [DEV] Failed to load Error: Cannot find module @luna/ui in luna.core.modules
[@luna/core].LunaPlugin[@luna/dev] Failed to load Error: Cannot find module @luna/ui in luna.core.modules
[@luna/core].LunaPlugin[@luna/ui] Loaded
[@luna/core].LunaPlugin[@luna/ui] Loading dependant @solomag/lunatic-ui
[@luna/core].LunaPlugin[@luna/ui] Loading dependant @luna/dev
[@luna/core].LunaPlugin[@luna/ui] Loading dependant DiscordRPC
During repeated reloads I also observed secondary lifecycle issues such as:
[Luna.native] RemoteDesktopController is already running
and DiscordRPC connection timeouts.
These appear to be secondary effects of the cascading reload and are not necessary to reproduce the main issue.
Additional Context
This issue appears specifically when reloading @luna/lib.
For comparison, I also tested repeated reloads of @luna/ui and @luna/lib.native from clean TIDAL starts.
Reloading @luna/ui did not produce:
Cannot find module @luna/ui in luna.core.modules
Reloading @luna/lib.native was also clean and did not show the same dependency-order failure.
The main issue therefore seems specific to how @luna/lib reloads and restarts its dependants.
Prerequisites
Please check the following before continuing:
Environment
Description
Reloading
@luna/libcauses a dependency-order race.During the reload sequence, dependent plugins are unloaded, but some of them are loaded again before
@luna/uihas finished loading and has been restored toluna.core.modules.This causes repeated transient failures such as:
I can reproduce this consistently by repeatedly reloading only
@luna/lib.Steps to Reproduce
Steps to reproduce the behavior:
@luna/lib.@luna/uiis available.Expected Behavior
Reloading
@luna/libshould restore its dependency chain in the correct order.Plugins that depend on
@luna/uishould only be loaded after@luna/uihas finished loading and is present inluna.core.modules.The reload should complete without transient module-resolution failures.
Actual Behavior
After
@luna/libis reloaded, Luna starts loading several dependent plugins while@luna/uiis still unavailable.For example:
This is followed by failures like:
and:
The same can also happen to other plugins that depend on
@luna/ui, such as DiscordRPC.Shortly afterwards,
@luna/uifinishes loading and the failed dependants are loaded again:So the final state can recover, but the reload sequence itself is racy and causes unnecessary failed loads.
Screenshots / Logs
To open console to view logs & errors press Ctrl-Shift-I.
Relevant log excerpt:
During repeated reloads I also observed secondary lifecycle issues such as:
and DiscordRPC connection timeouts.
These appear to be secondary effects of the cascading reload and are not necessary to reproduce the main issue.
Additional Context
This issue appears specifically when reloading
@luna/lib.For comparison, I also tested repeated reloads of
@luna/uiand@luna/lib.nativefrom clean TIDAL starts.Reloading
@luna/uidid not produce:Reloading
@luna/lib.nativewas also clean and did not show the same dependency-order failure.The main issue therefore seems specific to how
@luna/libreloads and restarts its dependants.