mattermost-community / mattermost-plugin-memes

Add culture to your Mattermost with memes 🔌

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working in new mattermost

uhlhosting opened this issue · comments

Is not working in latest 5.10 version.

It says Internal Server Error

Would you share the whole log output in debug mode please?

2019-05-15T01:29:32.697+0200	debug	web/handlers.go:58	PUT - /api/v4/users/48bbj6nc97f55npw6br7gxo96h/preferences
2019-05-15T01:29:32.697+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:29:32.701+0200	debug	web/handlers.go:58	POST - /api/v4/channels/members/me/view
2019-05-15T01:29:32.701+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:29:36.253+0200	debug	app/email_batching.go:110	Email batching job ran. 0 user(s) still have notifications pending.
2019-05-15T01:29:37.344+0200	debug	scheduler/scheduler.go:40	Scheduling Job	{"scheduler": "PluginsScheduler"}
2019-05-15T01:29:37.533+0200	debug	web/handlers.go:58	GET - /server-status
2019-05-15T01:29:37.699+0200	debug	jobs/schedulers.go:167	Next run time for scheduler PluginsScheduler: 2019-05-15 01:30:37.699450517 +0200 CEST m=+694187.256637538
2019-05-15T01:29:41.155+0200	debug	web/handlers.go:58	POST - /api/v4/users/status/ids
2019-05-15T01:29:42.438+0200	debug	scheduler/worker.go:49	Worker received a new candidate job.	{"worker": "Plugins"}
2019-05-15T01:29:42.441+0200	info	scheduler/worker.go:78	Worker: Job is complete	{"worker": "Plugins", "job_id": "f8gqsswfg7ygpyh5sbc1hhqnyo"}
2019-05-15T01:29:44.623+0200	debug	web/handlers.go:58	POST - /api/v4/channels/members/me/view
2019-05-15T01:29:44.623+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:29:44.638+0200	debug	web/handlers.go:58	GET - /api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members
2019-05-15T01:29:44.642+0200	debug	web/handlers.go:58	GET - /api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels
2019-05-15T01:29:46.778+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:29:47.533+0200	debug	web/handlers.go:58	GET - /server-status
2019-05-15T01:29:47.868+0200	debug	web/handlers.go:58	POST - /api/v4/commands/execute
2019-05-15T01:29:47.868+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:29:47.872+0200	debug	wsapi/websocket_handler.go:26	websocket: user_typing
2019-05-15T01:29:47.948+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-15T01:29:48.049+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-15T01:29:48.051+0200	debug	web/handlers.go:58	GET - /templates/everywhere.jpg
2019-05-15T01:29:48.053+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T01:29:56.388+0200	debug	web/handlers.go:58	GET - /api/v4/plugins/webapp
2019-05-15T01:29:56.397+0200	debug	web/handlers.go:58	GET - /api/v4/channels/7hxnpajajbfidczbufhzkffznr/posts
2019-05-15T01:29:56.397+0200	debug	web/handlers.go:58	GET - /api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels
2019-05-15T01:29:56.398+0200	debug	web/handlers.go:58	GET - /api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members
2019-05-15T01:29:56.404+0200	debug	web/handlers.go:58	GET - /api/v4/users/me/teams/unread
2019-05-15T01:29:56.574+0200	debug	web/handlers.go:58	POST - /api/v4/users/usernames
2019-05-15T01:29:56.574+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:29:57.533+0200	debug	web/handlers.go:58	GET - /server-status
2019-05-15T01:29:57.715+0200	debug	wsapi/websocket_handler.go:26	websocket: user_typing
2019-05-15T01:29:57.819+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:29:58.273+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:29:58.406+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:30:01.269+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:30:05.390+0200	debug	wsapi/websocket_handler.go:26	websocket: user_typing
2019-05-15T01:30:05.496+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:30:05.635+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:30:05.888+0200	debug	web/handlers.go:58	GET - /api/v4/commands
2019-05-15T01:30:06.208+0200	debug	web/handlers.go:58	POST - /api/v4/commands/execute
2019-05-15T01:30:06.208+0200	debug	mlog/log.go:160	CSRF Header check failed for request - Please upgrade your web application or custom app to set a CSRF Header
2019-05-15T01:30:06.253+0200	debug	app/email_batching.go:110	Email batching job ran. 0 user(s) still have notifications pending.
2019-05-15T01:30:06.341+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-15T01:30:06.421+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-15T01:30:06.422+0200	debug	web/handlers.go:58	GET - /templates/everywhere.jpg
2019-05-15T01:30:06.425+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T01:30:07.533+0200	debug	web/handlers.go:58	GET - /server-status
2019-05-15T01:30:13.177+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-15T01:30:13.181+0200	debug	web/handlers.go:58	GET - /api/v4/plugins
2019-05-15T01:30:13.194+0200	debug	web/handlers.go:58	GET - /api/v4/config/environment
2019-05-15T01:30:13.194+0200	debug	web/handlers.go:58	GET - /api/v4/config
2019-05-15T01:30:13.205+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-15T01:30:13.210+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-15T01:30:13.236+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-15T01:30:14.576+0200	debug	web/handlers.go:58	GET - /api/v4/logs

Well, I don't see a word about this plugin. Maybe you need to copy more parts of the log?

This is entire log, it means your plugin does not log the issues.

A newer log

2019-05-15T05:06:36.910+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:06:36.911+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:06:36.912+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:06:37.784+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:06:37.925+0200	error	log/log.go:296	forbidden content-type: "application/xml"	{"source": "stdlog"}
2019-05-15T05:06:37.928+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:06:37.972+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:06:38.153+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:06:38.313+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:29:25.857+0200	error	mlog/log.go:172	Unable to install plugin. A plugin with the same ID is already installed.	{"path": "/api/v4/plugins", "request_id": "1kbhbwxirfyj7kpm5ttfubhi9y", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "installPlugin", "http_code": 400, "err_details": ""}
2019-05-15T05:31:16.405+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:31:16.405+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:31:16.405+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:31:16.493+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:31:16.496+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:31:16.499+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:31:16.501+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:31:16.504+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:31:16.993+0200	error	log/log.go:296	forbidden content-type: "application/xml"	{"source": "stdlog"}
2019-05-15T05:31:44.573+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "7ykj1napnfrtzyo3c5zpd4d5tr", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:45.888+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "ji4336kqdtrfipj8174fjp3see", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:46.348+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "8rdgu8x9c7r5zdq9jb8s9kci1o", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:46.582+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "qrnrotugojbazmfr9iyax5cdsh", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:47.069+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "dj544dqpdtgzfnxypqxzbgad9a", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:50.404+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "t83m5byw47y3ppkhqgeqcf85me", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:31:52.491+0200	error	mlog/log.go:172	error resolving meme	{"path": "/api/v4/commands/execute", "request_id": "m3fk7h96ef8w9k3gfiq81eexpa", "ip_addr": "89.103.182.57", "user_id": "48bbj6nc97f55npw6br7gxo96h", "method": "POST", "err_where": "ExecuteCommand", "http_code": 500, "err_details": "i don't know this meme"}
2019-05-15T05:32:24.861+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?ami=10&broskees=9&cosmin=31&marco=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:32:24.861+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/pie.svg?DM=36&DevOps%2FIPM=7&DevOps%2FOff-Topic=3&DevOps%2FOperations=4&DevOps%2FTown+Square=1: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:32:24.873+0200	error	log/log.go:296	error fetching remote image: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg#0x0: Get http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/line.svg: dial tcp 127.0.0.1:8065: connect: connection refused	{"source": "stdlog"}
2019-05-15T05:32:24.881+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:32:24.884+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:32:24.903+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:32:24.905+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T05:32:25.040+0200	error	log/log.go:296	forbidden content-type: "application/xml"	{"source": "stdlog"}
2019-05-15T05:32:31.299+0200	error	mlog/sugar.go:23	Invalid or expired session, please login again.	{"plugin_id": "emojigen"}
2019-05-15T06:41:38.615+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-15T06:42:11.526+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}

it means your plugin does not log the issues.

It's not about what the plugin log. The server logs every time a plugin is started.

Where do you see the information "Internal Server Error"?

@hanzei it is simple, it seems to be working and even displaying it fine in mobile app, yet it completely fails for display in channels in desktop app.

Here printscreens from Mobile app and Desktop app:

Mobile:
image

Desktop:
image

And in the desktop we get this errors in console I have tried last command for meme several times :

2019-05-19T00:21:12.193+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:12.197+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:12.258+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:12.267+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:12.337+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:12.339+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:12.341+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:12.633+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:17.047+0200	debug	web/handlers.go:58	POST - /api/v4/users/status/ids
2019-05-19T00:21:17.865+0200	debug	wsapi/websocket_handler.go:26	websocket: user_typing
2019-05-19T00:21:17.873+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:17.879+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:17.880+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:17.882+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:17.887+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:17.895+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:17.971+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:17.972+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:17.975+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:18.273+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:18.786+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:18.790+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:18.792+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:18.794+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:18.802+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:18.807+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:18.844+0200	debug	web/handlers.go:58	GET - /server-status
2019-05-19T00:21:19.172+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:19.632+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:19.638+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:19.640+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:19.641+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:19.647+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:19.656+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:19.732+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:19.733+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:19.735+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:20.015+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:20.340+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:20.345+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:20.348+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:20.350+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:20.353+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:20.360+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:20.739+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:20.930+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:20.934+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:20.936+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:20.939+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:20.945+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:20.953+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:21.026+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:21.028+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:21.030+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:21.313+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:21.509+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:21.513+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:21.515+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:21.517+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:21.524+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:21.532+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:21.598+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:21.600+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:21.602+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:21.913+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:22.055+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:22.060+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:22.063+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:22.070+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:22.085+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:22.098+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:22.155+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:22.157+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:22.158+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:22.466+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:22.628+0200	debug	web/handlers.go:58	POST - /api/v4/posts
2019-05-19T00:21:22.632+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:22.634+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:22.636+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:22.642+0200	debug	app/notification_push.go:109	Sending push notification to device f00802e03f2087f2378283a024ef452653f843b0e211bc240a5139bb23b79e43 for user qgu8sswju7b8tyssh3ufrn8dfr with msg of '@cosmin posted a message.'	{"user_id": "qgu8sswju7b8tyssh3ufrn8dfr"}
2019-05-19T00:21:22.648+0200	debug	app/notification_push.go:215	Clearing push notification to null with channel_id 7hxnpajajbfidczbufhzkffznr
2019-05-19T00:21:22.727+0200	debug	web/handlers.go:58	GET - /api/v4/image
2019-05-19T00:21:22.732+0200	debug	web/handlers.go:58	GET - /templates/too-damn-high.jpg
2019-05-19T00:21:22.736+0200	error	log/log.go:296	forbidden content-type: "text/html"	{"source": "stdlog"}
2019-05-19T00:21:23.022+0200	error	app/notification_push.go:303	Device push reported as error for UserId=48bbj6nc97f55npw6br7gxo96h SessionId=o6re6w55ipyw7nqymxr3wz5hdh message=Failed because of missing device Id serverId=pa8mun94ebdgbx9ti46hkshkwr	{"user_id": "48bbj6nc97f55npw6br7gxo96h"}
2019-05-19T00:21:26.588+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-19T00:21:26.592+0200	debug	web/handlers.go:58	GET - /api/v4/plugins
2019-05-19T00:21:26.601+0200	debug	web/handlers.go:58	GET - /api/v4/config
2019-05-19T00:21:26.605+0200	debug	web/handlers.go:58	GET - /api/v4/config/environment
2019-05-19T00:21:26.618+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-19T00:21:26.623+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-19T00:21:26.653+0200	debug	web/handlers.go:58	GET - /api/v4/analytics/old
2019-05-19T00:21:28.084+0200	debug	web/handlers.go:58	GET - /api/v4/logs

It seems this might be related to the built in image proxy, and i believe your images are not proxyfied.

Would you pleas turn of the image proxy and try again?

They simply become visible also on desktop, yet I am sure some fix can be made for this, hence it works fine on mobile with proxy enabled. and I would like to have the proxy on, for the security of our assets.

And by disabling the proxy, other plugins stopped working
That were just working fine before.
image

And this is a gifcat plugin.

@hmhealey Can you help with debugging this? There server falsely claims forbidden content-type: "text/html", but $ curl -X GET -I "localhost:8065/plugins/memes/templates/everywhere.jpg" returns:

HTTP/1.1 200 OK
Cache-Control: public, max-age=604800
Content-Type: image/jpeg
Date: Fri, 24 May 2019 13:04:12 GMT
Transfer-Encoding: chunked

Which seams fine to me. What am I missing? Is a header missing?

our local host is a local ip in form 172.18.x.x we do not resolve on localhost. I am not sure why this works on mobile app, yet fails to work on osx app.

I get

mdb:STAR_uhlhosting_ch cosmic$ curl -X GET -I "172.18.111.30:8065/plugins/memes/templates/everywhere.jpg"
curl: (22) The requested URL returned error: 403 Forbidden
mdb:STAR_uhlhosting_ch cosmic$ 

The plugin blocks all request from unauthenticated users. I modified the code to not do this, in order to test the bug you brought up.
Bascicaly you have comment out https://github.com/mattermost/mattermost-plugin-memes/blob/master/plugin.go#L119-L122.

That forbidden content-type: "text/html" is because the image proxy is attempting to load the image from the local server, but that's being blocked by the AllowUntrustedInternalConnections setting which prevents the MM server from requesting data from the local network. You'll want to add 127.0.0.1 to that setting to allow the server to talk to itself. There's more information about that setting here.

I already had 127.0.0.1 and local ip and external one added here. This was not the case.

might it be due to the fact the current linux tar.gz contains an .exe ?

commented

Similar issue here with latest version of both Mattermost and this plugin. If I turn image proxy off it works on web-desktop and mobile. If the image proxy is enabled, it doesn't work.

@uhlhosting Would you please try out the latest release? https://github.com/mattermost/mattermost-plugin-memes/releases/tag/v1.1.0

Unable to install plugin. A plugin with the same ID is already installed and failed to be removed.

🤔

@h-town What server version are you using? Would you please update to the latest?

@hanzei I'm on MM 5.13.2 / MPM 1.1.0

@h-town Can you just manually remove the old version and re-install the new one?

I've the same issue.

I tried to call the url in a separate tab https://chat.domain.tld/api/v4/image?url=%2Fplugins%2Fmemes%2Ftemplates%2Fbrace-yourselves.jpg%3Ftext%3Dbrace%2Byourself.%26amp%3Btext%3Dmemes%2Bare%2Bcoming.

I first add this error.

error fetching remote image: Get https://chat.domain.tld/templates/brace-yourselves.jpg?text=brace+yourself.&text=memes+are+coming.#0x0: Get https://chat.domain.tld/templates/brace-yourselves.jpg?text=brace+yourself.&text=memes+are+coming.: address forbidden, you may need to set AllowedUntrustedInternalConnections to allow an integration access to your internal network

Then I added chat.domain.tld in AllowedUntrustedInternalConnections config. Then I've got the following error:

requested URL is not allowed

I tried to call the image with an absolute url instead relative, but it doesn't seems to do anything.

If I disable Image Proxy, images are loaded.

Debugging this issue lead to an bug (?) in the image proxy library: https://community.mattermost.com/core/pl/xizrkzbwc7r1pdwh114m1y3mnr