infiniflow/ragflow · error · RuntimeError
Provider not initialized. Call initialize() first.
Error message
Provider not initialized. Call initialize() first.
What it means
Guard in E2BProvider.create_instance: the E2B provider was used before initialize(). Note the E2B provider is a stub — create_instance returns a fabricated uuid instance with no real sandbox behind it — so even after initializing, the provider is not functional for execution.
Source
Thrown at agent/sandbox/providers/e2b.py:84
# For now, we'll mark as initialized but actual API calls will fail
self._initialized = True
return True
def create_instance(self, template: str = "python") -> SandboxInstance:
"""
Create a new sandbox instance in E2B.
Args:
template: Programming language template (python, nodejs, go, bash)
Returns:
SandboxInstance object
Raises:
RuntimeError: If instance creation fails
"""
if not self._initialized:
raise RuntimeError("Provider not initialized. Call initialize() first.")
# Normalize language
language = self._normalize_language(template)
# TODO: Implement actual E2B API call
# POST /sandbox with template
instance_id = str(uuid.uuid4())
return SandboxInstance(
instance_id=instance_id,
provider="e2b",
status="running",
metadata={
"language": language,
"region": self.region,
},
)
View on GitHub (pinned to 554fb1133a)
Solutions
- Call initialize() before create_instance — but note E2B execution is unimplemented.
- Switch sandbox provider to 'local' or the self-managed executor for working execution.
- Remove/disable the e2b provider in configuration until implemented.
Example fix
# before
provider = E2BProvider(...)
instance = provider.create_instance("python")
# after: use a implemented provider
provider = LocalSandboxProvider(...)
provider.initialize(config)
instance = provider.create_instance("python") Defensive patterns
Strategy: validation
Validate before calling
IMPLEMENTED_PROVIDERS = {"local", "self_managed", "aliyun_codeinterpreter"}
if provider_name not in IMPLEMENTED_PROVIDERS:
raise ValueError(f"Sandbox provider '{provider_name}' is not implemented; choose one of {sorted(IMPLEMENTED_PROVIDERS)}") Prevention
- Whitelist implemented providers at startup instead of accepting any configured name.
- Treat the e2b provider as a stub: do not route production traffic to it.
- Add a startup health_check that fails deployment for stub providers.
When it happens
Trigger: Selecting provider 'e2b' in sandbox configuration and calling create_instance without initialize(), or after a failed initialize().
Common situations: Misconfiguration naming e2b as the sandbox provider when the integration was never implemented; copy-paste of provider wiring from another provider class.
Related errors
- E2B provider is not yet fully implemented. Please use the se
- Provider not initialized. Call initialize() first.
- Provider not initialized. Call initialize() first.
- Invalid chat_id: ${payload.chat_id}
- main() must be defined or exported.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/716e00c10957c59c.
Report an issue: GitHub.