mattermost-plugin-rssfeed icon indicating copy to clipboard operation
mattermost-plugin-rssfeed copied to clipboard

SQL Error - Duplicate key violation

Open pjenicot opened this issue 4 years ago • 5 comments

Hello,

When you activate the plugin for the first time, there is no problem. But when we restart the server or deactivate and reactivate the plugin, there is a key constraint violation error.

2021-03-23 13:47:46.157 UTC [7654] ERROR: duplicate key value violates unique constraint "idx_users_email_unique" 2021-03-23 13:47:46.157 UTC [7654] DETAIL: Key (email)=(rssfeedbot@localhost) already exists. 2021-03-23 13:47:46.157 UTC [7654] STATEMENT: insert into "users" ("id","createat","updateat","deleteat","username","password","authdata","authservice","email","emailverified","nickname","firstname","lastname","position","roles","allowmarketing","props","notifyprops","lastpasswordupdate","lastpictureupdate","failedattempts","locale","timezone","mfaactive","mfasecret") values ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25);

pjenicot avatar Mar 23 '21 13:03 pjenicot

What happens when you update the plugin? We observed this when using version 0.2.0 and have since updated to 0.2.5, however it seems that the plugin is not updated since we don't see new functionality like the sub/unsub commands (https://github.com/wbernest/mattermost-plugin-rssfeed/pull/42) or the fix for spamming the channel (https://github.com/wbernest/mattermost-plugin-rssfeed/pull/38).

What is the correct way to update the plugin?

johanhammar avatar Apr 12 '21 17:04 johanhammar

image

indeed, the new instructions are not available

image

I deleted the plugin and reinstalled it but the new instructions do not appear

pjenicot avatar Apr 13 '21 06:04 pjenicot

We don't use the plugin marketplace, instead we put the tarball in the plugin/ directory

johanhammar avatar Apr 13 '21 07:04 johanhammar

I think it has something to do with the 0.2.5 build. I can reproduce the problem locally running Mattermost in Docker.

  1. Install mattermost-plugin-rssfeed 0.2.0
  2. Enable plugin
  3. Install mattermost-plugin-rssfeed 0.2.5
  4. I get the same problem

However if I build the plugin myself, i.e a 0.3.0 and install that directly after step 2 above, it seems to work correctly.

johanhammar avatar May 23 '21 05:05 johanhammar

Probably related to https://github.com/wbernest/mattermost-plugin-rssfeed/issues/54

johanhammar avatar Jul 10 '21 19:07 johanhammar