{"record":{"id":"f24bdad429e312d3","repo":"Budibase/budibase","slug":"unknown-plugin-type-check-schema-json-schema","errorCode":null,"errorMessage":"Unknown plugin type - check schema.json: ${schema.type}","messagePattern":"Unknown plugin type - check schema\\.json: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/backend-core/src/plugin/utils.ts","lineNumber":174,"sourceCode":"        .required(),\n    }),\n  })\n  runJoi(validator, schema)\n}\n\nexport function validate(schema: any) {\n  switch (schema?.type) {\n    case PluginType.COMPONENT:\n      validateComponent(schema)\n      break\n    case PluginType.DATASOURCE:\n      validateDatasource(schema)\n      break\n    case PluginType.AUTOMATION:\n      validateAutomation(schema)\n      break\n    default:\n      throw new Error(`Unknown plugin type - check schema.json: ${schema.type}`)\n  }\n}\n","sourceCodeStart":156,"sourceCodeEnd":177,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/backend-core/src/plugin/utils.ts#L156-L177","documentation":"Plugin validation dispatches on schema.type (PLUGIN type enum: component, datasource, automation, etc.). When the plugin's schema.json declares a type the validator does not recognize, it falls through to the default case and throws with the offending type value. The thrown message includes schema.type for diagnosis.","triggerScenarios":"Uploading/registering a plugin whose schema.json has a missing, misspelled, or newer-than-supported type field (e.g. \"type\": \"widget\", a typo like \"Componant\", or a plugin built against a newer Budibase plugin SDK).","commonSituations":"Hand-written or third-party plugins with incorrect schema.json, plugins copied from newer Budibase versions into an older self-hosted install, or edits to schema.json that changed the type casing/spacing.","solutions":["Open the plugin's schema.json and verify the type field exactly matches a supported PluginType (e.g. \"component\", \"datasource\", \"automation\")","Fix casing/typos in schema.json and re-zip/re-upload the plugin","If the plugin targets a newer plugin SDK, upgrade Budibase to a version that supports that plugin type","Validate the schema.json against the official plugin schema/template before packaging"],"exampleFix":"// before (schema.json)\n{ \"type\": \"Widget\", \"name\": \"my-plugin\", ... }\n// after\n{ \"type\": \"component\", \"name\": \"my-plugin\", ... }","handlingStrategy":"validation","validationCode":"const schema = JSON.parse(fs.readFileSync(\"schema.json\", \"utf8\"))\nif (!schema.type || ![\"component\", \"datasource\", \"automation\"].includes(schema.type)) {\n  throw new Error(`Unsupported plugin type: ${schema.type}`)\n}","typeGuard":"function isKnownPluginType(t: string): t is \"component\" | \"datasource\" | \"automation\" {\n  return [\"component\", \"datasource\", \"automation\"].includes(t)\n}","tryCatchPattern":"try {\n  await validate(schema)\n} catch (err) {\n  if (err.message.startsWith(\"Unknown plugin type\")) {\n    // fix schema.json type field and re-upload\n  }\n  throw err\n}","preventionTips":["Validate plugin schema.json against the official template before packaging","Keep the type field lowercase and matching the supported PluginType enum","Check plugin compatibility with your Budibase version before installing","Re-zip plugins after any schema.json edit"],"tags":["plugin","schema-validation","config"],"backgroundTag":"unknown-plugin-type","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}