linshenkx/prompt-optimizer · error · Error
Google Drive remote backup is only supported in the Web vers
Error message
Google Drive remote backup is only supported in the Web version
What it means
Factory createRemoteObjectStore routes desktop runtimes through the Electron IPC store, which has no Google Drive implementation; requesting google-drive on desktop throws explicitly.
Source
Thrown at packages/ui/src/utils/remote-backup.ts:1724
}
}
}
class CloudflareR2RemoteObjectStore extends S3CompatibleRemoteObjectStore {
provider: RemoteBackupProviderKind = 'cloudflare-r2'
constructor(config: Extract<RemoteBackupProviderConfig, { kind: 'cloudflare-r2' }>) {
super(toCloudflareR2S3Config(config))
}
}
export const createRemoteObjectStore = (
provider: RemoteBackupProviderConfig,
runtime: RemoteBackupRuntime = 'web',
): RemoteObjectStore => {
if (runtime === 'desktop') {
if (provider.kind === 'google-drive') {
throw new Error('Google Drive remote backup is only supported in the Web version')
}
return new DesktopIpcRemoteObjectStore(provider)
}
if (provider.kind === 'google-drive') return new GoogleDriveRemoteObjectStore(provider)
if (provider.kind === 'cloudflare-r2') return new CloudflareR2RemoteObjectStore(provider)
if (provider.kind === 'webdav') return new WebDavRemoteObjectStore(provider)
return new S3CompatibleRemoteObjectStore(provider)
}
export const createRemoteBackupAdapter = (
provider: RemoteBackupProviderConfig,
runtime: RemoteBackupRuntime = 'web',
): RemoteBackupAdapter => createRemoteObjectStore(provider, runtime) as RemoteBackupAdapter
export const remoteBackupBlobToImportBuffer = async (blob: Blob): Promise<ArrayBuffer> =>
blob.arrayBuffer()
export const remoteBackupArrayBufferToText = (buffer: ArrayBuffer): string =>View on GitHub (pinned to 3e677b1d9f)
Solutions
- Use the web version for Google Drive backups
- Choose an IPC-supported provider on desktop (webdav, cloudflare-r2/s3)
- Hide/disable the Google Drive option in desktop UI before reaching the factory
Example fix
// before
const store = createRemoteObjectStore(cfg, runtime)
// after
if (runtime === 'desktop' && cfg.kind === 'google-drive') {
throw new Error('unsupported in desktop build') // or disable the option in UI
}
const store = createRemoteObjectStore(cfg, runtime) Defensive patterns
Strategy: validation
Validate before calling
if (runtime === 'desktop' && provider.kind === 'google-drive') disableGoogleDriveOption()
Type guard
const isProviderSupportedOnRuntime = (kind: RemoteBackupProviderKind, runtime: RemoteBackupRuntime): boolean => !(runtime === 'desktop' && kind === 'google-drive')
Try / catch
catch (e) { if ((e as Error).message.includes('only supported in the Web version')) showPlatformNotice(); else throw e } Prevention
- Filter provider options by runtime in UI
- Keep a capability matrix per provider/runtime
When it happens
Trigger: Calling createRemoteObjectStore({kind:'google-drive',...}, 'desktop') — i.e. the desktop app flow with Google Drive selected as the backup provider.
Common situations: Desktop build where the Google Drive OAuth flow (browser-based) is not wired through IPC; users migrating settings from web to desktop with a Google Drive provider configured.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- ${context}: ${response.status} ${message || response.statusT
- ${context}: ${(error as Error).message || String(error)}
- Google Drive object not found: ${path}
- Google Drive resumable upload session did not return a locat
- Google Drive folder creation did not return an id
AI-assisted analysis of linshenkx/prompt-optimizer@3e677b1d9f (2026-08-27).
Data as JSON: /api/errors/c01a6ed831aa3e3a.
Report an issue: GitHub.