{"record":{"id":"0aac465e09262715","repo":"appwrite/appwrite","slug":"failed-to-create-project","errorCode":null,"errorMessage":"Failed to create project","messagePattern":"Failed to create project","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Appwrite/Platform/Tasks/Screenshot.php","lineNumber":139,"sourceCode":"        $projectId = ID::unique();\n\n        // Create project\n        $project = $client->call(Client::METHOD_POST, '/projects', [\n            'content-type' => 'application/json',\n            'x-appwrite-project' => 'console',\n            'cookie' => $cookieConsole\n        ], [\n            'projectId' => $projectId,\n            'region' => 'default',\n            'name' => $projectName,\n            'teamId' => $team['body']['$id'],\n            'description' => 'Demo Project Description',\n            'url' => 'https://appwrite.io',\n        ]);\n\n        if ($project['headers']['status-code'] !== 201) {\n            Console::error(\\json_encode($project));\n            throw new \\Exception(\"Failed to create project\");\n        }\n\n        Console::info(\"Project created\");\n\n        $projectId = $project['body']['$id'];\n\n        $framework = $template['frameworks'][0];\n\n        // Use best specifications to prevent out-of-memory during build\n        $specifications = Config::getParam('specifications', []);\n        $specifications = array_keys($specifications);\n        $specification = \\end($specifications);\n\n        // Create site\n        $site = $client->call(Client::METHOD_POST, '/sites', [\n            'content-type' => 'application/json',\n            'x-appwrite-project' => $projectId,\n            'x-appwrite-mode' => 'admin',","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/appwrite/appwrite/blob/a1d520eea492ebd1da1ef2dc8db5b2b34e277dce/src/Appwrite/Platform/Tasks/Screenshot.php#L121-L157","documentation":"Error \"Failed to create project\" thrown in appwrite/appwrite.","triggerScenarios":"Thrown at src/Appwrite/Platform/Tasks/Screenshot.php:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the error JSON logged above for the API response (status code and message) to see why project creation was rejected.","Verify the Appwrite server is reachable at the configured endpoint and that your console session is still valid; re-run the task to get a fresh session.","Confirm the organization was created successfully in the previous step, since the project requires a valid teamId."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a1d520eea492ebd1da1ef2dc8db5b2b34e277dce","analyzedAt":"2026-08-18T21:34:56.994Z","contentChangedAt":"2026-08-18T21:34:56.994Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}