{"record":{"id":"5bbab2ecf8e0d228","repo":"FoundationAgents/OpenManus","slug":"password-must-be-provided","errorCode":null,"errorMessage":"password must be provided","messagePattern":"password must be provided","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"app/agent/sandbox_agent.py","lineNumber":82,"sourceCode":"    async def create(cls, **kwargs) -> \"SandboxManus\":\n        \"\"\"Factory method to create and properly initialize a Manus instance.\"\"\"\n        instance = cls(**kwargs)\n        await instance.initialize_mcp_servers()\n        await instance.initialize_sandbox_tools()\n        instance._initialized = True\n        return instance\n\n    async def initialize_sandbox_tools(\n        self,\n        password: str = config.daytona.VNC_password,\n    ) -> None:\n        try:\n            # 创建新沙箱\n            if password:\n                sandbox = create_sandbox(password=password)\n                self.sandbox = sandbox\n            else:\n                raise ValueError(\"password must be provided\")\n            vnc_link = sandbox.get_preview_link(6080)\n            website_link = sandbox.get_preview_link(8080)\n            vnc_url = vnc_link.url if hasattr(vnc_link, \"url\") else str(vnc_link)\n            website_url = (\n                website_link.url if hasattr(website_link, \"url\") else str(website_link)\n            )\n\n            # Get the actual sandbox_id from the created sandbox\n            actual_sandbox_id = sandbox.id if hasattr(sandbox, \"id\") else \"new_sandbox\"\n            if not self.sandbox_link:\n                self.sandbox_link = {}\n            self.sandbox_link[actual_sandbox_id] = {\n                \"vnc\": vnc_url,\n                \"website\": website_url,\n            }\n            logger.info(f\"VNC URL: {vnc_url}\")\n            logger.info(f\"Website URL: {website_url}\")\n            SandboxToolsBase._urls_printed = True","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/app/agent/sandbox_agent.py#L64-L100","documentation":"Raised by SandboxAgent.initialize_sandbox_tools() when the password argument is empty. The function creates a Daytona sandbox whose noVNC desktop (port 6080) is protected by this password; a sandbox with no VNC password cannot be created through this path. The default comes from config.daytona.VNC_password, so this also fires when that config value is unset/blank.","triggerScenarios":"Calling initialize_sandbox_tools(password=\"\"), initialize_sandbox_tools(password=None), or calling it with no args while config.daytona.VNC_password is empty or missing in config.toml.","commonSituations":"Fresh clone using config.example.toml with a blank VNC_password; env var for the Daytona VNC password not exported; trailing-whitespace or empty-string default in the TOML config.","solutions":["Set a VNC password: await agent.initialize_sandbox_tools(password=\"strongpass\")","Or set it in config: [daytona] VNC_password = \"strongpass\" in config/config.toml, then call with no args","Check the password was not read as empty from environment/config before calling (log bool(config.daytona.VNC_password))"],"exampleFix":"# before\nawait agent.initialize_sandbox_tools()  # config VNC_password empty -> ValueError\n\n# after\n# config/config.toml:\n# [daytona]\n# VNC_password = \"my-secret\"\nawait agent.initialize_sandbox_tools()","handlingStrategy":"validation","validationCode":"from app.config import config\n\ndef sandbox_ready() -> bool:\n    return bool(getattr(getattr(config, \"daytona\", None), \"VNC_password\", None))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fail fast at startup when the daytona VNC_password config is blank","Store the VNC password via environment variable and load it into config at boot","Never call sandbox creation until the required secrets check passes"],"tags":["sandbox","daytona","configuration","vnc"],"backgroundTag":null,"analyzedSha":"52a13f2a57d8c7f6737eefb02ccf569594d44273","analyzedAt":"2026-08-15T02:33:49.993Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}