{"record":{"id":"3bf14f87dc3b0483","repo":"BabylonJS/Babylon.js","slug":"the-registeredplugin-plugin-name-plugin-is-di","errorCode":null,"errorMessage":"The '${registeredPlugin.plugin.name}' plugin is disabled via the loader options passed to the loading operation.","messagePattern":"The '(.+?)' plugin is disabled via the loader options passed to the loading operation\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/Loading/sceneLoader.ts","lineNumber":708,"sourceCode":"            // Fetching head content to get the mime type\r\n            const response = await _FetchAsync(fileInfo.url, { method: \"HEAD\", responseHeaders: [\"Content-Type\"] });\r\n            const mimeType = response.headerValues ? response.headerValues[\"Content-Type\"] : \"\";\r\n            if (mimeType) {\r\n                registeredPlugin = getPluginForMimeType(mimeType);\r\n            }\r\n        }\r\n\r\n        if (!registeredPlugin) {\r\n            registeredPlugin = getDefaultPlugin();\r\n        }\r\n    }\r\n\r\n    if (!registeredPlugin) {\r\n        throw new Error(`No plugin or fallback for ${pluginExtension ?? fileInfo.url}`);\r\n    }\r\n\r\n    if (pluginOptions?.[registeredPlugin.plugin.name]?.enabled === false) {\r\n        throw new Error(`The '${registeredPlugin.plugin.name}' plugin is disabled via the loader options passed to the loading operation.`);\r\n    }\r\n\r\n    if (fileInfo.rawData && !registeredPlugin.isBinary) {\r\n        throw new Error(\"Loading from ArrayBufferView can not be used with plugins that don't support binary loading.\");\r\n    }\r\n\r\n    // For plugin factories, the plugin is instantiated on each SceneLoader operation. This makes options handling\r\n    // much simpler as we can just pass the options to the factory, rather than passing options through to every possible\r\n    // plugin call. Given this, options are only supported for plugins that provide a factory function.\r\n    let plugin: SceneLoaderPlugin;\r\n    if (IsFactory(registeredPlugin.plugin)) {\r\n        const pluginFactory = registeredPlugin.plugin;\r\n        try {\r\n            // Only await when the factory is actually asynchronous, so that for synchronous factories the plugin is\r\n            // instantiated (and onPluginActivatedObservable is notified) synchronously within the calling load operation.\r\n            const createdPlugin = pluginFactory.createPlugin((pluginOptions ?? {}) as SceneLoaderPluginOptions);\r\n            plugin = createdPlugin instanceof Promise ? await createdPlugin : createdPlugin;\r\n        } catch (error) {\r","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/Loading/sceneLoader.ts#L690-L726","documentation":"SceneLoader supports per-plugin options passed as the last argument to loading functions. This error is thrown when the resolved plugin was explicitly disabled by the caller via pluginOptions[pluginName].enabled === false.","triggerScenarios":"Calling any SceneLoader load function with pluginOptions such as { glTF: { enabled: false } } while the file being loaded resolves to the glTF plugin.","commonSituations":"Copy-pasting option objects that disable plugins to trim bundle usage; a shared loader wrapper that disables plugins globally; enabling/disabling feature flags and accidentally turning off the needed plugin.","solutions":["Remove the entry that sets enabled: false for the required plugin in pluginOptions.","Set enabled: true explicitly for the plugin matching the file format being loaded.","Audit wrapper/helper functions that construct pluginOptions so they do not silently disable needed loaders."],"exampleFix":"// before\nawait SceneLoader.ImportMeshAsync(\"\", root, \"scene.glb\", scene, undefined, \"\", { glTF: { enabled: false } });\n\n// after\nawait SceneLoader.ImportMeshAsync(\"\", root, \"scene.glb\", scene, undefined, \"\", { glTF: { enabled: true } });","handlingStrategy":"validation","validationCode":"function assertPluginEnabled(pluginOptions: Record<string, { enabled?: boolean }> | undefined, pluginName: string): void {\n  if (pluginOptions?.[pluginName]?.enabled === false) {\n    throw new Error(`Plugin ${pluginName} is disabled but required for this load`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await BABYLON.SceneLoader.ImportMeshAsync(\"\", root, file, scene, undefined, \"\", pluginOptions);\n} catch (e) {\n  if ((e as Error).message.includes(\"plugin is disabled\")) {\n    console.error(\"Re-enable the plugin in pluginOptions or remove the enabled:false flag\");\n  }\n}","preventionTips":["Keep pluginOptions constants in one place and review enabled:false flags.","Never disable a plugin globally in shared loader wrappers.","Match the enabled flags to the set of file formats the app actually loads."],"tags":["loading","scene-loader","configuration"],"backgroundTag":"plugin-disabled-by-config","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}