You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
URGENT! Missing required attribute "emailCanonical" After update to 1.9.0 #11906
Upgrade Appwrite from an older version (e.g. 1.8.x) to 1.9.0 using Docker
Do not run or fail to complete appwrite migrate (migration fails or partially runs)
Open Appwrite Console or use SDK
Attempt to create a new user (email + password)
Observe error during user creation
👍 Expected behavior
User should be created successfully, with all required attributes automatically handled by Appwrite (including emailCanonical).
👎 Actual Behavior
Missing required attribute "emailCanonical"
In some cases also appears as:
Attribute not found: emailCanonical
Invalid document structure: emailCanonical
🎲 Appwrite version
Version 1.8.x
💻 Operating system
Linux
🧱 Your Environment
Your Environment
Self-hosted Appwrite via Docker Compose
Upgrade performed from older version (1.8.x) to 1.9.0
Migration attempted but initially failed due to infrastructure issues (DNS / Redis / disk full)
After system recovery, migration state appears inconsistent
Using Appwrite Console + SDK (React Native / Web)
👀 Have you spent some time to check if this issue has been raised before?
The root cause is an incomplete database migration — specifically, the emailCanonical attribute never gets added to the users collection if migration fails midway (due to disk full, Redis issues, DNS problems, etc.).
Fix that worked:
Step 1 — Make sure your system is healthy first (disk space, Redis running, DNS resolving)
Step 2 — Run migration manually:
bashdocker compose down
docker compose up -d appwrite
docker compose exec appwrite migrate
Let it complete fully without interruption.
Step 3 — Restart all services:
bashdocker compose down
docker compose up -d
Step 4 — If migration still fails, check logs:
bashdocker compose logs appwrite | grep -i "migrat."
Then try:
bashdocker compose exec appwrite migrate --force
This should resolve the Missing required attribute 'emailCanonical" error completely.
Hope this helps others hitting the same issue after upgrading! 🙌
http.method POST
http.path /v1/users
http.response.code 500
level error
Utopia\Database\Exception\Structure: Invalid document structure: Unknown attribute: "emailCanonical"
at /usr/src/code/vendor/utopia-php/database/src/Database/Database.php:5583
at /usr/src/code/app/controllers/api/users.php:173
at /usr/src/code/app/controllers/api/users.php:262
at /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php:677
... 4 more
Hey @GenGraphic -your latest error (Unknown attribute: emailCanonical) is slightly different from a missing attribute. It means migration ran but the attribute wasn't registered in the collection schema properly.
If re-running migration doesn't help, try this manual fix:
Option 1 - Via Appwrite Console:
Go to Databases → _system → users collection
Check if emailCanonical attribute exists
If missing, add it manually as a string attribute (size: 255, required: false)
Restart services: `docker compose down && docker compose up -d '
Option 3 - Check if you're running the right image:
docker compose images | grep appwrite
Make sure it shows 1.9.0 and not a cached older image. Sometimes, docker compose pull is needed before upgrading.
Root cause: Appwrite 1.9.0 introduced emailCanonical for case-insensitive email lookups. If the migration worker crashed or was interrupted even once, this attribute silently gets skipped in schema registration.
Thanks again for your support, but this was not helping. I got the same error with both options you gave.
The result of docker compose exec appwrite doctor:
`[Settings]
🟢 Hostname is valid (api.gengraphic.de)
🟢 CNAME record target is valid (api.gengraphic.de)
🟢 A record target is valid (159.69.215.118)
🔴 AAAA record target is not valid ()
🟢 Using a unique secret key for encryption
🟢 App environment is set for production
🟢 Abuse protection is enabled
🟢 Console access limits are enabled
🟢 HTTPS force option is enabled
🟢 HTTPS force option is enabled for function/site domains
🔴 Logging adapter is misconfigured
Warning: foreach() argument must be of type array|object, null given in /usr/src/code/src/Appwrite/Platform/Tasks/Doctor.php on line 178
🟢 PubSub(pubsub)....................................connected
🟢 SMTP..............................................connected
[Volumes]
🟢 Uploads Volume is readable
🟢 Uploads Volume is writeable
🟢 Cache Volume is readable
🟢 Cache Volume is writeable
🟢 Config Volume is readable
🟢 Config Volume is writeable
🟢 Certs Volume is readable
🟢 Certs Volume is writeable
[Disk Space]
🟢 Uploads Volume has 139.79GB free space (33.76% used)
🟢 Cache Volume has 139.79GB free space (33.76% used)
🟢 Config Volume has 139.79GB free space (33.76% used)
🟢 Certs Volume has 139.79GB free space (33.76% used)
The problem is that you can't roll-back now. Once you run migration with 1.9.0.
Fortunately for me, the project that I'm working on is in development mode atm, so I can just backup database schema and then clean install it with version 1.8.0
After spending more than an hour with fresh installed 1.8.0 and trying to downgrade 1.9.0's json for 1.8.0 for tables with claude and chatgpt, I now end up removing 1.8.0 and fresh install 1.9.0 and then restore tables from backup.
This time I was successfully able to register account without having to do anything in api.
So, I can confirm that this issues is being caused by migration.
Fresh install of 1.9.0 works great.
Hi Appwrite team, I’d like to work on this issue if it’s available.
From a first pass through 1.9.x, this looks like an upgrade/migration consistency problem rather than a fresh-install schema problem. The current users collection schema includes:
emailCanonical
emailIsFree
emailIsDisposable
emailIsCorporate
emailIsCanonical
These fields are added in src/Appwrite/Migration/Version/V23.php, but src/Appwrite/Migration/Version/V24.php only adds the newer impersonator field for users. Since user creation/update now writes emailCanonical, an instance that reached 1.9.x with an incomplete/skipped V23 users migration can keep failing with Unknown attribute: "emailCanonical" even when rerunning the 1.9.x migration.
Proposed fix, if maintainers agree:
make the 1.9.x migration defensively repair the missing user email metadata attributes before user writes depend on them;
keep the operation idempotent, following existing migration patterns that catch duplicate/structure errors and purge the collection cache;
add/adjust a focused migration test if there is an existing practical test hook for this path.
Activity
Ashish5180 commentedon Apr 15, 2026
Hey, @GenGraphic
The root cause is an incomplete database migration — specifically, the emailCanonical attribute never gets added to the users collection if migration fails midway (due to disk full, Redis issues, DNS problems, etc.).
Fix that worked:
Step 1 — Make sure your system is healthy first (disk space, Redis running, DNS resolving)
Step 2 — Run migration manually:
bashdocker compose down
docker compose up -d appwrite
docker compose exec appwrite migrate
Let it complete fully without interruption.
Step 3 — Restart all services:
bashdocker compose down
docker compose up -d
Step 4 — If migration still fails, check logs:
bashdocker compose logs appwrite | grep -i "migrat."
Then try:
bashdocker compose exec appwrite migrate --force
This should resolve the Missing required attribute 'emailCanonical" error completely.
Hope this helps others hitting the same issue after upgrading! 🙌
GenGraphic commentedon Apr 16, 2026
I, thanks for the respose, but i might have beed describing the error wrong, or i get a different error now.
Sync domains tick: 42 domains were updated
[0] /usr/src/code/app/controllers/api/users.php : 173 -> createDocument()
[1] /usr/src/code/app/controllers/api/users.php : 262 -> createUser()
[2] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 677 -> {closure:/usr/src/code/app/controllers/api/users.php:259}()
[3] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 976 -> execute()
[4] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 857 -> runInternal()
[5] /usr/src/code/app/http.php : 551 -> run()
[6] [internal function] : -> {closure:/usr/src/code/app/http.php:513}()
http.request · 142.1ms · 7805aa9e
http.method POST
http.path /v1/users
http.response.code 500
level error
Utopia\Database\Exception\Structure: Invalid document structure: Unknown attribute: "emailCanonical"
at /usr/src/code/vendor/utopia-php/database/src/Database/Database.php:5583
at /usr/src/code/app/controllers/api/users.php:173
at /usr/src/code/app/controllers/api/users.php:262
at /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php:677
... 4 more
────────────────────────────────────────────────────────────
The actual Error :Invalid document structure: Unknown attribute: "emailCanonical"
Ashish5180 commentedon Apr 17, 2026
Hey @GenGraphic -your latest error (
Unknown attribute: emailCanonical) is slightly different from a missing attribute. It means migration ran but the attribute wasn't registered in the collection schema properly.If re-running migration doesn't help, try this manual fix:
Option 1 - Via Appwrite Console:
emailCanonicalattribute existsstringattribute (size: 255, required: false)Option 2 -Force schema sync via CLI:
Option 3 - Check if you're running the right image:
docker compose images | grep appwriteMake sure it shows
1.9.0and not a cached older image. Sometimes,docker compose pullis needed before upgrading.Root cause: Appwrite 1.9.0 introduced
emailCanonicalfor case-insensitive email lookups. If the migration worker crashed or was interrupted even once, this attribute silently gets skipped in schema registration.Hope this helps! 🙌
GenGraphic commentedon Apr 17, 2026
Thanks again for your support, but this was not helping. I got the same error with both options you gave.
The result of docker compose exec appwrite doctor:
`[Settings]
🟢 Hostname is valid (api.gengraphic.de)
🟢 CNAME record target is valid (api.gengraphic.de)
🟢 A record target is valid (159.69.215.118)
🔴 AAAA record target is not valid ()
🟢 Using a unique secret key for encryption
🟢 App environment is set for production
🟢 Abuse protection is enabled
🟢 Console access limits are enabled
🟢 HTTPS force option is enabled
🟢 HTTPS force option is enabled for function/site domains
🔴 Logging adapter is misconfigured
[Connectivity]
🔴 Console.DB.(console)...........................disconnected
🔴 Projects.DB.(database_db_main).................disconnected
🟢 Cache(cache_redis_main)...........................connected
Warning: foreach() argument must be of type array|object, null given in /usr/src/code/src/Appwrite/Platform/Tasks/Doctor.php on line 178
🟢 PubSub(pubsub)....................................connected
🟢 SMTP..............................................connected
[Volumes]
🟢 Uploads Volume is readable
🟢 Uploads Volume is writeable
🟢 Cache Volume is readable
🟢 Cache Volume is writeable
🟢 Config Volume is readable
🟢 Config Volume is writeable
🟢 Certs Volume is readable
🟢 Certs Volume is writeable
[Disk Space]
🟢 Uploads Volume has 139.79GB free space (33.76% used)
🟢 Cache Volume has 139.79GB free space (33.76% used)
🟢 Config Volume has 139.79GB free space (33.76% used)
🟢 Certs Volume has 139.79GB free space (33.76% used)
Failed to check for a newer version
`
Result of docker compose images | grep appwrite:
appwrite appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-browser appwrite/browser 0.3.2 c7f0e7c2b4f6 494MB appwrite-console appwrite/console 7.8.44 3d9aa8ed3a4d 115MB appwrite-mariadb mariadb 10.11 0715561427ab 331MB appwrite-realtime appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-redis redis 7.4.7-alpine e08bd8d5a677 41.4MB appwrite-task-maintenance appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-task-scheduler-executions appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-task-scheduler-functions appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-task-scheduler-messages appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-task-stats-resources appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-traefik traefik 3.6 e861a9b21b12 186MB appwrite-worker-audits appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-builds appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-certificates appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-databases appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-deletes appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-functions appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-mails appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-messaging appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-migrations appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-stats-resources appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-stats-usage appwrite/appwrite 1.9.0 f34258448207 1.3GB appwrite-worker-webhooks appwrite/appwrite 1.9.0 f34258448207 1.3GBDigitalAdeel commentedon Apr 17, 2026
I'm also facing same emailCanonical issue now few days after updating to 1.9.0 when today I tried to use registration(User.Create)
GenGraphic commentedon Apr 17, 2026
The problem is that you can't roll-back now. Once you run migration with 1.9.0.
DigitalAdeel commentedon Apr 17, 2026
Fortunately for me, the project that I'm working on is in development mode atm, so I can just backup database schema and then clean install it with version 1.8.0
GenGraphic commentedon Apr 17, 2026
I have like 12 project running on this server...
DigitalAdeel commentedon Apr 17, 2026
Well, time for me to just accept my fate and clean install 1.8.0
DigitalAdeel commentedon Apr 17, 2026
Done with fresh install, so I hope that this bug gets fixed asap so that you don't have to :)
GenGraphic commentedon Apr 17, 2026
I m still wating for a solution here :))
DigitalAdeel commentedon Apr 17, 2026
After spending more than an hour with fresh installed 1.8.0 and trying to downgrade 1.9.0's json for 1.8.0 for tables with claude and chatgpt, I now end up removing 1.8.0 and fresh install 1.9.0 and then restore tables from backup.
This time I was successfully able to register account without having to do anything in api.
So, I can confirm that this issues is being caused by migration.
Fresh install of 1.9.0 works great.
GenGraphic commentedon Apr 20, 2026
Im still having the issue. Can someone help me?
Dorivika commentedon May 5, 2026
Hi Appwrite team, I’d like to work on this issue if it’s available.
From a first pass through
1.9.x, this looks like an upgrade/migration consistency problem rather than a fresh-install schema problem. The currentuserscollection schema includes:emailCanonicalemailIsFreeemailIsDisposableemailIsCorporateemailIsCanonicalThese fields are added in
src/Appwrite/Migration/Version/V23.php, butsrc/Appwrite/Migration/Version/V24.phponly adds the newerimpersonatorfield forusers. Since user creation/update now writesemailCanonical, an instance that reached 1.9.x with an incomplete/skipped V23 users migration can keep failing withUnknown attribute: "emailCanonical"even when rerunning the 1.9.x migration.Proposed fix, if maintainers agree:
Branch I’d use:
fix-11906-repair-missing-user-email-metadata-migration.Could I be assigned to investigate and open a PR?
H3n-42 commentedon Jun 10, 2026
Running into the same issue.
@abnegate Do you have an Idea for a manual workaround until this gets fixed for 1.9.1?