funmaker / Hybooru

Hydrus-based booru-styled imageboard in React
https://booru.funmaker.moe/
MIT License
95 stars 15 forks source link

Crashes while rebuilding Mappings in the database. #20

Closed sbstratos79 closed 1 year ago

sbstratos79 commented 1 year ago

I am getting this error after the latest update.

Database update detected, rebuilding...

Rebuilding Database!

Posts (33153/33153)             [####################] Done in 377ms
Urls (175457/175457)            [####################] Done in 623ms
Tags (77505/77505)              [####################] Done in 409ms
Mappings (633453/633453)        [####################] Done in 1.26s
Mappings (614400/610626)        [####################] 
/mnt/HDD/Home/Documents/Linux/git-clones/Hybooru/node_modules/pg-protocol/src/parser.ts:369
      name === 'notice' ? new NoticeMessage(length, messageValue) : new DatabaseError(messageValue, length, name)
                                                                    ^
error: duplicate key value violates unique constraint "mappings_pkey"
    at Parser.parseErrorMessage (/mnt/HDD/Home/Documents/Linux/git-clones/Hybooru/node_modules/pg-protocol/src/parser.ts:369:69)
    at Parser.handlePacket (/mnt/HDD/Home/Documents/Linux/git-clones/Hybooru/node_modules/pg-protocol/src/parser.ts:188:21)
    at Parser.parse (/mnt/HDD/Home/Documents/Linux/git-clones/Hybooru/node_modules/pg-protocol/src/parser.ts:103:30)
    at Socket.<anonymous> (/mnt/HDD/Home/Documents/Linux/git-clones/Hybooru/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
beam7894123 commented 1 year ago

I got the same problem so here what I think. This happen because

BUT here how I to fix it (for now)

sbstratos79 commented 1 year ago

@beam7894123 Thanks, this works. I'd much rather be able to use all my tag services. I'll keep the issue open for now.

funmaker commented 1 year ago

Fixed in v1.7.0