Molunerfinn/PicGo · error
Transformer not found
Error message
Transformer not found
What it means
togglePluginTransformer toggles a plugin's transformer in appConfig.picBed.transformer, but only if the installed plugin declares a transformer in its config. The error is thrown when the plugin cannot be found in the pluginsInstalled store by fullName, or when it exists but its config.transformer.name is empty/undefined. It is a guard against mutating transformer settings for a plugin that has no transformer to activate.
Source
Thrown at src/renderer/store/plugins/actions.ts:300
await pluginsAdapter.savePluginConfig(
section === 'config' ? 'plugin' : 'transformer',
targetConfigName,
values as IStringKeyMap
)
await appActions.refreshAppConfig()
const installedPlugins = await pluginsAdapter.getInstalledPlugins()
pluginStoreActions.setInstalledPlugins(installedPlugins.map(mapInstalledPluginItem))
} finally {
pluginStoreActions.setMutating(fullName, false)
}
},
async togglePluginTransformer (fullName: string) {
const installedPlugin = useAppStore.getState().pluginsInstalled.find(
(item) => item.fullName === fullName
)
if (!installedPlugin?.config.transformer.name) {
throw new Error('Transformer not found')
}
const transformerName = installedPlugin.config.transformer.name
const currentTransformer =
useAppStore.getState().appConfig?.picBed.transformer ?? 'path'
const nextTransformer =
currentTransformer === transformerName ? 'path' : transformerName
await pluginsAdapter.saveTransformer(nextTransformer)
await pluginsAdapter.setNeedReload(true)
await appActions.refreshAppConfig()
await appActions.hydrateAppState()
return nextTransformer
},
async runPluginGuiMenuAction (fullName: string, label: string) {
return {
fullName,View on GitHub (pinned to 07ec7068a5)
Solutions
- Look up the plugin in pluginsInstalled by fullName first and bail out (or show a message) if it is missing.
- Check installedPlugin.config.transformer.name is a non-empty string before toggling; if absent, the plugin has no transformer and the toggle is not applicable.
- Ensure pluginsInstalled is hydrated (plugins loaded from main process) before invoking the action.
- Pass the exact fullName string (e.g. 'picgo-plugin-xxx'), not a display name or short name.
Example fix
// before
await pluginStoreActions.togglePluginTransformer(fullName)
// after
const plugin = useAppStore.getState().pluginsInstalled.find(
(item) => item.fullName === fullName
)
if (!plugin?.config.transformer.name) {
toast.warning(i18n.t('PLUGIN_NO_TRANSFORMER'))
return
}
await pluginStoreActions.togglePluginTransformer(fullName) Defensive patterns
Strategy: validation
Validate before calling
const plugin = useAppStore.getState().pluginsInstalled.find(
(item) => item.fullName === fullName
)
if (!plugin?.config.transformer.name) {
// skip toggle: plugin missing or has no transformer
return
} Type guard
function hasTransformer(
plugin: InstalledPlugin | undefined
): plugin is InstalledPlugin & {
config: { transformer: { name: string } }
} {
return typeof plugin?.config.transformer.name === 'string' &&
plugin.config.transformer.name.length > 0
} Try / catch
try {
await pluginStoreActions.togglePluginTransformer(fullName)
} catch (err) {
if ((err as Error).message === 'Transformer not found') {
toast.warning(i18n.t('PLUGIN_NO_TRANSFORMER'))
}
} Prevention
- Always resolve fullName from the pluginsInstalled list, never from user-typed strings.
- Render the transformer toggle in the UI only when config.transformer.name exists.
- Gate plugin actions behind a loaded/hydrated pluginsInstalled flag.
When it happens
Trigger: Calling pluginStoreActions.togglePluginTransformer(fullName) with a fullName that is not in useAppStore's pluginsInstalled list, or with a plugin whose config.transformer.name is undefined (e.g. a plugin that registers no transformer, or a plugin record whose config was never hydrated).
Common situations: Stale fullName after the plugin was uninstalled or renamed; a plugin that only registers uploaders/transformers optionally; calling the toggle from UI code before pluginsInstalled finishes loading; passing a plugin name instead of its fullName.
Related errors
- Plugin not found
- Imported plugin not found
- Config not found
- ALBUM_URL_REWRITE_TEMP_RULE_REQUIRED
- Invalid URL rewrite regex pattern "${rule.match}": ${error i
AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30).
Data as JSON: /api/errors/52c40cec5ff89c5b.
Report an issue: GitHub.