sdk-for-cli icon indicating copy to clipboard operation
sdk-for-cli copied to clipboard

🐛 Bug Report: Server Error when runing appwrite init project

Open FatahChan opened this issue 1 year ago • 2 comments

👟 Reproduction steps

  1. run appwrite login
  2. enter email and password
  3. run appwrite init project
  4. select defaults

👍 Expected behavior

Project initiated

👎 Actual Behavior

Server Error

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

appwrite-cli: 5.0.5

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

FatahChan avatar Jun 28 '24 08:06 FatahChan

running with --verbose returns

AppwriteException [Error]: Server Error
    at Client.call (C:\Users\Storm\AppData\Roaming\nvm\v22.2.0\node_modules\appwrite-cli\lib\client.js:197:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async teamsCreate (C:\Users\Storm\AppData\Roaming\nvm\v22.2.0\node_modules\appwrite-cli\lib\commands\teams.js:107:16)
    at async initProject (C:\Users\Storm\AppData\Roaming\nvm\v22.2.0\node_modules\appwrite-cli\lib\commands\init.js:33:20) {
  code: 500,
  response: 'general_unknown'
}
✗ Error Server Error

FatahChan avatar Jun 28 '24 09:06 FatahChan

It seems like the issue was this line in ./lib/sdks:49 Removing the line .setProject("console")

Fixed the issue, also seems very confusing that teams === organization

I might do a pull request later on

FatahChan avatar Jul 01 '24 17:07 FatahChan

@FatahChan thanks for pointing this issue. and yes you were exactly right in finding that removing console project would have solved the issue.

but the deeper problem was using a separate endpoint (organizations) all together for cloud projects, which we recently fixed here - https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/organizations.js

ChiragAgg5k avatar May 02 '25 12:05 ChiragAgg5k