siyuan-note/siyuan · error

response.msg || "Failed to update the global plugin state"

Error message

response.msg || "Failed to update the global plugin state"

What it means

In setGlobalPluginsDisabled, the kernel call that persists the global plugin enabled/disabled state returned a non-zero code. The message is the kernel response msg, or the fallback text 'Failed to update the global plugin state' when no msg was supplied.

Source

Thrown at app/src/plugin/globalState.ts:53

export const applyPluginReload = (app: App, data: IPluginReloadData = {}) => {
    if (!isGlobalPluginState(data)) {
        return reloadPlugin(app, data);
    }
    return getCoordinator(app).apply(data);
};

export const syncGlobalPluginConfig = (app: App, petalDisabled: boolean) => {
    getCoordinator(app).syncConfig(petalDisabled);
};

export const subscribeGlobalPluginState = (app: App, listener: (state: IGlobalPluginStateSnapshot) => void) =>
    getCoordinator(app).subscribe(listener);

export const setGlobalPluginsDisabled = async (app: App, petalDisabled: boolean) => {
    const response = await fetchSyncPost("/api/setting/setBazaarPetalDisabled", {petalDisabled});
    if (response.code !== 0 || !response.data) {
        throw new Error(response.msg || "Failed to update the global plugin state");
    }
    await applyPluginReload(app, response.data as TGlobalPluginReloadData);
};

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Check kernel logs for the failing /api call reason
  2. Verify the workspace is writable and the kernel is responsive
  3. Retry the toggle in Settings - Plugins after reconnection
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at app/src/plugin/globalState.ts:53 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/499385f236b59a42. Report an issue: GitHub.