TryQuiet / quiet

A private, p2p alternative to Slack and Discord built on Tor & IPFS
https://www.tryquiet.org
GNU General Public License v3.0
1.89k stars 79 forks source link

Image messages cause iOS (maybe android) to become unusable #2526

Closed ikoenigsknecht closed 1 month ago

ikoenigsknecht commented 1 month ago

Found while testing 2.2.0 on iOS.

Reproducing

  1. Connect a mobile client to a desktop client
  2. Send an image from the desktop client
  3. Wait for the image to download on the mobile client
  4. See errors

Errors

Errors were of a couple variety but generally what I saw on the device were:

Exception thrown while executing UI block: -[FFFastImageView setOnClick:]: unrecognized selector sent to instance 0x109b462c0

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
    RCTUIManager.m:1205
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.208
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
3A5F992A-D1CD-312E-BD2E-F7C66343A417
3A5F992A-D1CD-312E-BD2E-F7C66343A417
CFRunLoopRunSpecific
GSEventRunModal
7BF01CFC-23F1-326A-AFD8-AD967FFECE28
UIApplicationMain
main
7BE2B757-3B3D-3E91-8CB7-74F3887660C7
Animated node with tag 501 does not exist

-[RCTNativeAnimatedNodesManager addAnimatedEventToView:eventName:eventMapping:]
    RCTNativeAnimatedNodesManager.mm:349
__73-[RCTNativeAnimatedModule addAnimatedEventToView:eventName:eventMapping:]_block_invoke
__56-[RCTNativeAnimatedModule uiManagerWillPerformMounting:]_block_invoke.49
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.208
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
3A5F992A-D1CD-312E-BD2E-F7C66343A417
3A5F992A-D1CD-312E-BD2E-F7C66343A417
CFRunLoopRunSpecific
GSEventRunModal
7BF01CFC-23F1-326A-AFD8-AD967FFECE28
UIApplicationMain
main
7BE2B757-3B3D-3E91-8CB7-74F3887660C7

In the logs I saw:

Error setting property 'onClick' of FastImageView with tag #1139: Exception thrown while executing UI block: -[FFFastImageView setOnClick:]: unrecognized selector sent to instance 0x107845f40
Error setting property 'onClick' of FastImageView with tag #1139: Exception thrown while executing UI block: 'parentNode' is a required parameter
Error setting property 'onClick' of FastImageView with tag #1139: Animated node with tag 227 does not exist

The errors seemed to change over time and would pop up every time I tried to go into a channel or click any UI element (e.g. the meatball menu).

Potential Solutions

  1. Figure out why FastImage isn't working for us (if it ever has)
  2. Remove FastImage and use React Native components directly

It's important to note that the main use of FastImage is for loading/caching images from the web and we are just pulling images from file URIs. Also development on this repo seems to have stalled a couple of years ago and we are on the latest version so we can't try updating.

kingalg commented 1 month ago

mobile@2.2.0-alpha.7 | iOS 376

Fixed.

(additional info - this was only an issue on ios, android was fine)