{"record":{"id":"0e6c4a53a4815787","repo":"Budibase/budibase","slug":"no-license-key-found-0e6c4a","errorCode":null,"errorMessage":"No license key found","messagePattern":"No license key found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/sdk/workspace/ai/llm/bbai.ts","lineNumber":273,"sourceCode":"\n        const result = await response.json()\n        if (typeof result.id !== \"string\") {\n          throw new Error(\"File id not found\")\n        }\n        return unwrapLiteLLMFileId(result.id)\n      } else {\n        const fileBuffer = Buffer.from(await fileBlob.arrayBuffer())\n        const base64 = fileBuffer.toString(\"base64\")\n\n        if (isImage) {\n          return `data:${type};base64,${base64}`\n        }\n        if (!env.BUDICLOUD_URL) {\n          throw new Error(\"No Budibase URL found\")\n        }\n        const licenseKey = await licensing.keys.getLicenseKey()\n        if (!licenseKey) {\n          throw new Error(\"No license key found\")\n        }\n\n        const response = await fetch(\n          `${env.BUDICLOUD_URL}/api/ai/upload-file`,\n          {\n            method: \"POST\",\n            headers: {\n              \"Content-Type\": \"application/json\",\n              [constants.Header.LICENSE_KEY]: licenseKey,\n            },\n            body: JSON.stringify({\n              data: base64,\n              filename,\n              contentType: type,\n            }),\n          }\n        )\n","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/ai/llm/bbai.ts#L255-L291","documentation":"Thrown when BUDICLOUD_URL is set but the license key cannot be retrieved via licensing.keys.getLicenseKey(). The Budibase Cloud AI file-upload endpoint requires a license key for authentication/entitlement, so uploads without one are rejected before the request is even made.","triggerScenarios":"createBBAIClient file upload path on an installation with an expired, missing, or not-yet-activated license; getLicenseKey() returning undefined because the license has never been synced or was deactivated.","commonSituations":"Trial expiry; license key deleted or rotated in the Budibase account; offline installations where the license could not be refreshed; running the upload from a service without license cache access.","solutions":["Re-activate or update your Budibase license key in the admin settings","Check the license is still valid/not expired in your Budibase account","Ensure the service can reach the licensing endpoint to sync the license cache","Retry the upload after the license sync completes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const licenseKey = await licensing.keys.getLicenseKey()\nif (!licenseKey) {\n  throw new Error(\"A valid Budibase license is required for AI file upload\")\n}","typeGuard":null,"tryCatchPattern":"try {\n  await uploadToCloud(file)\n} catch (e) {\n  if (e.message === \"No license key found\") {\n    return { error: \"Activate or renew your Budibase license to use AI file upload\" }\n  }\n  throw e\n}","preventionTips":["Monitor license expiry and refresh the license cache proactively","Ensure services can reach the licensing endpoint (no offline blocks)","Re-activate the license after account/key changes before using AI features"],"tags":["licensing","configuration","budibase-cloud","file-upload"],"backgroundTag":"missing-license-key","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}