Eugeny/tabby · warning · Error
Unsupported
Error message
Unsupported
What it means
Thrown by WebPlatformService.startDownloadDirectory(), the web (browser) implementation of the abstract PlatformService method. Browsers cannot stream an entire remote directory as a single download object the way Electron can, so the operation is intentionally unsupported in the web build. The base contract declares it abstract, so each platform must implement it.
Solutions
- Guard the UI/action with a capability check before offering folder download on the web build.
- On web, fall back to recursively downloading files individually via startDownload, or zip them server-side first.
- Use the Electron/desktop build of Tabby when directory download is required.
- Catch 'Unsupported' and show a user-facing message explaining the limitation.
Example fix
// before
const transfer = await this.platform.startDownloadDirectory(folder.name, 0)
// after
if (this.platform instanceof WebPlatformService) {
this.notifications.error('Directory download is not available in the web build')
return
}
const transfer = await this.platform.startDownloadDirectory(folder.name, 0) Defensive patterns
Strategy: fallback
Validate before calling
import { Platform } from 'tabby-core'
function supportsDirDownload (platform: Platform | string): boolean {
return platform !== Platform.Web
} Type guard
import { WebPlatformService } from 'tabby-web'
function isWebPlatform (p: unknown): p is WebPlatformService {
return p instanceof WebPlatformService
} Try / catch
try {
await this.platform.startDownloadDirectory(folder.name, 0)
} catch (e) {
if (e.message === 'Unsupported') {
// web: fall back to per-file downloads
} else throw e
} Prevention
- Check the host platform before offering folder-download UI.
- On web, zip remotely or download files individually.
- Keep platform-specific capability flags in a shared service.
When it happens
Trigger: Code calls platform.startDownloadDirectory(name, size) while running under the Web platform service. The SFTP panel (sftpPanel.component.ts:257) calls this when the user chooses 'Download' on a folder in a web Tabby session.
Common situations: User opens the SFTP panel in the web build and tries to download a remote directory; a plugin assumes directory download is available on all platforms; the same UI is shared between Electron (supported) and Web (unsupported) builds.
Related errors
AI-assisted analysis of Eugeny/tabby@14e2d60b9b (2026-08-12).
Data as JSON: /api/errors/611da077e5ef54bb.
Report an issue: GitHub.
Appendix: source
Thrown at tabby-web/src/platform.ts:118
const response = await modal.result
return { response }
} catch {
return { response: options.cancelId ?? 1 }
}
}
quit (): void {
window.close()
}
async startDownload (name: string, mode: number, size: number): Promise<FileDownload|null> {
const transfer = new HTMLFileDownload(name, mode, size)
this.fileTransferStarted.next(transfer)
return transfer
}
async startDownloadDirectory (_name: string, _estimatedSize?: number): Promise<DirectoryDownload|null> {
throw new Error('Unsupported')
}
startUpload (options?: FileUploadOptions): Promise<FileUpload[]> {
return new Promise(resolve => {
this.fileSelector.onchange = () => {
const transfers: FileUpload[] = []
const fileList = this.fileSelector.files!
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
for (let i = 0; i < (fileList.length ?? 0); i++) {
const file = fileList[i]
const transfer = new HTMLFileUpload(file)
this.fileTransferStarted.next(transfer)
transfers.push(transfer)
if (!options?.multiple) {
break
}
}
resolve(transfers)View on GitHub (pinned to 14e2d60b9b)