mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.29k stars 175 forks source link

Failled to insert #592

Closed erdnaxeli closed 2 months ago

erdnaxeli commented 1 year ago

Hi,

I have some issue with SQL requests. I am using an SQLite database and the latest version of the docker image (up to date). Here are the errors:

[Feb  1, 2023 09:31:30] [WARN] Using SQLite without _txlock=immediate is not recommended (e.g. `uri: file:mautrix-whatsapp.db?_txlock=immediate`)
[Feb  1, 2023 09:32:12] [Database/Portal/WARN] Failed to insert 120363047823811053@g.us: no such table: main.old_user
[Feb  1, 2023 09:32:18] [Database/Portal/WARN] Failed to insert 120363027845409959@g.us: no such table: main.old_user
[Feb  1, 2023 09:32:34] [Database/Backfill/WARN] Failed to insert IMMEDIATE/120363027845409959@g.us with priority 0: <nil>
[Feb  1, 2023 09:32:34] [Database/Backfill/WARN] Failed to insert DEFERRED/120363027845409959@g.us with priority 0: <nil>
[Feb  1, 2023 09:32:34] [Database/Backfill/WARN] Failed to insert DEFERRED/120363027845409959@g.us with priority 1: <nil>
[Feb  1, 2023 09:32:34] [Database/Backfill/WARN] Failed to insert DEFERRED/120363027845409959@g.us with priority 2: <nil>
[Feb  1, 2023 09:32:34] [Database/Backfill/WARN] Failed to insert DEFERRED/120363027845409959@g.us with priority 3: <nil>
[Feb  1, 2023 09:32:34] [Database/Message/WARN] Failed to insert 120363027845409959@g.us@07277798A6667EBEBDAFE8E9766FEF33: FOREIGN KEY constraint failed
[Feb  1, 2023 09:32:39] [Database/Message/WARN] Failed to insert 120363027845409959@g.us@9AEBAD46E8E71496A4F6FC41B1B0EE0F: FOREIGN KEY constraint failed

It works perfectly for almost all of my rooms, but the last two created can't be saved in the database due to those errors. It means that reactions do not work and that rebooting the bridge loose the information of the room and so it is created again when receiving a message.