Skip to content

[Self-hosting Docker] Error after register #721

@lonagi

Description

@lonagi

Description

Error: Application error: a server-side exception has occurred (see the server logs for more information).
Digest: 3993666134

Image

I check in db. all tables are ok. and videos.id exists

Reproduction

Just after first login using email on self-hosted docker see error in cap-web logs

Additional Context

  • Cap version: Latest docker image
  • Operating system, version: Debian
memberButNotOwner []
isMemberOfOrganization false
Error: Unknown column 'videos.id' in 'where clause'
    at n.execute (/app/apps/web/.next/server/chunks/9868.js:23:60430)
    at /app/apps/web/.next/server/chunks/9868.js:23:65769
    at fetch (/app/apps/web/.next/server/chunks/9113.js:1:607)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async w (/app/apps/web/.next/server/chunks/6270.js:1:3645)
    at async S.execute (/app/apps/web/.next/server/chunks/6270.js:1:2708) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sql: "select `videos`.`id`, `videos`.`ownerId`, `videos`.`name`, `videos`.`createdAt`, `videos`.`metadata`, COUNT(DISTINCT CASE WHEN `comments`.`type` = 'text' THEN `comments`.`id` END), COUNT(DISTINCT CASE WHEN `comments`.`type` = 'emoji' THEN `comments`.`id` END), \n" +
    '        COALESCE(\n' +
    '          JSON_ARRAYAGG(\n' +
    '            JSON_OBJECT(\n' +
    "              'id', `organizations`.`id`,\n" +
    "              'name', `organizations`.`name`,\n" +
    "              'iconUrl', `organizations`.`iconUrl`\n" +
    '            )\n' +
    '          ),\n' +
    '          JSON_ARRAY()\n' +
    '        )\n' +
    '      , \n' +
    '        COALESCE(\n' +
    '          (\n' +
    '            SELECT JSON_ARRAYAGG(\n' +
    '              JSON_OBJECT(\n' +
    "                'id', s.id,\n" +
    "                'name', s.name,\n" +
    "                'organizationId', s.organizationId,\n" +
    "                'iconUrl', s.iconUrl,\n" +
    "                'isOrg', s.isOrg\n" +
    '              )\n' +
    '            )\n' +
    '            FROM (\n' +
    '              -- Include spaces where the video is directly added via space_videos\n' +
    '              SELECT DISTINCT \n' +
    '                s.id, \n' +
    '                s.name, \n' +
    '                s.organizationId, \n' +
    '                o.iconUrl as iconUrl,\n' +
    '                FALSE as isOrg\n' +
    '              FROM space_videos sv\n' +
    '              JOIN spaces s ON sv.spaceId = s.id\n' +
    '              JOIN organizations o ON s.organizationId = o.id\n' +
    '              WHERE sv.videoId = `videos`.`id`\n' +
    '              \n' +
    '              UNION\n' +
    '              \n' +
    '              -- For organization-level sharing, include the organization details\n' +
    '              -- and mark it as an organization with isOrg=TRUE\n' +
    '              SELECT DISTINCT \n' +
    '                o.id as id, \n' +
    '                o.name as name, \n' +
    '                o.id as organizationId, \n' +
    '                o.iconUrl as iconUrl,\n' +
    '                TRUE as isOrg\n' +
    '              FROM shared_videos sv\n' +
    '              JOIN organizations o ON sv.organizationId = o.id\n' +
    '              WHERE sv.videoId = `videos`.`id`\n' +
    '            ) AS s\n' +
    '          ),\n' +
    '          JSON_ARRAY()\n' +
    '        )\n' +
    '      , `users`.`name`, \n' +
    '        COALESCE(\n' +
    "          JSON_UNQUOTE(JSON_EXTRACT(`videos`.`metadata`, '$.customCreatedAt')),\n" +
    '          `videos`.`createdAt`\n' +
    '        )\n' +
    "      , IF(`videos`.`password` IS NULL, 0, 1) from `videos` left join `comments` on `videos`.`id` = `comments`.`videoId` left join `shared_videos` on `videos`.`id` = `shared_videos`.`videoId` left join `organizations` on `shared_videos`.`organizationId` = `organizations`.`id` left join `users` on `videos`.`ownerId` = `users`.`id` where `videos`.`ownerId` = '7gg3fnvpcn89grd' group by `videos`.`id`, `videos`.`ownerId`, `videos`.`name`, `videos`.`createdAt`, `videos`.`metadata`, `users`.`name` order by COALESCE(\n" +
    "      JSON_UNQUOTE(JSON_EXTRACT(`videos`.`metadata`, '$.customCreatedAt')),\n" +
    '      `videos`.`createdAt`\n' +
    '    ) desc limit 15',
  sqlState: '42S22',
  sqlMessage: "Unknown column 'videos.id' in 'where clause'",
  digest: '3993666134'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions