Back

Errors after upgrading to 1.4.6

  • 0
  • General
  • Self Hosted
kathelia.dokgu
20 Oct, 2023, 18:05

I few hours ago I upgraded Appwrite to 1.4.6 from 1.4.5 and I have been getting two errors reported by Sentry. I followed the steps in https://appwrite.io/docs/advanced/self-hosting/update an also ran the migrate command.

First error only occurred once:

TypeScript
Invalid document structure: Missing required attribute "userInternalId": None
  File "/usr/src/code/vendor/utopia-php/audit/src/Audit/Audit.php", line 179, in createDocument
  File "/usr/src/code/vendor/utopia-php/database/src/Database/Validator/Authorization.php", line 166, in Utopia\Audit\{closure}
  File "/usr/src/code/vendor/utopia-php/audit/src/Audit/Audit.php", line 181, in skip
  File "/usr/src/code/src/Appwrite/Platform/Workers/Audits.php", line 78, in log
  File "/usr/src/code/src/Appwrite/Platform/Workers/Audits.php", line 31, in action
...
(3 additional frame(s) were not displayed)

The second error seems to be occurring every now and then:

TypeScript
Pool 'cache_redis_main' is empty (size 10): None
  File "/usr/src/code/app/worker.php", line 115, in pop
  File "/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php", line 99, in {closure}
  File "/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php", line 119, in getResource
  File "/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php", line 99, in getResources
  File "/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php", line 379, in getResource
...
(3 additional frame(s) were not displayed)

Any ideas on how to fix these errors?

TL;DR
Error 1: "Invalid document structure: Missing required attribute "userInternalId"" - This error occurred after upgrading to version 1.4.6. - The error is related to the `createDocument` function in the `Audit.php` file. - It is possibly caused by a missing required attribute "userInternalId". - No solution provided in the support thread. Error 2: "Pool 'cache_redis_main' is empty (size 10)" - This error also occurred after upgrading to version 1.4.6. - The error is related to the `pop` function in the `worker.php` file
Drake
20 Oct, 2023, 18:21

Invalid document structure: Missing required attribute "userInternalId": None

Did you run the migrate command when you were on 1.3.8?

Drake
20 Oct, 2023, 18:21

Pool 'cache_redis_main' is empty (size 10): None

What container does this happen in?

kathelia.dokgu
20 Oct, 2023, 18:34

Yes I tend to always run the migrate command for any upgrades that I do. Should I avoid running it if it's only a patch update?

kathelia.dokgu
20 Oct, 2023, 18:36

I can't look at the container right now but here's what Sentry shows, does this help?

Drake
20 Oct, 2023, 23:02

is there anything else in there that would say which container that was from? we have a lot of workers

kathelia.dokgu
21 Oct, 2023, 02:27

Do you have a command that you would like me to run on the VM? I'm honestly not sure how to give you the information you need.

Drake
21 Oct, 2023, 02:28

I meant in sentry. Is there a stacktrace or any other labels?

kathelia.dokgu
21 Oct, 2023, 02:43
TypeScript
[
    {
        args: [],
        class: 'Utopia\\Pools\\Pool',
        file: '/usr/src/code/app/worker.php',
        function: 'pop',
        line: 115,
        type: '->'
    },
    { args: [{}], file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php', function: '{closure}', line: 99 },
    {
        args: ['cache'],
        class: 'Utopia\\Queue\\Server',
        file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php',
        function: 'getResource',
        line: 119,
        type: '->'
    },
    {
        args: [['cache', 'register', 'message', 'dbForConsole']],
        class: 'Utopia\\Queue\\Server',
        file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php',
        function: 'getResources',
        line: 99,
        type: '->'
    },
    {
        args: ['dbForProject'],
        class: 'Utopia\\Queue\\Server',
        file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php',
        function: 'getResource',
        line: 379,
        type: '->'
    },
    ...
kathelia.dokgu
21 Oct, 2023, 02:44
TypeScript
...
                resource: 'database/.../collection/.../document/...',
                user: {
                    $collection: 'users',
                    $createdAt: '...',
                    $id: '...',
                    $internalId: '17',
                    $permissions: '["read(\\"any\\")","update(\\"user:...\\")","delete(\\"user:...\\")"]',
                    $updatedAt: '..',
                    accessedAt: null,
                    email: '...',
                    emailVerification: true,
                    hash: 'argon2',
                    hashOptions: '{"memoryCost":2048,"threads":3,"timeCost":4,"type":"argon2"}',
                    labels: '[]',
                    memberships: '[...]',
                    name: '...',
                    password: '...',
                    passwordHistory: '[]',
                    passwordUpdate: '...',
                    phone: null,
                    phoneVerification: null,
                    prefs: '...',
                    registration: '...',
                    reset: false,
                    search: '... ... ...',
                    sessions: '[...]',
                    status: true,
                    tokens: '[]'
                },
                userAgent: '...'
            }
        ],
        class: 'Utopia\\Queue\\Server',
        file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php',
        function: 'getArguments',
        line: 248,
        type: '->'
    },
    { args: ['0'], class: 'Utopia\\Queue\\Server', function: 'Utopia\\Queue\\{closure}', type: '->' },
    {
        args: [{}, '0'],
        file: '/usr/src/code/vendor/utopia-php/queue/src/Queue/Adapter/Swoole.php',
        function: 'call_user_func',
        line: 37
    }
];
kathelia.dokgu
21 Oct, 2023, 02:45

I had to remove a lot of sensitive info but I hope this helps.

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