Kureev / react-native-blur

React Native Blur component
MIT License
3.74k stars 555 forks source link

Exception thrown while executing UI block: -[BlurView setOnClick:]: unrecognized selector sent to instance 0x11898b1c0 #611

Open neeteshraj opened 3 months ago

neeteshraj commented 3 months ago

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

44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke RCTUIManager.m:1211 44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke_2 __RCTExecuteOnMainQueue_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_drain _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal -[UIApplication _run] UIApplicationMain main start_sim 0x0 0x0

I am using react-native 0.73.6

DarvilCZE commented 3 months ago

Hi all,

We are having the same issue. The happens to us when the BlurView component is a direct child of some Touchable component. In our case, it was TouchableWithouFeedback.

But we found a workaround for fixing it. When we put a simple View between the Touchable and the BlurView the app doesn't crash anymore.

The initial implementation, which crashes:

<TouchableWithoutFeedback onPress={() => {}}>
    <BlurView ... >
        {...}
    </BlurView>
</TouchableWithoutFeedback>

Working implementation:

<TouchableWithoutFeedback onPress={() => {}}>
    <View>
        <BlurView ... >
            {...}
        </BlurView>
    </View>
</TouchableWithoutFeedback>
berdyshev commented 3 months ago

I'm experiencing the same issue. @DarvilCZE thanks for the workaround, waiting for the fix