RocketChat / Rocket.Chat.iOS

Legacy mobile Rocket.Chat client in Swift for iOS
https://rocket.chat
MIT License
1.04k stars 438 forks source link

[BUG] Crash when trying to open video. #2487

Open farmio opened 5 years ago

farmio commented 5 years ago

👋 I have found a bug causing the iOS App to crash. It happens when I try to open a .mp4 file uploaded from the Android app to my 🚀 server on Docker (GridFS for Uploads). Preview image with play button is shown normally.

I can reproduce this in the Xcode Simulator but I am a total newbie with iOS dev and Xcode. A breakpoint was set in FLEXKeyboardShortcutManager.m > + (void) load > line 175 ((void(*)(id, SEL, id))objc_msgSend)(slf, swizzledSendEventSelector, event); I don't know if that is very helpful as i think FLEX isn't in the AppStore or TestFlight release?!

If I try to open the same video in RocketChat Experimental i get a blank, grey webview. The same url on desktop Safari loads the video normally.

This may be related to #2248 but my app crashes instead of a hanging loading screen.

What can I do to help finding the cause of this 🐛?

rafaelks commented 5 years ago

@farmio Thanks for opening the issue! Could you upload this video to me (rafael.kellermann) in our Community server (open.rocket.chat)?

jharris4 commented 5 years ago

I just came here looking for info about why mp4 videos won’t play on the iOS client.

For months (years?) we haven’t been able to play mp4 videos, it just shows a black preview screen and won’t play.

Is there anything I can do to help resolve the issue? Thanks!

rafaelks commented 5 years ago

@jharris4 Do you see other kinds of attachment, like images and documents?

jharris4 commented 5 years ago

@rafaelks images seem to work fine.

jharris4 commented 5 years ago

In case it helps, we're running Server version 0.64.2 and the iOS app version 3.4.0 (248)

rafaelks commented 5 years ago

@jharris4 We're requiring at least 0.65+ on this release, but you should probably update to latest... https://rocket.chat/docs/developer-guides/mobile-apps/supported-servers-versions/#supported-servers-versions

Could try updating it and see if the issue gets resolved?

jharris4 commented 5 years ago

Just a quick update, we’ve upgraded our server to 1.0.3 and videos still won’t play on iOS. (Also now on iOS client version 3.5.0)

Ironically I tested by recording a video on my iPhone and uploading via the iOS app, and it plays fine on the desktop app, but still doesn’t play on the iOS app