mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

Basic plugin builds artifacts larger than 50MB, the common max upload size on default Mattermost setups #194

Closed sadohert closed 7 months ago

sadohert commented 8 months ago

I was using this template to start a new plugin.

I followed the instructions but ran into an issue when I went to test the bare minimum plugin with make deploy using mattermost-preview docker image.

I was initially getting the following error:

2023/12/27 22:42:36 Uploading plugin via API.
Failed: failed to upload plugin bundle: AppErrorFromJSON: model.utils.decode_json.app_error, body: http: request body too large
, invalid character 'h' looking for beginning of value

Usage:
    pluginctl deploy <plugin id> <bundle path>
    pluginctl disable <plugin id>
    pluginctl enable <plugin id>
    pluginctl reset <plugin id>
make: *** [deploy] Error 1

I found a thread on the COmmunity server that pointed out that I needed to increase the max file upload size under "System Console > File Storage > Max Upload Filesize". I checked on the size of the bare bones plugin archive and it was around 53MB.

Can we somehow provide warning text in the make deploy target to explain this possible issue to developers?

hanzei commented 8 months ago

Good catch. The error could surely be clearer. Opened https://mattermost.atlassian.net/browse/MM-56455.