From 5ca30d37f7cc42abf3bb47273191600577ee0de8 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 24 Mar 2026 21:36:32 +1300 Subject: [PATCH] (fix): tolerate console signup restriction in installer account creation --- src/Appwrite/Platform/Tasks/Install.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/Install.php b/src/Appwrite/Platform/Tasks/Install.php index bc0547379f..b814e5f0fa 100644 --- a/src/Appwrite/Platform/Tasks/Install.php +++ b/src/Appwrite/Platform/Tasks/Install.php @@ -658,8 +658,9 @@ class Install extends Action messageOverride: 'Creating Appwrite account' ); - // Create the account — tolerate "already exists" so we can still - // create a session (common when re-running the installer). + // Create the account — tolerate "already exists" and "console + // is restricted" errors so we can still create a session + // (common when re-running the installer or upgrading). $userId = null; try { $userId = $this->makeApiCall('/v1/account', [ @@ -669,7 +670,10 @@ class Install extends Action 'name' => $name ], false, $apiUrl, $domain); } catch (\Throwable $e) { - if (\stripos($e->getMessage(), 'already exists') === false) { + $message = $e->getMessage(); + $accountExists = \stripos($message, 'already exists') !== false + || \stripos($message, 'console is restricted') !== false; + if (!$accountExists) { throw $e; } }