deadlinecode / baileys-bottle

56 stars 40 forks source link

fail(new QueryFailedError_1.QueryFailedError(query, parameters, err)) #11

Closed AlAreqi320 closed 1 year ago

AlAreqi320 commented 1 year ago
                fail(new QueryFailedError_1.QueryFailedError(query, parameters, err));
                     ^

QueryFailedError: SQLITE_ERROR: ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint at handler (D:\WhatsAppWebAPI\6061\node_modules\typeorm\driver\sqlite\SqliteQueryRunner.js:81:26) at Statement.errBack (D:\WhatsAppWebAPI\6061\node_modules\sqlite3\lib\sqlite3.js:15:21) { query: 'INSERT INTO "chat"("DBId", "id", "messages", "newJid", "oldJid", "lastMsgTimestamp", "unreadCount", "readOnly", "endOfHistoryTransfer", "ephemeralExpiration", "ephemeralSettingTimestamp", "endOfHistoryTransferType", "conversationTimestamp", "name", "pHash", "notSpam", "archived", "disappearingMode", "unreadMentionCount", "markedAsUnread", "participant", "tcToken", "tcTokenTimestamp", "contactPrimaryIdentityKey", "pinned", "muteEndTime", "wallpaper", "mediaVisibility", "tcTokenSenderTimestamp", "suspended", "terminated", "createdAt", "createdBy", "description", "support", "isParentGroup", "isDefaultSubgroup", "parentGroupId", "displayName", "pnJid", "selfMasked", "mute", "pin", "archive") VALUES (NULL, ?, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) ON CONFLICT ( "id" ) DO UPDATE SET "id" = EXCLUDED."id", "unreadCount" = EXCLUDED."unreadCount", "conversationTimestamp" = EXCLUDED."conversationTimestamp"', parameters: [ '9677777777-1631226930@g.us', '1666624041' ], driverError: [Error: SQLITE_ERROR: ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint] { errno: 1, code: 'SQLITE_ERROR' }, errno: 1, code: 'SQLITE_ERROR' }

Node.js v19.0.0

deadlinecode commented 1 year ago

which version of baileys-bottle and baileys are you running?

AlAreqi320 commented 1 year ago

Last version

deadlinecode commented 1 year ago

@AlAreqi320 Should work now Please update via npm i baileys-bottle@latest and try again If it still doesn't work feel free to reopen