react-native-blur: [Android] Fatal Exception: java.lang.IllegalArgumentException
I am using @react-native-community/blur": "^4.2.0"
Getting below crash issue in Firebase Crashlytics.

Fatal Exception: java.lang.IllegalArgumentException: Software rendering doesn't support drawRenderNode
at android.graphics.Canvas.drawRenderNode(Canvas.java:2317)
at eightbitlab.com.blurview.RenderEffectBlur.render(RenderEffectBlur.java:2)
at eightbitlab.com.blurview.PreDrawBlurController.draw(PreDrawBlurController.java:56)
at eightbitlab.com.blurview.BlurView.draw(BlurView.java:2)
at android.view.View.draw(View.java:23770)
at android.view.ViewGroup.drawChild(ViewGroup.java:5355)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:23)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5112)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:3)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 35
- Comments: 58 (6 by maintainers)
Commits related to this issue
- Android crash patch https://gist.github.com/artyorsh/cb8cf71a28be5ccde8f1926e06dbe3a8 https://github.com/Kureev/react-native-blur/issues/489\#issuecomment-1252169079 — committed to padcelona/react-native-blur by martigasco 2 years ago
- Apply suggestion to fix https://github.com/Kureev/react-native-blur/issues/489 — committed to M56-Studios/react-native-blur by tironiigor 2 years ago
- Update BlurViewManagerImpl.java Only use optimised if hardware acceleration isn't disabled fixes #489 — committed to bobvanratingen/react-native-blur by bobvanratingen 2 years ago
- fix(render node, android): fix #489 issue — committed to VictorioMolina/react-native-blur by VictorioMolina a year ago
Hey, do you guys have any idea of when will this patch be published on npm?
Should be fixed on latest
confirming that the patch works https://github.com/Kureev/react-native-blur/pull/512/files
I’m facing the same issue on Android API 32. On Android API 30 it’s running fine.
jineshmistry1312 do you know if this problem occurs on Android or iOS for your users?
Those who need a patch asap can try this (works for me, but use on your own risk)
Some details after research:
In latest updates, the package uses BlurView@2.0.2, so there is an affecting line.
Usage of RenderEffectBlur throws the IllegalArgumentException, because the
drawRenderNodefunction used in the algorithm requires hardware acceleration.Usage of
hardwareAccelerated=truein AndroidManifest doesn’t resolve the issueMy app crashes under a certain condition 100%. In my case, I navigated to a screen with react-navigation and the screen has a scrollview with a blur view in it. When I pop the screen while the blur view is displaying, it crashes, but if the blur view is not displaying on the screen because I scrolled down or up then it doesn’t crash. I hope this helps you guys figure out what’s going on.
i am also facing the same kind of issue. For example i am going from screen A to B , then from B to C. But if i goBack from screen C to B it crashes every single time.
The android library author said he would try to release a new version with a fix, so we’ll update when it’s ready
Same problem on React native 0.68.2 and react-native-blur 4.3.0.
@Kureev & everyone else here, I cannot reproduce this on real device / simulator running android 12. Please provide a a reproduction, I would like to address this. In the meantime @artyorsh patch is valid, but it’s basically running the less optimised non hardware-accelerated variant all the time, but at least it’s not crashing…