mattermost-community / mattermost-plugin-memes

Add culture to your Mattermost with memes 🔌
Apache License 2.0
73 stars 32 forks source link

Generated memes do not appear in iOS app #41

Open hmenzagh opened 4 years ago

hmenzagh commented 4 years ago

Everything is in the title, just did a fresh install (Mattermost & mattermost-plugin-memes) works like a charm on desktop & web, but I get blank posts from the mobile version.

hanzei commented 4 years ago

Do you see any errors in the server logs?

hmenzagh commented 4 years ago

Nope, I haven't got anything, unless there is a config to change to see mattermost-plugin-memes's logs

kevinbosman commented 3 years ago

I'm seeing the same problem on Android Mattermost. Memes with standard text appear fine, but if there's custom text it does not show any meme at all. Nothing in the logs unless you use a single quote in the text, then logs say "Unterminated single-quoted string"

Works perfectly on desktop and web.

Edit: memes v1.4.0 Edit 2: It's inconsistent. Sometimes they show up, sometimes they don't. Sometimes the identical meme and text will show up in one channel but not in another.

Twilek-de commented 3 years ago

Seeing the same problem. Memes show up in Web and in Desktop Client, but not in IOS (stable and beta) and Android clients..

moschlar commented 3 years ago

Here too…

nathanaelhoun commented 3 years ago

Same here. memes v1.4.0 compiled on my machine. Server is 5.38.1, mobile is v1.46. No logs in Mattermost server related to the plugin.

nathanaelhoun commented 3 years ago

Some more troubleshooting informations: when querying the Mattermost API from my instance, the metadata field is empty, whereas in Mattermost Community, we have metadata for the image. For what I have seen in the React Native code, it's this metadata field which is used to render images.

Community.mattermost.com API response ```json { "id": "REDACTED", "create_at": 1633522416109, "update_at": 1633525971148, "edit_at": 1633525971148, "delete_at": 0, "is_pinned": false, "user_id": "REDACTED", "channel_id": "REDACTED", "root_id": "", "original_id": "", "message": "![ancient-aliens](https://community.mattermost.com/plugins/memes/templates/ancient-aliens.jpg?text=salut-2)", "type": "", "props": { "override_icon_url": "" }, "hashtags": "", "pending_post_id": "", "reply_count": 0, "last_reply_at": 0, "participants": null, "metadata": { "images": { "https://community.mattermost.com/plugins/memes/templates/ancient-aliens.jpg?text=salut-2": { "width": 500, "height": 436, "format": "jpeg", "frame_count": 0 } } } } ```
hanzei commented 3 years ago

@shazm Maybe you can chime here as this a mobile issue?

shaz-r commented 3 years ago

I'll have a look and see if I can find what the issue is

nathanaelhoun commented 2 years ago

Hi @shazm, have you any clues about the cause of this issue? I can confirm it still happens on Mattermost v6.4.0 and mobile v1.49.0.

shaz-r commented 2 years ago

I've done a bit of digging and there isn't really anything on the mobile side that's preventing the images from being shown; I think there's likely something in the generator; combinations of the images / texts or formatting it doesn't like.

@nathanaelhoun, @hanzei, @moschlar, @Twilek-de, @kevinbosman, @hmenzagh - could you give me the commands you run; i.e. /meme alien "aliens man!" that always fails for you? And also let me know:

I'll try digging into the plugin repo; I have a sneaky suspicion that some image formats might not actually be supported that are coming back from the generator, and the generator also fails for some specific uses of text / memes (https://github.com/mattermost/mattermost-plugin-memes/issues/48)

nathanaelhoun commented 2 years ago

Hi @shazm, thanks for digging into this! I tried the command /meme ancient-aliens "Aliens man!", a variation with several arguments /meme ancient-aliens "Aliens" "man!" and without argument /meme ancient-aliens. In each case, both sent from mobile (android) or web :

Hope it helps!

vigstudio commented 2 years ago

This bug exists on both iOS and Android.

omginput commented 2 years ago

This bug exists now for two years?

theme1256 commented 1 year ago

I think I've found the issue... And it's a stupid one...

tl:dr;

The mobile-app does not support markdown images!

The full story

After a somewhat short debugging session I discovered that this plugin is sending the images as markdown.
First I though that it might be due to multiple domains on the same server (havn't ruled that one out yet), but if I manually send a message with markdown, that's supposed to display an image, it doesn't work in the mobile-app, but works fine on desktop (web and app).
And it is not due too total lack of markdown support in the mobile-app, because headers, list and hightlighting works, just images that's not working. Don't know if this means that we have to submit the bug elsewhere.... The links that this plugin embeds in the messages hardcode the domain for the server, that's why I'm not sure if that might cause issues.

khuongphp commented 5 months ago

Sorry, anyone try this? Is issue fixed?