Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated memes do not appear in iOS app #41

Open
hmenzagh opened this issue Nov 12, 2020 · 16 comments
Open

Generated memes do not appear in iOS app #41

hmenzagh opened this issue Nov 12, 2020 · 16 comments
Labels
Type/Bug Something isn't working

Comments

@hmenzagh
Copy link

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
Copy link
Contributor

hanzei commented Nov 13, 2020

Do you see any errors in the server logs?

@hanzei hanzei added the Type/Bug Something isn't working label Nov 13, 2020
@hmenzagh
Copy link
Author

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

@kevinbosman
Copy link

kevinbosman commented Feb 22, 2021

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
Copy link

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

@moschlar
Copy link

Here too…

@nathanaelhoun
Copy link
Contributor

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.

  • The image correctly loads if I go to the link in my mobile browser.
  • The image correctly loads if I replace MY_MATTERMOST_URL by the community.mattermost.com.
  • The image doesn't load if I copy-paste the post in my mobile app connected to community.mattermost.com.
  • The image doesn't load with a local mattermost server and a mobile app connected to this local server, with ServerURL correctly configured (so I think it is not a proxy issue)
![am-i-the-only-one](https://MY_MATTERMOST_URL/plugins/memes/templates/am-i-the-only-one.jpg?text=hello&text=you)

@nathanaelhoun
Copy link
Contributor

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
{
  "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
Copy link
Contributor

hanzei commented Oct 10, 2021

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

@shaz-r
Copy link

shaz-r commented Oct 11, 2021

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

@nathanaelhoun
Copy link
Contributor

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
Copy link

shaz-r commented Feb 21, 2022

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:

  • Are you running the slash command on web, ios or android?
  • If web, does it work on web and not come up on ios or android?
  • Or if ios / android, does it fail altogether (not come up on web?)

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 (#48)

@nathanaelhoun
Copy link
Contributor

nathanaelhoun commented Feb 21, 2022

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 :

  • the command doesn't fail (no error message, no server log, the message is sent).
  • On web, the meme shows correctly with the good text or no text if without argument.
  • On Android, there is an "empty" message, without any text or image showing, just a small empty space.

Hope it helps!

@vigstudio
Copy link

This bug exists on both iOS and Android.

@omginput
Copy link

omginput commented Nov 1, 2022

This bug exists now for two years?

@theme1256
Copy link

theme1256 commented Feb 22, 2023

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.

theme1256 added a commit to theme1256/mattermost-plugin-memes that referenced this issue Feb 22, 2023
Possible fix for issue mattermost-community#41.
Changing from markdown image to image-attatchment
@khuongphp
Copy link

Sorry, anyone try this? Is issue fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests