Molunerfinn/PicGo · error
Failed to refresh plugin config schema
Error message
Failed to refresh plugin config schema
What it means
refreshConfigSchema invokes the REFRESH_CONFIG_SCHEMA RPC and expects a success envelope. When result.success is false it throws with result.error, defaulting to 'Failed to refresh plugin config schema'. This means the main process could not rebuild the plugin's config form schema (plugin reload failed, plugin crashed, or the main-side handler reported an error).
Source
Thrown at src/renderer/adapters/plugins.ts:88
},
uninstallPlugin (fullName: string) {
return invokeRPC<string>(IRPCActionType.UNINSTALL_PLUGIN, fullName)
},
updatePlugin (fullName: string) {
return invokeRPC<string>(IRPCActionType.UPDATE_PLUGIN, fullName)
},
togglePluginEnabled (fullName: string, enabled: boolean) {
return invokeRPC<string>(
enabled
? IRPCActionType.ENABLE_PLUGIN
: IRPCActionType.DISABLE_PLUGIN,
fullName
)
},
async refreshConfigSchema (payload: IRefreshConfigSchemaArgs): Promise<ProviderPluginConfig[]> {
const result = await invokeRPC<unknown[]>(IRPCActionType.REFRESH_CONFIG_SCHEMA, payload)
if (!result.success) {
throw new Error(result.error || 'Failed to refresh plugin config schema')
}
return normalizePluginConfigSchema(result.data)
},
async saveTransformer (transformer: string) {
await saveConfig({
'picBed.transformer': transformer
})
},
async fetchPluginReadme (fullName: string, options?: { installed?: boolean }) {
// For installed plugins (including locally imported ones not on npm),
// read README from disk via the main process — jsdelivr 404s on
// unpublished plugins. Non-installed plugins (e.g. search results) fall
// back to the CDN.
if (options?.installed) {
const result = await invokeRPC<string>(
IRPCActionType.GET_INSTALLED_PLUGIN_README,
fullName
)View on GitHub (pinned to 07ec7068a5)
Solutions
- Read result.error from the RPC response/logs for the underlying cause (the thrown message may contain it)
- Reload or reinstall the plugin so its config schema generation succeeds
- Check the plugin's dist output and config() export after an update
- Restart the app to reset the plugin host if the plugin is wedged
Example fix
// before
const schema = await refreshConfigSchema({ fullName }) // throws on success:false
// after
try {
const schema = await refreshConfigSchema({ fullName })
} catch (e) {
await reloadPlugin(fullName)
const schema = await refreshConfigSchema({ fullName })
} Defensive patterns
Strategy: try-catch
Validate before calling
const installed = await getInstalledPluginList()
if (!installed.some(p => p.fullName === payload.fullName)) {
throw new Error('Plugin not installed: ' + payload.fullName)
} Type guard
function rpcOk(result) {
return !!result && result.success === true && Array.isArray(result.data)
} Try / catch
try {
return await refreshConfigSchema(payload)
} catch (e) {
logger.warn('schema refresh failed', e)
await reloadPlugin(payload.fullName)
return await refreshConfigSchema(payload)
} Prevention
- Reload plugins after upgrades before requesting schemas
- Verify the plugin builds and exposes config() after version bumps
- Check main-process logs for the underlying error in result.error
- Surface a reload/reinstall action in the plugin settings UI
When it happens
Trigger: Calling refreshConfigSchema (via fetchSchema/resolvedSchema) after a plugin update/reload where the plugin's config method throws or is missing, or when the RPC handler itself fails and returns success:false with an empty error string.
Common situations: Plugin upgraded to a version whose config() signature changed; plugin not built correctly (missing dist); Node module resolution failure in the main process; plugin hangs or throws during config generation.
Related errors
- Failed to read local plugin readme
- Install plugin failed
- Toggle plugin failed
- Update plugin failed
- Uninstall plugin failed
AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30).
Data as JSON: /api/errors/9627cd4c1158e01b.
Report an issue: GitHub.