Molunerfinn/PicGo · error

Toolbox fix failed

Error message

Toolbox fix failed

What it means

fixItem throws when the TOOLBOX_CHECK_FIX RPC to the main process returns a failure envelope. The main handler (src/main/events/rpc/routes/toolbox/index.ts:38) looks up a fix handler in toolboxFixMap and awaits it; a thrown error inside a fixer (or a missing handler, which returns undefined that fails normalization) is surfaced as this Error. The literal text is the fallback when result.error is empty.

Source

Thrown at src/renderer/adapters/toolbox-page.ts:15

import { IRPCActionType, IToolboxItemType } from '~/universal/types/enum'
import { invokeRPC, sendRPC } from '@/utils/dataSender'

export const toolboxPageAdapter = {
  runCheck () {
    sendRPC(IRPCActionType.TOOLBOX_CHECK)
  },
  async fixItem (type: IToolboxItemType) {
    const result = await invokeRPC<IToolboxCheckRes>(
      IRPCActionType.TOOLBOX_CHECK_FIX,
      type
    )

    if (!result.success) {
      throw new Error(result.error || 'Toolbox fix failed')
    }

    return result.data
  },
  openFile (path: string) {
    sendRPC(IRPCActionType.OPEN_FILE, path)
  },
  reloadApp () {
    sendRPC(IRPCActionType.RELOAD_APP)
  }
}

View on GitHub (pinned to 07ec7068a5)

Solutions

  1. Check result.error first — the fixer usually sets a specific message; the generic text means the error was swallowed
  2. Confirm the toolbox type has a registered fixer in toolboxFixMap; if not, fix the item manually (e.g. set permissions or proxy settings yourself)
  3. For file-permission fixes, ensure the app has rights to chmod/modify the target file (config dir, shortcuts db)
  4. Re-run the corresponding check (TOOLBOX_CHECK) to confirm the underlying issue still exists before retrying the fix

Example fix

// before
const res = await fixItem('proxy') // no fixer registered -> fails
// after
const FIXABLE = new Set(['upload-clipboard', 'file-permission'] as const)
if (!FIXABLE.has(type as any)) {
  showManualFixHint(type)
  return
}
const res = await fixItem(type)
Defensive patterns

Strategy: try-catch

Validate before calling

const FIXABLE_TYPES = ['upload-clipboard', 'file-permission']
if (!FIXABLE_TYPES.includes(type)) {
  showManualFixInstructions(type)
  return
}

Type guard

function isFixableType(t: string): t is IToolboxItemType {
  return t in fixFileMap || t in fixClipboardUploadMap
}

Try / catch

try {
  await fixItem(type)
} catch (e) {
  notification.error({ title: 'Toolbox fix failed', body: (e as Error).message })
}

Prevention

When it happens

Trigger: Calling fixItem(type) for a toolbox item whose type is absent from toolboxFixMap (only fixFileMap and fixClipboardUploadMap are registered, e.g. no fixer exists for proxy items), or when the underlying fix routine (file permission change, clipboard-upload service fix) throws.

Common situations: Clicking 'fix' in the Toolbox page for an item that has no automatic fix implemented; the app lacks write permission on the file/shortcuts file being repaired; the clipboard upload service cannot be restarted on the current OS.

Related errors


AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30). Data as JSON: /api/errors/21c47455a5c9de38. Report an issue: GitHub.