-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
appwrite/sdk-generator
#660Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
👟 Reproduction steps
Run:
appwrite users create --verbose \
--userId john \
--name John \
--email 'john@example.com' \
--password 'Password123'👍 Expected behavior
The user creates successfully without errors
👎 Actual Behavior
The user is created, but an error occurs:
$ appwrite users create --verbose \
--userId johm \
--name John \
--email 'john@example.com' \
--password 'Password123'
$id : john
$createdAt : 2023-04-19T19:21:31.060+00:00
$updatedAt : 2023-04-19T19:21:31.060+00:00
name : John
password : $argon2id$v=19$m=65536,t=4,p=3$T3JlY1MuMVJhQ2o1d3k0NA$0uoV2bq2atv1SHW+GnWZaHeg+rOguKGXq5ICTPq0SN0
hash : argon2
TypeError: Cannot read properties of undefined (reading 'name')
at parse (/Users/steven/.nvm/versions/node/v16.16.0/lib/node_modules/appwrite-cli/lib/parser.js:26:52)
at usersCreate (/Users/steven/.nvm/versions/node/v16.16.0/lib/node_modules/appwrite-cli/lib/commands/users.js:87:9)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
✗ Error Cannot read properties of undefined (reading 'name')
using json output works fine:
$ appwrite users create --verbose --json \
--userId john \
--name John \
--email 'john@example.com' \
--password 'Password123'
{
"$id": "john",
"$createdAt": "2023-04-19T19:25:31.168+00:00",
"$updatedAt": "2023-04-19T19:25:31.168+00:00",
"name": "John",
"password": "$argon2id$v=19$m=65536,t=4,p=3$T3AxVFJSTVJuc3p2TjFPZA$o7ux4HCf/SIVHfSmnb4la3hz9Ob/7JVyiiSoeXTU/7A",
"hash": "argon2",
"hashOptions": {
"type": "argon2",
"memoryCost": 2048,
"timeCost": 4,
"threads": 3
},
"registration": "2023-04-19T19:25:31.167+00:00",
"status": true,
"passwordUpdate": "2023-04-19T19:25:31.167+00:00",
"email": "john@example.com",
"phone": "",
"emailVerification": false,
"phoneVerification": false,
"prefs": {}
}
✓ SuccessIt seems like the parser fails on hashOptions here:
Line 26 in b461997
| if (data[key] && data[key].constructor.name === 'BigNumber') { |
🎲 Appwrite version
Version 1.3.x
💻 Operating system
Linux
🧱 Your Environment
Used CLI version 2.0.2
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed