Budibase/budibase · error · Error
Invalid plugin URL.
Error message
Invalid plugin URL.
What it means
parseTarGzUrl throws this when the provided plugin URL cannot be parsed by the URL constructor, i.e. it is not an absolute, well-formed URL.
Source
Thrown at packages/server/src/api/controllers/plugin/url.ts:12
import { downloadUnzipTarball } from "./utils"
import {
deleteFolderFileSystem,
getPluginMetadata,
} from "../../../utilities/fileSystem"
function parseTarGzUrl(url: string): URL {
let parsed: URL
try {
parsed = new URL(url)
} catch {
throw new Error("Invalid plugin URL.")
}
if (parsed.protocol !== "https:") {
throw new Error("Plugin URL must use HTTPS.")
}
if (!parsed.pathname.endsWith(".tar.gz")) {
throw new Error("Plugin must be compressed into a gzipped tarball.")
}
return parsed
}
export async function urlUpload(url: string, name = "", headers = {}) {
parseTarGzUrl(url)
const path = await downloadUnzipTarball(url, name, headers, {
followRedirects: false,View on GitHub (pinned to a81a902e9a)
Solutions
- Supply a fully qualified absolute URL including the scheme
- Check for trailing spaces or invalid characters in the URL
- URL-encode any spaces or special characters
Example fix
// before
await urlUpload('myserver.com/plugins/my-plugin.tar.gz')
// after
await urlUpload('https://myserver.com/plugins/my-plugin.tar.gz') Defensive patterns
Strategy: validation
Validate before calling
let parsed: URL
try { parsed = new URL(url) } catch { throw new Error('Provide an absolute URL including scheme, e.g. https://...') } Type guard
function isValidUrl(url: string): boolean {
try { new URL(url); return true } catch { return false }
} Try / catch
try {
await urlUpload(url)
} catch (err) {
if (err.message === 'Invalid plugin URL.') {
// normalize/trim the URL and require an absolute form
}
} Prevention
- Always include the scheme (https://) in plugin URLs
- Trim whitespace before submitting URLs
- Use isValidUrl() client-side before calling the API
When it happens
Trigger: urlUpload called with a missing, empty, relative ('plugins/foo.tar.gz'), or malformed URL (spaces, missing scheme).
Common situations: Users pasting a relative path instead of a full URL; copying URLs with stray whitespace or missing https:// prefix; form field left empty.
Related errors
- Plugin must be compressed into a gzipped tarball.
- Invalid URL.
- Only HTTP(S) URLs are allowed.
- Plugin missing .js file.
- Invalid Github URL
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/267d68a7cad30671.
Report an issue: GitHub.