Open GhayoorUlHaq opened 4 years ago
Same here.
1+
It's a request to support please resolve this issue ASAP. Thank you!
I can confirm this bug with a different code path. I am using the BlurView as background in a react-navigation modal navigation screen. When using navigation.replace
to open another modal (which also renders a blur view) the app crashes with the same logcat output.
same thing with flatlist render items if there is only 1 item it works, otherwise it crashed
same thing with flatlist render items if there is only 1 item it works, otherwise it crashed
There is no issue with flatlist, if you simply add 2 blur views on same component, it will crash or render white area instead of blur.
Hit this too. Surprised when I found the root cause.
Hi I am getting is issue as well. I am rendering a list of card using flatlist. In the card component I am making a Text value blur for every card. But when i scroll App crashes. Can anybody please help.
Hi I am getting is issue as well. I am rendering a list of card using flatlist. In the card component I am making a Text value blur for every card. But when i scroll App crashes. Can anybody please help.
I tried simple hack. In my case I had number of cards in list. On each card there was a text with background blur. I took image background of same height & width for blur area I want and give blurRadius to image to create blur effect. But if you have multi line text then you need to break down that text into lines and then set image background for each line with blurRadius property. You can provide some more details of your case. It will be easier to figure out solution.
But still hoping to get this issue resolved in Library. 😌
I can confirm this bug with a different code path. I am using the BlurView as background in a react-navigation modal navigation screen. When using
navigation.replace
to open another modal (which also renders a blur view) the app crashes with the same logcat output.
I have a similar issue and found that disabling animations for the StackNavigator or the Screen prevents the crash (but you lose the nice transitions):
<Stack.Navigator
screenOptions={{
animationEnabled: false
}}
>
I believe this issue is also related to https://github.com/react-native-community/react-native-blur/issues/389.
Same here. Can't use BlurView as FlatList item..
I'm only using 1 BlurView and this crash occurs. It's not related to multiple BlurViews.
I'm only using 1 BlurView and this crash occurs. It's not related to multiple BlurViews.
Adding to this, I have validated (and I believe it's something simple to test) that you can have two BlurViews on a single component and not have any crashes.
In my short experience debugging this (which resulted in dropping the library for Android and implementing a workaround using WebView and CSS Blur filters) and looking at the other open issues in the library, these crashes could be related to animations and transitions (for example using inside an Animated.View or in conjunction with React Navigation JS transitions) predating on the same resources that BlurView requires.
This seems a really intensive process for Android and the implementation of the native BlurView library by Dimezis could be too naive for it to work in production environments, since the Blur is performed on the main thread.
But I honestly don't have the knowledge of native Android development to produce a more insightful comment, just hope this points someone in the right direction.
I'm only using 1 BlurView and this crash occurs. It's not related to multiple BlurViews.
Adding to this, I have validated (and I believe it's something simple to test) that you can have two BlurViews on a single component and not have any crashes.
In my short experience debugging this (which resulted in dropping the library for Android and implementing a workaround using WebView and CSS Blur filters) and looking at the other open issues in the library, these crashes could be related to animations and transitions (for example using inside an Animated.View or in conjunction with React Navigation JS transitions) predating on the same resources that BlurView requires.
This seems a really intensive process for Android and the implementation of the native BlurView library by Dimezis could be too naive for it to work in production environments, since the Blur is performed on the main thread.
But I honestly don't have the knowledge of native Android development to produce a more insightful comment, just hope this points someone in the right direction.
Thank you. That part about React Navigation animations helped me to resolve my problem. I just disabled React Navigation animations on screens that use BlurView and it worked as expected.
Just FI
android/app/build.gradle
dependencies {
.......
implementation('com.eightbitlab:blurview:1.6.6') {
force = true
}
}
Just FI
android/app/build.gradle
dependencies { ....... implementation('com.eightbitlab:blurview:1.6.6') { force = true } }
Confirmed , this solution works
This is still buggy. I've applied BlurView to @react-navigation/bottom-tabs in order to have a transparent blur bottom bar and the designs worked fine, but the app crashes every time the app is reloaded.
inside screenOptions on Tab.Navigator:
tabBarBackground: () => (
<View style={styles.blurContainer}>
<BlurView
style={styles.tabBar}
blurType="light"
blurAmount={5}
overlayColor="transparent"
/>
</View>
),
UPDATE: If anyone is trying to do the same as me (render a blurry tab bar navigation on React Native) you gotta verify first if it is rendered with useRef(), otherwise it will crash every first render.
Mencioned by @ndbroadbent in #194 , do something like this:
.
.
.
import React, {useRef} from 'react';
const menuBarRef = useRef(null);
<Tab.Navigator
screenOptions={{
tabBarBackground: () => (
<View ref={menuBarRef} style={styles.blurContainer}>
{menuBarRef?.current === null ? null : (
<BlurView
style={styles.tabBar}
blurType="light"
blurAmount={5}
overlayColor="transparent"
/>
)}
</View>
),
.
.
.
still got this crash, so sad
https://github.com/Kureev/react-native-blur/issues/384#issuecomment-950824345
this produces
` FAILURE: Build failed with an exception.
Could not resolve all files for configuration ':app:stagingDebugRuntimeClasspath'. Could not find com.eightbitlab:blurview:1.6.6. Searched in the following locations:`
for me, how would I install that implementation?
це виробляє
` ПОМИЛКА: Помилка збірки за винятком.
- Що пішло не так: не вдалося виконати завдання ":app:checkStagingDebugAarMetadata".
Не вдалося вирішити всі файли для конфігурації ":app:stagingDebugRuntimeClasspath". Не вдалося знайти com.eightbitlab:blurview:1.6.6. Шукали в таких місцях:`
для мене, як я можу встановити цю реалізацію?
same problem
Bug report
Summary
Android app crashes when used multiple blurView in one component. One BlurView in component is working fine.
Environment info
react-native info
output:Library version: 3.6.0
Steps to reproduce
Reproducible sample code
ADB Logcat Shows