[SOLVED] 500 Internal error when I try to access the function settings page
- 0
- Resolved
- Functions
Nothing...
+--------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+------------------+------+-----+---------+----------------+
| _id | int(11) unsigned | NO | PRI | NULL | auto_increment |
| _uid | char(255) | NO | UNI | NULL | |
| _createdAt | datetime(3) | YES | MUL | NULL | |
| _updatedAt | datetime(3) | YES | MUL | NULL | |
| _permissions | mediumtext | YES | | NULL | |
| functionInternalId | varchar(255) | YES | MUL | NULL | |
| functionId | varchar(255) | YES | | NULL | |
| key | varchar(255) | YES | MUL | NULL | |
| value | varchar(8192) | YES | | NULL | |
| search | text | YES | MUL | NULL | |
+--------------------+------------------+------+-----+---------+----------------+
ok that looks fine. How about:
#!/bin/sh
CONTAINER=appwrite-mariadb
PROJECT=<YOUR PROJECT>
docker exec -it $CONTAINER sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select _permissions, documentSecurity, attributes FROM _$1__metadata where _uid = \"variables\";"' -- $PROJECT
and then the last thing to check is your cache:
CONTAINER=appwrite-redis
PROJECT=<YOUR INTERNAL PROJECT ID>
FUNCTION=<YOUR FUNCTION ID IN APPWRITE>
docker exec -it $CONTAINER redis-cli get "cache-_$PROJECT:functions:$FUNCTION:*"
| _permissions | documentSecurity | attributes
| ["create(\"any\")"] | 1 | [{"$id":"functionInternalId","type":"string","size":255,"required":false,"signed":true,"array":false,"filters":[]},{"$id":"functionId","type":"string","size":255,"required":false,"signed":true,"array":false,"filters":[]},{"$id":"key","type":"string","size":255,"required":false,"signed":true,"array":false,"filters":[]},{"$id":"value","type":"string","size":8192,"required":true,"signed":true,"array":false,"filters":["encrypt"]},{"$id":"search","type":"string","size":16384,"required":false,"signed":true,"array":false,"filters":[]}] |
"{\"time\":1683717111,\"data\":{\"execute\":[\"team:6267a31756342200796f\"],\"name\":\"NodeMailer\",\"dateCreated\":null,\"dateUpdated\":null,\"runtime\":\"node-16.0\",\"deployment\":\"642d748d604f5729eeba\",\"vars\":null,\"events\":[],\"schedule\":\"\",\"schedulePrevious\":null,\"scheduleNext\":null,\"timeout\":15,\"search\":\"642d4aa17a6fe52bd45d NodeMailer node-16.0\",\"scheduleUpdatedAt\":\"2023-04-05T13:15:57.322+00:00\",\"enabled\":true,\"$id\":\"642d4aa17a6fe52bd45d\",\"$internalId\":\"13\",\"$createdAt\":\"2023-04-05T10:17:05.501+00:00\",\"$updatedAt\":\"2023-04-05T13:16:09.044+00:00\",\"$permissions\":[],\"$collection\":\"functions\"}}"
@Steven I think I found the error: in redis vars it has null value but must be an empty array
But if I delete the redis data, the value of vars returns null when it is inserted again in redis
Awesome! This is a step forward! Now...let me see how/why it's going in as null. It should be going in as an empty array...
Are you just viewing the function and then the data gets inserted into redis?
actually...this looks a little different for me...mine looks like this for the attributes:
[
{
"$id": "functionInternalId",
"type": "string",
"size": 255,
"required": false,
"signed": true,
"array": false,
"filters": [],
"default": null,
"format": ""
},
{
"$id": "functionId",
"type": "string",
"size": 255,
"required": false,
"signed": true,
"array": false,
"filters": [],
"default": null,
"format": ""
},
{
"$id": "key",
"type": "string",
"size": 255,
"required": false,
"signed": true,
"array": false,
"filters": [],
"default": null,
"format": ""
},
{
"$id": "value",
"type": "string",
"size": 8192,
"required": true,
"signed": true,
"array": false,
"filters": ["encrypt"],
"default": null,
"format": ""
},
{
"$id": "search",
"type": "string",
"size": 16384,
"required": false,
"signed": true,
"array": false,
"filters": [],
"default": null,
"format": ""
}
]
What's this output for you?
#!/bin/sh
CONTAINER=appwrite-mariadb
PROJECT=<YOUR PROJECT>
docker exec -it $CONTAINER sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select _permissions, documentSecurity, attributes FROM _$1__metadata where _uid = \"functions\";"' -- $PROJECT
Yes!
what the heck? that looks really weird...this is probably the problem...the filters for vars is also incorrect...
Uhm... How i fix this?
so you might be able to fix this by running a previous migration. make sure to take a backup first just in case. then you can run:
docker compose exec appwrite migrate version=1.0.3
It wokrs! Thank you for your time and patience!
HUZZAHH! 🎉
[SOLVED] 500 Internal error when I try to access the function settings page
For reminder and to help other users to fix:
- upgrade from Appwrite 1.3.1 to Appwrite 1.3.4
- run migration command (docker compose exec appwrite migrate)
- run migration command (docker compose exec appwrite migrate version=1.0.3)
- enjoy Appwrite!
Hi everyone, I'm sure there is already documentation but unfortunately I can't find it. How can I access my mariaDB in my appwrite docker container via MySQLWorkbench or tabelPlus tool or similar SQL tools? THX
i got the answer above:
#!/bin/sh CONTAINER=appwrite-mariadb PROJECT=<YOUR PROJECT>
docker exec -it $CONTAINER sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select _permissions, documentSecurity, attributes FROM _$1__metadata where _uid = functions;"' -- $PROJECT
What is the root password and whats the database-name? Is project important?
please create a new post instead of posting in an old thread
Recommended threads
- Timed out waiting for runtime error
execution id 6a3e0791978712d81ee0 im having issue with appwrite function runtime performance. even after 4gbram and cpu same function sometimes completes in a...
- Function crash first run after a while
Big issue I’m facing , almost all functions crash or run for a very long time the first time i run them after a long time without running them I have a “help-c...
- Function global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...