When a function setting is changed (like for example the function name) the servers returns a 500.
The "appwrite" containers print the following error:
appwrite | http.request · 169.5ms · 50a9ce27
appwrite |
appwrite | level error
appwrite | http.method PUT
appwrite | http.path /v1/functions/:functionId
appwrite | http.response.code 500
appwrite |
appwrite | Utopia\Database\Exception\Structure: Invalid document structure: Unknown attribute: "providerBranches"
appwrite | at /usr/src/code/vendor/utopia-php/database/src/Database/Database.php:6346
appwrite | at /usr/src/code/vendor/utopia-php/database/src/Database/Adapter.php:432
appwrite | at /usr/src/code/vendor/utopia-php/database/src/Database/Adapter/Pool.php:169
appwrite | at /usr/src/code/vendor/utopia-php/pools/src/Pools/Pool.php:229
appwrite | ... 10 more
appwrite |
appwrite | ────────────────────────────────────────────────────────────
<@262572967358234634> try running
docker compose exec redis redis-cli FLUSHALL docker compose restart appwrite appwrite-worker-deletes appwrite-worker-databases
Nothing changed
did command run successfully?
its likely there is a _APP_REDIS_HOST mistmatch?
Commands were success full, redis host is redis
can u confirm the attribute exists in db schema?
while testing 1.9.5 for myself, i also went into the issue after upgrading from 1.9.0 (not fresh 1.9.5 install, there is no issue with fresh installs)
the migrations process shows this on first run :
small question, when updating the mariadb, do you do one UPDATE/INSERT for all the attributes or is it one per attribute ?
for example in 1.9.0 i think deploymentRetention already exists as i was using it, and so the command might fail since that deploymentRetention exists but not providerBranches ? which result in a missing providerBranches at the end ?
also to anwser this, no providerBranches doesn't exist in the db for me
also providerPaths doesn't too
Can you share the command you used to check if the attribute is there please? I tried a few, returned nothing, could be an indication that it is missing
you can check with :
-- Verification (adjust prefix _1_ if you have multiple projects)
SELECT name,
JSON_SEARCH(attributes, 'one', 'providerBranches', NULL, '$[*]."$id"') AS provider_branches_attr,
JSON_SEARCH(attributes, 'one', 'providerPaths', NULL, '$[*]."$id"') AS provider_paths_attr
FROM _1__metadata
WHERE name IN ('functions', 'sites');
SHOW COLUMNS FROM _1_functions LIKE 'provider%';
SHOW COLUMNS FROM _1_sites LIKE 'provider%';
and also here is a script that should fix everything :
also example on how to run it inside the mariadb container : mariadb -u<user> -p<password> <db_name> < scripts/repair-1.9.5-migration.sql (replace the <...> with your values, the username and password don't have space between the key and the value)
also forgot to say but you need to flush the redis cache after the script
did it work for you <@145890130496847872> ? since i saw your reaction ?
Haven't tried it yet, currently having lunch
oh ok ok
good lunch then 😉
Thanks!
other thing, it also afect sites, not only functions, the script fix both, but still worth mentioning
It worked, told claude code to do all of it because I didn't have time, but after running the script and doing the redis flush and restart of the containers I succesfully managed to create a site from the web
Big thanks <@493852865907916800> ❤️
nice, happy that it worked 🙂
tysm, it also worked for me
Recommended threads
- How to disable appwrite/embedding from s...
Hi everyone! I'm currently running a self-hosted instance of Appwrite. For my current use case, I don't need the AI/embedding features, and I noticed the `app...
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Git connection is not working anymore on...
Hello all, I updated from 1.8.1 to 1.9.0 then 1.9.5. All seems to work even the Github connection. In Git configuration I see my Github user but when trying to...