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

After a new login, retrieving the file, and running the file, the app dies. #7833

Open bitdessert opened 8 months ago

bitdessert commented 8 months ago

Per Mattermost guidelines, GitHub issues are for bug reports: http://www.mattermost.org/filing-issues/.

For troubleshooting see: http://forum.mattermost.org/. For feature proposals see: http://www.mattermost.org/feature-requests/

If you've found a bug--something appears unintentional--please follow these steps:

  1. Confirm you’re filing a new issue. Search existing tickets in Jira to ensure that the ticket does not already exist.
  2. Confirm your issue does not involve security. Otherwise, please see our Responsible Disclosure Policy.
  3. File a new issue using the format below. Mattermost will confirm steps to reproduce and file in Jira, or ask for more details if there is trouble reproducing it. If there's already an existing bug in Jira, it will be linked back to the GitHub issue so you can track when it gets fixed.

Summary

After a new login, retrieving the file, and running the file, the app dies.

Environment Information

Steps to reproduce

  1. sign in (if you're logged in, sign out first)
  2. Click the second menu from the bottom, Search
  3. enter text
  4. change to the File tab
  5. Run the found video file
  6. get error 'cannot read property 'displayName' of undefined'

Expected behavior

Even files found in channels that were not opened should be executed.

Observed behavior (that appears unintentional)

  1. get error 'cannot read property 'displayName' of undefined'

Once opened, any channel unrelated to the file will not cause an error.

  1. open and close any channel before searching.
  2. Search for a file.
  3. Run a file in a channel that has never been opened.
  4. No problem.

Possible fixes

You could add an API to get the channel information before opening the file, but that's not quite right.

amyblais commented 8 months ago

@bitdessert What file type are you using (wondering what file type is needed for step 5)?

bitdessert commented 8 months ago

@amyblais The files I tested are mp4, but it doesn't seem to be a file extension dependent issue.

amyblais commented 8 months ago

@bitdessert Thank you, I wasn't able to reproduce this just now. Are you able to reproduce this on our community server here https://community.mattermost.com/?

bitdessert commented 8 months ago

@amyblais This also happens on community servers. Here's an error capture.

image

Screenshot_20240222-103233_Mattermost

  1. sign in
  2. search for 'video'
  3. launch the 'WhatsApp Video' file

Then you'll see that popup

Apart from this issue, the app doesn't restart when I press the 'relaunch' button as I mentioned before in https://github.com/mattermost/mattermost-mobile/issues/7819. This is also a problem.