# Board Plugin is not started

**URL:** https://forum.mattermost.com/t/board-plugin-is-not-started/14376
**Category:** Troubleshooting
**Created:** [November 1, 2022, 4:21pm UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376 "2022-11-01T16:21:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![TheFive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/thefive/32/6034_2.png) [@TheFive](https://forum.mattermost.com/u/TheFive)
#### Post date: [November 1, 2022, 4:21pm UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376/1 "2022-11-01T16:21:22Z")

</div>

For feature requests, please see: [Contributing Feature Proposals - Mattermost](http://www.mattermost.org/feature-requests/).

For troubleshooting questions, please post in the following format:

**Summary**

Installation  
Mattermost 7.4.0 (upgraded in one step from Mattermost 6.x.x version number not exactly known.)  
Postgres 10.22  
nginx 1.18.10  
Client: Safari, Mattermost Client OSX

The error message  
`originalError: pq: cannot delete from scalar`

can be found once in this forum, but the topic here is a migration from MariaDB to Postgres

> [@Migrating from MariaDB to PostgreSQL DB](https://forum.mattermost.com/t/migrating-from-mariadb-to-postgresql-db/14194/10):
>
> Just to add info about the first trouble (challenges?) I faced with my migrated DB: When trying to upgrade my Mattermost 7.3.0 to 7.4.0 today Mattermost Boards refused to start, its DB migration failed. The reason was the props attribute (normally JSON content) in the Users table, where (probably during the migration) some “null” Strings crept in (so no NULL SQL values, a literal String saying “null”). This was easy to fix though: UPDATE Users SET props = '{}' WHERE props = 'null'; Mattermo…

**Steps to reproduce**

see observed behavior. Installation is on a production machine, do not have a second machine to test in more detail.

**Expected behavior**

Can use standard Board Plugin after upgrade to 7.4 first time.

**Observed behavior**  
I upgraded from 6.x to 7.4.  
I tried to use the Board plugin (first time) but i did not find it.  
(i do not know wether board plugin was running with the 6.x)  
Board Plugin is enabled in the system console.

The logfile states the following migration error

```auto
{
  "timestamp": "2022-11-01 12:08:11.866 +01:00",
  "level": "error",
  "msg": "Unable to activate plugin",
  "caller": "app/plugin.go:165",
  "plugin_id": "focalboard",
  "error": "cannot activate plugin: error initializing the DB: driver: postgres, 
  message: failed to execute migration, 
  command: executing_query, 
  originalError: pq: cannot delete from scalar, 
  query: \n\n\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'welcomePageViewed', replace((Props->'focalboard_welcomePageViewed')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_welcomePageViewed' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'hiddenBoardIDs', replace(replace(replace((Props->'hiddenBoardIDs')::varchar, '\"[', '['), ']\"', ']'), '\\\"', '\"') FROM Users WHERE Props->'hiddenBoardIDs' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'tourCategory', replace((Props->'focalboard_tourCategory')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_tourCategory' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'onboardingTourStep', replace((Props->'focalboard_onboardingTourStep')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_onboardingTourStep' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'onboardingTourStarted', replace((Props->'focalboard_onboardingTourStarted')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_onboardingTourStarted' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'version72MessageCanceled', replace((Props->'focalboard_version72MessageCanceled')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_version72MessageCanceled' IS NOT NULL ON CONFLICT DO NOTHING;\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'lastWelcomeVersion', replace((Props->'focalboard_lastWelcomeVersion')::varchar, '\"', '') FROM Users WHERE Props->'focalboard_lastWelcomeVersion' IS NOT NULL ON CONFLICT DO NOTHING;\n\n UPDATE Users SET props = (props - 'focalboard_welcomePageViewed' - 'hiddenBoardIDs' - 'focalboard_tourCategory' - 'focalboard_onboardingTourStep' - 'focalboard_onboardingTourStarted' - 'focalboard_version72MessageCanceled' - 'focalboard_lastWelcomeVersion');\n \n\n \n\n \n\n\n"
}

```

---

<div class="post-metadata">

### Author: ![GOhrner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gohrner/32/5775_2.png) [@GOhrner](https://forum.mattermost.com/u/GOhrner)
#### Post date: [November 2, 2022, 10:54am UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376/2 "2022-11-02T10:54:14Z")

</div>

@TheFive: This looks more and more like a bug in either Mattermost, Mattermost Boards or a preceeding DM migration script to me…

The workaround with the manual `UPDATE` command mentioned in the thread you linked should help.

Nevertheless, you should add a bug report for this on GitHub. This seems to bite quite a few MM self-hosting users which use PostgreSQL…

---

<div class="post-metadata">

### Author: ![TheFive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/thefive/32/6034_2.png) [@TheFive](https://forum.mattermost.com/u/TheFive)
#### Post date: [November 3, 2022, 7:21pm UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376/3 "2022-11-03T19:21:08Z")

</div>

Thank you, the mentioned SQL statement worked.

---

<div class="post-metadata">

### Author: ![TheFive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/thefive/32/6034_2.png) [@TheFive](https://forum.mattermost.com/u/TheFive)
#### Post date: [November 3, 2022, 7:38pm UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376/4 "2022-11-03T19:38:06Z")

</div>

The Bug Report can be found here:

> <https://github.com/mattermost/focalboard/issues/4141>
>
> \## Summary
> 
> Installation of an update results in not starting Mattermost Boar…d
> 
> results in error when executing update script.
> 
> \## Steps to reproduce the behavior
> 
> I upgraded from 6.x to 7.4.
> I tried to use the Board plugin (first time) but i did not find it.
> (i do not know wether board plugin was running with the 6.x)
> Board Plugin is enabled in the system console.
> 
> The logfile states the following migration error
> \`\`\`
> {
> "timestamp": "2022-11-01 12:08:11.866 +01:00",
> "level": "error",
> "msg": "Unable to activate plugin",
> "caller": "app/plugin.go:165",
> "plugin\_id": "focalboard",
> "error": "cannot activate plugin: error initializing the DB: driver: postgres, 
> message: failed to execute migration, 
> command: executing\_query, 
> originalError: pq: cannot delete from scalar, 
> query: \\n\\n\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'welcomePageViewed', replace((Props-\>'focalboard\_welcomePageViewed')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_welcomePageViewed' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'hiddenBoardIDs', replace(replace(replace((Props-\>'hiddenBoardIDs')::varchar, '\\"\[', '\['), '\]\\"', '\]'), '\\\\\\"', '\\"') FROM Users WHERE Props-\>'hiddenBoardIDs' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'tourCategory', replace((Props-\>'focalboard\_tourCategory')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_tourCategory' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'onboardingTourStep', replace((Props-\>'focalboard\_onboardingTourStep')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_onboardingTourStep' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'onboardingTourStarted', replace((Props-\>'focalboard\_onboardingTourStarted')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_onboardingTourStarted' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'version72MessageCanceled', replace((Props-\>'focalboard\_version72MessageCanceled')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_version72MessageCanceled' IS NOT NULL ON CONFLICT DO NOTHING;\\n INSERT INTO Preferences (UserId, Category, Name, Value) SELECT Id, 'focalboard', 'lastWelcomeVersion', replace((Props-\>'focalboard\_lastWelcomeVersion')::varchar, '\\"', '') FROM Users WHERE Props-\>'focalboard\_lastWelcomeVersion' IS NOT NULL ON CONFLICT DO NOTHING;\\n\\n UPDATE Users SET props = (props - 'focalboard\_welcomePageViewed' - 'hiddenBoardIDs' - 'focalboard\_tourCategory' - 'focalboard\_onboardingTourStep' - 'focalboard\_onboardingTourStarted' - 'focalboard\_version72MessageCanceled' - 'focalboard\_lastWelcomeVersion');\\n \\n\\n \\n\\n \\n\\n\\n"
> }
> \`\`\`
> 
> 
> \## Expected behavior
> 
> Can use standard Board Plugin after upgrade to 7.4 first time.
> 
> \## Screenshots (optional)
> 
> n.a.
> 
> \## Edition and Platform
> 
> - Edition: Mattermost Boards (plugin)
> - Version: \[e.g. v0.15.0\]
> - Browser and OS: \[e.g. Chrome on Mac, Edge on Windows\]
> - Mattermost 7.4.0 (upgraded in one step from Mattermost 6.x.x version number not exactly known.)
> - Postgres 10.22
> - nginx 1.18.10
> - Client: Safari, Mattermost Client OSX
> 
> 
> 
> \## Additional context (optional)
> 
> You can find this with a workaround in the Mattermost Forum:
> https://forum.mattermost.com/t/board-plugin-is-not-started/14376/3

---

<div class="post-metadata">

### Author: ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)
#### Post date: [November 26, 2022, 4:01pm UTC](https://forum.mattermost.com/t/board-plugin-is-not-started/14376/5 "2022-11-26T16:01:58Z")

</div>

JFYI, this was fixed by [make sure users.props contains a hash! by oetiker · Pull Request #4029 · mattermost/focalboard · GitHub](https://github.com/mattermost/focalboard/pull/4029).
