Rank 1: Thread
Nothing...
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 1: Thread
Nothing...
Rank 1: Thread
+--------------------+------------------+------+-----+---------+----------------+
| 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/shCONTAINER=appwrite-mariadbPROJECT=<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\";"' -- $PROJECTand then the last thing to check is your cache:
CONTAINER=appwrite-redisPROJECT=<YOUR INTERNAL PROJECT ID>FUNCTION=<YOUR FUNCTION ID IN APPWRITE>
docker exec -it $CONTAINER redis-cli get "cache-_$PROJECT:functions:$FUNCTION:*"Rank 1: Thread
| _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":[]}] |
Rank 1: Thread
"{\"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\"}}"
Rank 1: Thread
@Steven I think I found the error: in redis vars it has null value but must be an empty array
Rank 1: Thread
Rank 1: Thread
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/shCONTAINER=appwrite-mariadbPROJECT=<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\";"' -- $PROJECTRank 1: Thread
Yes!
Rank 1: Thread
what the heck? that looks really weird...this is probably the problem...the filters for vars is also incorrect...
Rank 1: Thread
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.3Rank 1: Thread
It wokrs! Thank you for your time and patience!
HUZZAHH! 🎉
Rank 1: Thread
[SOLVED] 500 Internal error when I try to access the function settings page
Rank 1: Thread
For reminder and to help other users to fix:
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=
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