siyuan-note/siyuan · error · Error
the update install package returned by the kernel is invalid
Error message
the update install package returned by the kernel is invalid
What it means
In the update install flow, after closing all workspaces and kernels, the initiating kernel is expected to return an installPkgPath in its exit response. If validateUpdateInstallPackage returns falsy — the path is missing, empty, or fails validation — Electron cannot locate the downloaded install package and throws this error.
Source
Thrown at app/electron/main.js:1742
.concat(Array.from(kernelProcesses.keys()), request.initiatingPort)));
ports.forEach((port) => expectedKernelExitPorts.add(port));
writeLog("coordinating update install [initiatingPort=" + request.initiatingPort + ", ports=" + ports.join(",") +
"]");
workspaces.forEach((workspace) => {
if (workspace.browserWindow && !workspace.browserWindow.isDestroyed()) {
workspace.browserWindow.hide();
}
});
const otherPorts = ports.filter((port) => port !== request.initiatingPort);
writeLog("closing other workspaces for update [ports=" + otherPorts.join(",") + "]");
await closeUpdateKernelStage(otherPorts, request);
writeLog("closing initiating workspace for update [port=" + request.initiatingPort + "]");
const [initiatingExitResponse] = await closeUpdateKernelStage([request.initiatingPort], request);
const installPkgPath = validateUpdateInstallPackage(request, initiatingExitResponse?.data?.installPkgPath);
if (!installPkgPath) {
throw new Error("the update install package returned by the kernel is invalid");
}
await launchUpdateInstallPackage(installPkgPath);
keepAppOpenDuringUpdate = false;
app.exit();
};
const beginUpdateInstall = (event, data) => {
if (updateInstallPromise) {
writeLog("ignored duplicate update install request");
return true;
}
if (systemShutdownState !== systemShutdownNone) {
writeLog("rejected update install request during system shutdown");
return false;
}
const request = validateUpdateInstallRequest(event, data);View on GitHub (pinned to 8641553a1f)
Solutions
- Retry the update from within the app so the kernel can re-download and return a valid installPkgPath
- Check the kernel logs for download failures (disk space, network, permissions) and fix the root cause
- Update manually: download the installer from the official site and run it yourself
- Ensure the running kernel version matches the Electron shell expectation for the update handshake
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
if info, err := os.Stat(util.DataDir); err != nil || !info.IsDir() {
// workspace data dir missing or inaccessible
}
Try / catch
if err := EnableEncryptedNotebook(...); err != nil {
var pe *fs.PathError
if errors.As(err, &pe) && errors.Is(pe.Err, syscall.EACCES) {
// fix permissions on data dir, then retry
}
}
Prevention
- Run the kernel as a user with write access to the workspace
- Avoid read-only mounts or removable media for the workspace data directory
When it happens
Trigger: request.initiatingPort's kernel exit response has no data.installPkgPath, the field is null/empty, or the path returned points to a missing/corrupt package, causing validateUpdateInstallPackage to yield no usable path before launchUpdateInstallPackage is called.
Common situations: The kernel failed to finish downloading the update package before being asked to exit; a stale kernel version that does not return installPkgPath; disk-full or permission errors deleting the downloaded package; kernel crashed mid-update leaving an empty response.
Related errors
- failed to terminate residual kernel processes [ports=" + res
- failed to clear remote kernel active storage: " + error.mess
- marketplace package update not found
- errUpdatePackageUnavailable
- GitHub releases are empty
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/295ccd41ae949d9a.
Report an issue: GitHub.