mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.25k stars 1.36k forks source link

App crash with specific message #2412

Closed dabbill closed 5 years ago

dabbill commented 5 years ago

Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:

Summary

Specific message can crash app.

Environment Information

Steps to reproduce

How can we reproduce the issue? Send message to any channel with the following. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expected behavior

View message with out app crashing.

Observed behavior

Application totally locks up and unable to do anything by wait for android popup to foce close the app. Deleting the message from desktop app, and clearing cache on mobile device makes app function again.

Possible fixes

If you can, link to the line of code that might be responsible for the problem.

amyblais commented 5 years ago

Hi @dabbill,

Thank you for the report, I'll start by testing this out on iOS as I don't have Android. If I can't reproduce this then I'll ask one of our QAs to test it out on Android in case it is Android specific issue.

hmhealey commented 5 years ago

Hi @dabbill,

What model of phone was this on? I don't have an Android phone on hand at the moment to test this out, but this type of issue would usually not be device-specific and I'm not seeing it happen on my iPhone.

Edit: Oops, I missed that Amy had already made a comment 😛. We'll definitely check it out though

dabbill commented 5 years ago

I am on T-Mobile LG G7 ThinQ.

On Mon, Dec 3, 2018, 12:24 PM Harrison Healey <notifications@github.com wrote:

Hi @dabbill https://github.com/dabbill,

What model of phone was this on? I don't have an Android phone on hand at the moment to test this out, but this type of issue would usually not be device-specific and I'm not seeing it happen on my iPhone.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mattermost/mattermost-mobile/issues/2412#issuecomment-443857046, or mute the thread https://github.com/notifications/unsubscribe-auth/AHLgPORArNum188tFsprgIQdQRd_bpu0ks5u1Yh2gaJpZM4Y8arn .

hmhealey commented 5 years ago

I think I see what's happening here since I actually fixed it already, but I didn't realize that change wasn't included in 1.14. Certain characters trigger the Markdown renderer to start a new text node so while I'm using Markdown might render as <Text>I'm using Markdown</Text>, !!! might render each as its own Text node so you get <Text>!</Text><Text>!</Text><Text>!</Text>. It looks like Android just has problems when you have a lot of Text nodes on screen at once.

Thankfully, that's actually fixed on master already since that was causing some problems when I was adding code to highlight mention keywords, so it should already be fixed for 1.15.

hmhealey commented 5 years ago

I've still filed a Jira ticket here so that we can make sure to double check that this is fixed in the upcoming release

dabbill commented 5 years ago

Awesome. Thanks for the updates :-)

-----Original Message----- From: Harrison Healey notifications@github.com Reply-To: mattermost/mattermost-mobile < reply@reply.github.com

To: mattermost/mattermost-mobile mattermost-mobile@noreply.github.com Cc: Ryan Gillette dabbill@gmail.com, Mention < mention@noreply.github.com> Subject: Re: [mattermost/mattermost-mobile] App crash with specific message (#2412) Date: Tue, 04 Dec 2018 07:27:10 -0800

I've still filed a Jira ticket here so that we can make sure to double check that this is fixed in the upcoming release

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c554 93e4bb","name":"GitHub"},"entity":{"external_key":"github/mattermost/ma ttermost-mobile","title":"mattermost/mattermost- mobile","subtitle":"GitHub repository","main_image_url":" https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":" https://github.com/mattermost/mattermost-mobile"}},"updates":{"snippets":[{"icon":"PERSON","message":"@hmhealey in #2412: I've still filed a Jira ticket here so that we can make sure to double check that this is fixed in the upcoming release\r\n"}],"action":{"name":"View Issue","url":" https://github.com/mattermost/mattermost-mobile/issues/2412#issuecomment-444140198 "}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": " https://github.com/mattermost/mattermost-mobile/issues/2412#issuecomment-444140198 ", "url": " https://github.com/mattermost/mattermost-mobile/issues/2412#issuecomment-444140198 ", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [mattermost/mattermost-mobile] App crash with specific message (#2412)", "sections": [ { "text": "", "activityTitle": "Harrison Healey", "activityImage": " https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@hmhealey", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"mattermost/mattermost-mobile\",\n\"issueId\": 2412,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"mattermost/mattermost-mobile\",\n\"issueId\": 2412\n}" }, { "targets": [ { "os": "default", "uri": " https://github.com/mattermost/mattermost-mobile/issues/2412#issuecomment-444140198 " } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 418491111\n}" } ], "themeColor": "26292E" } ]