Coder Social home page Coder Social logo

Comments (7)

jrasm91 avatar jrasm91 commented on July 21, 2024 1

This is a bug with stacked assets which have a circular dependency that we aren't handling. Assets belong to a stack and a stack has a primary asset.

In the short term just unstack all the stacked assets for that user and then it should get deleted.

from immich.

alextran1502 avatar alextran1502 commented on July 21, 2024 1

Fixed in #10642

from immich.

Buco7854 avatar Buco7854 commented on July 21, 2024

Exactly the same here, here are my logs but might not be more helpful. Same thing in the repair section.
For now it happens when I import some file using https://github.com/simulot/immich-go but it might be related to a broader issue.
Might also be related to #8207

[Nest] 7  - 06/25/2024, 10:01:40 PM     LOG [Microservices:UserService] Deleting user: af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 7  - 06/25/2024, 10:01:40 PM    WARN [Microservices:UserService] Removing user from filesystem: upload/library/remi
[Nest] 7  - 06/25/2024, 10:01:40 PM    WARN [Microservices:UserService] Removing user from filesystem: upload/upload/af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 17  - 06/25/2024, 10:01:43 PM     LOG [Api:EventRepository] Websocket Disconnect: Wtci2iBYqJc0lg5wAAAP
[Nest] 17  - 06/25/2024, 10:01:43 PM     LOG [Api:EventRepository] Websocket Connect:    PifiYcOm1URAciyyAAAR
[Nest] 7  - 06/25/2024, 10:01:44 PM    WARN [Microservices:UserService] Removing user from filesystem: upload/profile/af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 7  - 06/25/2024, 10:01:44 PM    WARN [Microservices:UserService] Removing user from filesystem: upload/thumbs/af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 7  - 06/25/2024, 10:01:48 PM    WARN [Microservices:UserService] Removing user from filesystem: upload/encoded-video/af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 7  - 06/25/2024, 10:01:49 PM    WARN [Microservices:UserService] Removing user from database: af47f895-69c8-4893-9f8e-943aae60299b
[Nest] 7  - 06/25/2024, 10:01:49 PM   ERROR [Microservices:JobService] Unable to run job handler (backgroundTask/user-deletion): QueryFailedError: update or delete on table "assets" violates foreign key constraint "FK_91704e101438fd0653f582426dc" on table "asset_stack"
[Nest] 7  - 06/25/2024, 10:01:49 PM   ERROR [Microservices:JobService] QueryFailedError: update or delete on table "assets" violates foreign key constraint "FK_91704e101438fd0653f582426dc" on table "asset_stack"
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DeleteQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/DeleteQueryBuilder.js:52:33)
    at async SubjectExecutor.executeRemoveOperations (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:461:17)
    at async SubjectExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:104:9)
    at async EntityPersistExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/EntityPersistExecutor.js:140:21)
    at async UserService.handleUserDelete (/usr/src/app/dist/services/user.service.js:158:9)
    at async /usr/src/app/dist/services/job.service.js:148:36
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 06/25/2024, 10:01:49 PM   ERROR [Microservices:JobService] Object:
{
  "id": "af47f895-69c8-4893-9f8e-943aae60299b",
  "force": true
}

from immich.

FireBird4 avatar FireBird4 commented on July 21, 2024

I cannot login in with the deleted account to unstack the assets.
And I think I had no stacked assets in that account.

from immich.

Buco7854 avatar Buco7854 commented on July 21, 2024

I deleted them manually in the database, the table is asset_stack.

I tried to look for any stacked asset before starting the account deletion process but i could not see one in the web ui, It can be me that just didnt see them tho.

I'm just preventing immich go to stack image for now -create-stacks=FALSE. But that's kind of a shame.

Still immich is great thanks!

from immich.

jrasm91 avatar jrasm91 commented on July 21, 2024

This should be an easy bug to fix, so I would just continue using stacks. Well fix it in the next release or so.

from immich.

Buco7854 avatar Buco7854 commented on July 21, 2024

OK, thanks 😁

from immich.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.