{"record":{"id":"6811d9c11837ce94","repo":"alibaba/nacos","slug":"failed-to-save-plugin-config-pluginid","errorCode":null,"errorMessage":"Failed to save plugin config: {pluginId}","messagePattern":"Failed to save plugin config: (.+?)","errorType":"exception","errorClass":"PluginPersistenceException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java","lineNumber":140,"sourceCode":"    }\n    \n    /**\n     * Save plugin configuration.\n     *\n     * @param pluginId plugin ID\n     * @param config configuration key-value pairs\n     */\n    @Override\n    public void saveConfig(String pluginId, Map<String, String> config) {\n        synchronized (configLock) {\n            try {\n                Map<String, Map<String, String>> configs = loadAllConfigs();\n                configs.put(pluginId, config);\n                writeJsonToFile(PLUGIN_CONFIG_FILE, configs);\n                LOGGER.debug(\"[FilePluginStatePersistenceImpl] Saved plugin config for {}\",\n                    pluginId);\n            } catch (Exception e) {\n                throw new PluginPersistenceException(\"Failed to save plugin config: \" + pluginId,\n                    e);\n            }\n        }\n    }\n    \n    @Override\n    public void replaceAllConfigs(Map<String, Map<String, String>> configs) {\n        synchronized (configLock) {\n            try {\n                Map<String, Map<String, String>> configsToStore = configs == null\n                    ? new HashMap<>() : new HashMap<>(configs);\n                writeJsonToFile(PLUGIN_CONFIG_FILE, configsToStore);\n                LOGGER.debug(\"[FilePluginStatePersistenceImpl] Replaced all plugin configs\");\n            } catch (Exception e) {\n                throw new PluginPersistenceException(\"Failed to replace all plugin configs\", e);\n            }\n        }\n    }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java#L122-L158","documentation":"Error \"Failed to save plugin config: {pluginId}\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java:140 when the library encounters an invalid state.","commonSituations":"Persisting a plugin config to disk failed.","solutions":["Inspect the server logs for the underlying cause, fix it, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}