Back

500 server error when clicking on project in web interface.

  • 0
  • General
  • Web
Drake
10 Mar, 2023, 22:18

ya...that lines up with 1.0.1...

TL;DR
User is experiencing a 500 server error when clicking on a project in the web interface. They have been trying different solutions and updating their keys attributions, but the issue persists. They are considering spinning up a new version or taking a snapshot of their VM. A possible solution suggested is to try running the following command: ``` docker-compose -f /docker/docker-compose2.yml exec appwrite migrate version=1.0.3 ```
jadechessink
10 Mar, 2023, 22:18

did i miss a migration step in there somewhere?

Drake
10 Mar, 2023, 22:19

my keys attributes is:

Drake
10 Mar, 2023, 22:19
TypeScript
[
    {
        "$id": "projectId",
        "type": "string",
        "size": 255,
        "required": false,
        "signed": true,
        "array": false,
        "filters": []
    },
    {
        "$id": "name",
        "type": "string",
        "size": 255,
        "required": true,
        "signed": true,
        "array": false,
        "filters": []
    },
    {
        "$id": "scopes",
        "type": "string",
        "size": 255,
        "required": true,
        "signed": true,
        "array": true,
        "filters": []
    },
    {
        "$id": "secret",
        "type": "string",
        "size": 512,
        "required": true,
        "signed": true,
        "array": false,
        "filters": [
            "encrypt"
        ]
    },
    {
        "$id": "projectInternalId",
        "key": "projectInternalId",
        "type": "string",
        "size": 255,
        "required": false,
        "default": null,
        "signed": true,
        "array": false,
        "format": "",
        "formatOptions": [],
        "filters": []
    },
    {
        "$id": "expire",
        "key": "expire",
        "type": "datetime",
        "size": 0,
        "required": false,
        "default": null,
        "signed": false,
        "array": false,
        "format": "",
        "formatOptions": [],
        "filters": [
            "datetime"
        ]
    },
    {
        "$id": "accessedAt",
        "key": "accessedAt",
        "type": "datetime",
        "size": 0,
        "required": false,
        "default": null,
        "signed": false,
        "array": false,
        "format": "",
        "formatOptions": [],
        "filters": [
            "datetime"
        ]
    },
    {
        "$id": "sdks",
        "key": "sdks",
        "type": "string",
        "size": 255,
        "required": true,
        "default": null,
        "signed": true,
        "array": true,
        "format": "",
        "formatOptions": [],
        "filters": []
    }
]
Drake
10 Mar, 2023, 22:19

you can see it has sdks

Drake
10 Mar, 2023, 22:21

if you were on 1.0.1, you shouldn't have missed any migration step....it makes no sense why your attributes metadata is missing some attributes...

jadechessink
10 Mar, 2023, 22:21

i see, mine is missing SDK

jadechessink
10 Mar, 2023, 22:22

ok, it sounds like i should probly spin up a new version

jadechessink
10 Mar, 2023, 22:22

and my issue is due to missing attributes in the metadata

Drake
10 Mar, 2023, 22:25

ideally, yes...but we can try to fix...

Drake
10 Mar, 2023, 22:25

how have you been doing the migration? what exact command?

jadechessink
10 Mar, 2023, 22:26

i feel bad for taking up so much of your time as it is, i really appreciate you being willing to help me out with this issue.

jadechessink
10 Mar, 2023, 22:26

docker-compose -f /docker/docker-compose2.yml exec appwrite migrate

Drake
10 Mar, 2023, 22:35

kk you can try backing up your data (so you can rollback if something goes wrong) and then run...

TypeScript
docker-compose -f /docker/docker-compose2.yml exec appwrite migrate version=1.0.3
jadechessink
10 Mar, 2023, 22:36

absolutely, fortunately this is on a VM, so i will take a snapshot and run that shortly

jadechessink
10 Mar, 2023, 22:40

Ok, migrate has completed

jadechessink
10 Mar, 2023, 22:41

i checked the attributes by running: docker exec -it appwrite-mariadb sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select * from _console__metadata where name = \"keys\";"' and it still does not show sdk

Drake
10 Mar, 2023, 22:42

what was the output?

jadechessink
10 Mar, 2023, 22:43

here you are

Drake
10 Mar, 2023, 22:48
TypeScript
Migrating Collection "keys"
[PDO] MySQL connection restarted
'accessedAt' from keys: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'accessedAt'
[PDO] MySQL connection restarted
'sdks' from keys: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sdks'

😑

jadechessink
10 Mar, 2023, 22:48

lol

Drake
10 Mar, 2023, 22:50

i guess you could manually try to update your keys attributes to be this

Drake
10 Mar, 2023, 22:50

and then you may need to restart the appwrite container

jadechessink
10 Mar, 2023, 22:52

ok, i can look into that, im hopeless when it comes to DB which is why im using appwrite

jadechessink
10 Mar, 2023, 22:52

but i will give that a try and let you know the results

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more