firecrawl/open-lovable · error · Error
restartViteServer not implemented for this provider
Error message
restartViteServer not implemented for this provider
What it means
The SandboxProvider base class default restartViteServer() throws this Error to mark the capability as unsupported when a provider has not overridden it. Restarting the Vite dev server is provider-specific (process management inside the sandbox), so only providers implementing it can honor the call.
Source
Thrown at lib/sandbox/types.ts:63
abstract runCommand(command: string): Promise<CommandResult>;
abstract writeFile(path: string, content: string): Promise<void>;
abstract readFile(path: string): Promise<string>;
abstract listFiles(directory?: string): Promise<string[]>;
abstract installPackages(packages: string[]): Promise<CommandResult>;
abstract getSandboxUrl(): string | null;
abstract getSandboxInfo(): SandboxInfo | null;
abstract terminate(): Promise<void>;
abstract isAlive(): boolean;
// Optional methods that providers can override
async setupViteApp(): Promise<void> {
// Default implementation for setting up a Vite React app
throw new Error('setupViteApp not implemented for this provider');
}
async restartViteServer(): Promise<void> {
// Default implementation for restarting Vite
throw new Error('restartViteServer not implemented for this provider');
}
}View on GitHub (pinned to 69bd93bae7)
Solutions
- Override restartViteServer() in the active provider to kill/restart the Vite process
- Gate the restart behind a capability check (e.g. 'supportsVite' flag per provider)
- Skip the restart gracefully for providers without dev-server management
- Switch to a provider (like VercelProvider) that implements both Vite methods
Example fix
// before
await provider.restartViteServer(); // throws for this provider
// after
if (typeof provider.restartViteServer !== SandboxProvider.prototype.restartViteServer) {
await provider.restartViteServer();
} // else skip or recreate dev server another way Defensive patterns
Strategy: validation
Validate before calling
if (provider.restartViteServer === SandboxProvider.prototype.restartViteServer) {
console.warn('restartViteServer unsupported by provider; skipping');
return;
} Type guard
function supportsViteRestart(p: SandboxProvider): boolean { return p.restartViteServer !== SandboxProvider.prototype.restartViteServer; } Try / catch
try {
await provider.restartViteServer();
} catch (e) {
if (e.message.includes('not implemented')) { log('Skipping Vite restart: unsupported provider'); return; }
throw e;
} Prevention
- Make Vite restart optional in the install pipeline
- Document required overrides when adding providers
- Prefer providers implementing both Vite methods for Vite workflows
- Wrap capability-specific calls behind feature checks
When it happens
Trigger: Calling restartViteServer() on a provider subclass that did not override it, or indirectly via installPackages() when the active provider lacks the override.
Common situations: Switching the sandbox provider in config while the install flow unconditionally restarts Vite; a custom provider implemented only the required abstract methods; feature expects Vite hot-restart on a provider that can't manage processes that way.
Related errors
AI-assisted analysis of firecrawl/open-lovable@69bd93bae7 (2026-08-28).
Data as JSON: /api/errors/8564dc0e21256266.
Report an issue: GitHub.