ecency / ecency-mobile

Ecency Mobile - reimagined social blogging, contribute and get rewarded (for Android and iOS)
https://ecency.com
MIT License
233 stars 69 forks source link

[BUG] Android app crashes on scroll end in particular post #2186

Closed noumantahir closed 2 years ago

noumantahir commented 2 years ago

Describe the bug On android, if you visit post Vision by Ecency an scroll down to the bottom of comments, app would crash.

To Reproduce Steps to reproduce the behavior:

  1. Go to Ecency profile
  2. Click on 'Vision - Token Exchange...' post
  3. Scroll down to very bottom
  4. See error

Expected behavior It should not crash

Screenshots or Video https://user-images.githubusercontent.com/6298342/152206521-9eadf916-7a18-40e1-bdc3-b09ca384b126.mov

Smartphone (please complete the following information):

Additional context After doing some assessments and play around with PostDisplayView, it appears the bug is being caused by our latest integration of inline video players. The way I test is, I removed inline video player from rendering and app did not crash.

https://user-images.githubusercontent.com/6298342/152207030-45dcc06e-4205-4528-b2e7-5553e474c264.mov

It could only be related to youtube player or WebView rendering inside scroll view.

noumantahir commented 2 years ago

Not all posts with videos crashes, but some crash in same way

noumantahir commented 2 years ago

Created an issue on react-native-webview repo, after trying out a number of fixes I concluded the bug is coming from webview package itself.

https://github.com/react-native-webview/react-native-webview/issues/2364

noumantahir commented 2 years ago

As a quick fix however, I will try one more hack and if that does not work I will make android fallback to old style we had uptill we have a proper fix for this

noumantahir commented 2 years ago

Update: it appears not all android devices are affected by this... We will have to test various android SDK levels... just tried on SDK 30 and app is not crashing there...

noumantahir commented 2 years ago

Check various android SDKs for webview response...

noumantahir commented 2 years ago

@aliseyalvi do you think you can continue on this one.... test inline video player in various different SDK levels and see which ones are stable and which crashes... if it crashes on SDK 32 and not on SDK 29.. we can assume it's crashing only for 31 and above, then we can exclude SDK 31+ from inline video and further dive deep with that information for the fix.

feel free to reach out for any asisstance..