Plugin failed to start

Self-hosted MM on Ubuntu 20.04, fresh installation.
two pre-installed plugins, Playbooks and Channel-Export report the same error msg:

This plugin failed to start. unable to generate webapp bundle: playbooks: unable to copy webapp bundle directory: playbooks: stat plugins/playbooks/webapp/dist: no such file or directory

It looks like a file/folder permissions issue, however I cannot find any useful information other than some clues here (which is actuall not the same setup with mine):

Hi hsd,

Did you use the docker or the binary intallation?
For docker, please post the output of:

ls -lR volumes/app/mattermost

For the binary installation, please post the output of:

ls -lR /opt/mattermost/plugins

Hi agriesser,
here you are. Thanks,

ls -lR /opt/mattermost/plugins

/opt/mattermost/plugins:
total 24
drwxr–r-- 4 mattermost mattermost 4096 Oct 14 07:54 com.mattermost.apps
drwxr–r-- 5 mattermost mattermost 4096 Oct 14 07:54 com.mattermost.calls
drwxr–r-- 5 mattermost mattermost 4096 Oct 6 08:07 com.mattermost.plugin-channel-export
drwxr–r-- 6 mattermost mattermost 4096 Oct 14 07:54 com.mattermost.plugin-todo
drwxr–r-- 4 mattermost mattermost 4096 Oct 3 11:35 focalboard
drwxr–r-- 5 mattermost mattermost 4096 Oct 3 11:35 playbooks

/opt/mattermost/plugins/com.mattermost.apps:
total 12
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 assets
-rw-r–r-- 1 mattermost mattermost 1225 Oct 14 07:54 plugin.json
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 server

/opt/mattermost/plugins/com.mattermost.apps/assets:
total 28
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 i18n
-rw-r–r-- 1 mattermost mattermost 30 Oct 14 07:54 manifests.json
-rw-r–r-- 1 mattermost mattermost 19114 Oct 14 07:54 profile.png

/opt/mattermost/plugins/com.mattermost.apps/assets/i18n:
total 16
-rw-r–r-- 1 mattermost mattermost 7751 Oct 14 07:54 active.en.json
-rw-r–r-- 1 mattermost mattermost 4553 Oct 14 07:54 active.es.json

/opt/mattermost/plugins/com.mattermost.apps/server:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 dist

/opt/mattermost/plugins/com.mattermost.apps/server/dist:
total 44376
-rwxr-xr-x 1 mattermost mattermost 45435589 Oct 14 07:54 plugin-linux-amd64

/opt/mattermost/plugins/com.mattermost.calls:
total 20
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 assets
-rw------- 1 mattermost mattermost 5147 Oct 14 07:54 plugin.json
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 server
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 webapp

/opt/mattermost/plugins/com.mattermost.calls/assets:
total 0

/opt/mattermost/plugins/com.mattermost.calls/server:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 dist

/opt/mattermost/plugins/com.mattermost.calls/server/dist:
total 31680
-rwxr-xr-x 1 mattermost mattermost 32440274 Oct 14 07:54 plugin-linux-amd64

/opt/mattermost/plugins/com.mattermost.calls/webapp:
total 4
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 dist

/opt/mattermost/plugins/com.mattermost.calls/webapp/dist:
total 1160
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 files
-rw-r–r-- 1 mattermost mattermost 1177420 Oct 14 07:54 main.js
-rw-r–r-- 1 mattermost mattermost 919 Oct 14 07:54 main.js.LICENSE.txt

/opt/mattermost/plugins/com.mattermost.calls/webapp/dist/files:
total 92
-rw-r–r-- 1 mattermost mattermost 21479 Oct 14 07:54 7c4010d38a0654317b244af5c412246b.mp3
-rw-r–r-- 1 mattermost mattermost 19061 Oct 14 07:54 dc8369fc67f79488149e118896e82a20.mp3
-rw-r–r-- 1 mattermost mattermost 46937 Oct 14 07:54 e2e956cec8e665fdac87364cf73c95eb.mp3

/opt/mattermost/plugins/com.mattermost.plugin-channel-export:
total 16
drwxr–r-- 2 mattermost mattermost 4096 Oct 6 08:07 assets
-rw-r–r-- 1 mattermost mattermost 936 Oct 6 08:07 plugin.json
drwxr–r-- 2 mattermost mattermost 4096 Oct 6 08:07 public
drwxr–r-- 3 mattermost mattermost 4096 Oct 6 08:07 server

/opt/mattermost/plugins/com.mattermost.plugin-channel-export/assets:
total 0

/opt/mattermost/plugins/com.mattermost.plugin-channel-export/public:
total 4
-rw-r–r-- 1 mattermost mattermost 97 Oct 6 08:07 hello.html

/opt/mattermost/plugins/com.mattermost.plugin-channel-export/server:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 6 08:07 dist

/opt/mattermost/plugins/com.mattermost.plugin-channel-export/server/dist:
total 23856
-rw-r–r-- 1 mattermost mattermost 24425162 Oct 6 08:07 plugin-linux-amd64

/opt/mattermost/plugins/com.mattermost.plugin-todo:
total 20
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 assets
-rw-r–r-- 1 mattermost mattermost 1279 Oct 14 07:54 plugin.json
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 public
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 server
drwxr–r-- 3 mattermost mattermost 4096 Oct 14 07:54 webapp

/opt/mattermost/plugins/com.mattermost.plugin-todo/assets:
total 0

/opt/mattermost/plugins/com.mattermost.plugin-todo/public:
total 8
-rw-r–r-- 1 mattermost mattermost 4718 Oct 14 07:54 app-bar-icon.png

/opt/mattermost/plugins/com.mattermost.plugin-todo/server:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 dist

/opt/mattermost/plugins/com.mattermost.plugin-todo/server/dist:
total 21144
-rwxr-xr-x 1 mattermost mattermost 21650645 Oct 14 07:54 plugin-linux-amd64

/opt/mattermost/plugins/com.mattermost.plugin-todo/webapp:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 14 07:54 dist

/opt/mattermost/plugins/com.mattermost.plugin-todo/webapp/dist:
total 640
-rw-r–r-- 1 mattermost mattermost 651911 Oct 14 07:54 main.js

/opt/mattermost/plugins/focalboard:
total 8
drwxr–r-- 2 mattermost mattermost 4096 Oct 3 11:35 assets
drwxr–r-- 3 mattermost mattermost 4096 Oct 3 11:35 pack

/opt/mattermost/plugins/focalboard/assets:
total 4
-rw-r–r-- 1 mattermost mattermost 2210 Oct 3 11:35 starter-template-icon.svg

/opt/mattermost/plugins/focalboard/pack:
total 8
-rw-r–r-- 1 mattermost mattermost 499 Oct 3 11:35 index.html
drwxr–r-- 2 mattermost mattermost 4096 Oct 3 11:35 static

/opt/mattermost/plugins/focalboard/pack/static:
total 3576
-rw-r–r-- 1 mattermost mattermost 63894 Oct 3 11:35 addDescription…png
-rw-r–r-- 1 mattermost mattermost 63894 Oct 3 11:35 addDescription.png
-rw-r–r-- 1 mattermost mattermost 1043549 Oct 3 11:35 addProperty…gif
-rw-r–r-- 1 mattermost mattermost 1043549 Oct 3 11:35 addProperty.gif
-rw-r–r-- 1 mattermost mattermost 140527 Oct 3 11:35 boards-welcome…png
-rw-r–r-- 1 mattermost mattermost 140527 Oct 3 11:35 boards-welcome.png
-rw-r–r-- 1 mattermost mattermost 82140 Oct 3 11:35 boards-welcome-small…png
-rw-r–r-- 1 mattermost mattermost 82140 Oct 3 11:35 boards-welcome-small.png
-rw-r–r-- 1 mattermost mattermost 811674 Oct 3 11:35 changeViews…gif
-rw-r–r-- 1 mattermost mattermost 27692 Oct 3 11:35 Metropolis-LightItalic…woff2
-rw-r–r-- 1 mattermost mattermost 25912 Oct 3 11:35 Metropolis-Light…woff2
-rw-r–r-- 1 mattermost mattermost 25616 Oct 3 11:35 Metropolis-RegularItalic…woff2
-rw-r–r-- 1 mattermost mattermost 24152 Oct 3 11:35 Metropolis-Regular…woff2
-rw-r–r-- 1 mattermost mattermost 27772 Oct 3 11:35 Metropolis-SemiBoldItalic…woff2
-rw-r–r-- 1 mattermost mattermost 26564 Oct 3 11:35 Metropolis-SemiBold…woff2

/opt/mattermost/plugins/playbooks:
total 16
drwxr–r-- 3 mattermost mattermost 4096 Oct 3 11:35 assets
-rw------- 1 mattermost mattermost 1513 Oct 3 11:35 plugin.json
drwxr–r-- 2 mattermost mattermost 4096 Oct 3 11:35 public
drwxr–r-- 3 mattermost mattermost 4096 Oct 3 11:35 server

/opt/mattermost/plugins/playbooks/assets:
total 208
drwxr–r-- 2 mattermost mattermost 4096 Oct 3 11:35 i18n
-rw-r–r-- 1 mattermost mattermost 197483 Oct 3 11:35 incident_response.png
-rw-r–r-- 1 mattermost mattermost 2285 Oct 3 11:35 plugin_icon.png
-rw-r–r-- 1 mattermost mattermost 1410 Oct 3 11:35 plugin_icon.svg

/opt/mattermost/plugins/playbooks/assets/i18n:
total 40
-rw-r–r-- 1 mattermost mattermost 3494 Oct 3 11:35 de.json
-rw-r–r-- 1 mattermost mattermost 2787 Oct 3 11:35 en.json
-rw-r–r-- 1 mattermost mattermost 4112 Oct 3 11:35 hr.json
-rw-r–r-- 1 mattermost mattermost 3581 Oct 3 11:35 hu.json
-rw-r–r-- 1 mattermost mattermost 3973 Oct 3 11:35 pl.json
-rw-r–r-- 1 mattermost mattermost 4778 Oct 3 11:35 ru.json
-rw-r–r-- 1 mattermost mattermost 3287 Oct 3 11:35 sv.json
-rw-r–r-- 1 mattermost mattermost 3395 Oct 3 11:35 tr.json

/opt/mattermost/plugins/playbooks/public:
total 8
-rw-r–r-- 1 mattermost mattermost 5005 Oct 3 11:35 app-bar-icon.png

/opt/mattermost/plugins/playbooks/server:
total 4
drwxr–r-- 2 mattermost mattermost 4096 Oct 3 11:35 dist

/opt/mattermost/plugins/playbooks/server/dist:
total 30764
-rw-r–r-- 1 mattermost mattermost 31501042 Oct 3 11:35 plugin-linux-amd64

Your filesystem permissions look suspicious, not sure if this is really a problem, but we should fix them anyways. Please run the following commands to reset all folder permissions back to 775 (rwxrwxr-x) and all file permissions back to 664 (rw-rw-r–).

find /opt/mattermost/plugins -type d -print0 | xargs -0 chmod 775
find /opt/mattermost/plugins -type f -print0 | xargs -0 chmod 664

Once that’s done, please restart your Mattermost server and try again.

Thanks!
Permissions fixed, services restarted.
Channel-export still says:

This plugin failed to start. unable to generate webapp bundle: com.mattermost.plugin-channel-export: unable to copy webapp bundle directory: com.mattermost.plugin-channel-export: stat plugins/com.mattermost.plugin-channel-export/webapp/dist: no such file or directory

and Playbooks says:

This plugin failed to start. unable to generate webapp bundle: playbooks: unable to copy webapp bundle directory: playbooks: stat plugins/playbooks/webapp/dist: no such file or directory

Thanks for the new error messages and sorry for the late reply.
Can you please try the following steps:

systemctl stop mattermost
cd /opt/mattermost/plugins
rm -r com.mattermost.plugin-channel-export
tar xf ../prepackaged_plugins/mattermost-plugin-channel-export-v1.0.0-linux-amd64.tar.gz
systemctl start mattermost

Then go back into your system console and try to enable the channel export plugin.
If that helped, we can also do the same for the playbooks plugin.