ReactViewGroup not displayed because it is too large to fit into a software layer (or drawing cache)



I started getting this message a few days ago. I thought it was caused by the SDK 29 update, but then I downgraded to 28 then 27 and i’m still getting it.

ReactViewGroup not displayed because it is too large to fit into a software layer (or drawing cache), needs 12902400 bytes, only 8294400 available.

This happens when I call Expo.takeSnapshotAsync. I tried setting the quality param to 0.1 and the height and width to around 44 because I thought that might be the problem but no success.
I also tried to snapShot a simple view with a backgroundColor and some text, same error.
The strange part is that this happens only on Android in production, using the apk that’s on the Play Store.
I am not able to reproduce it by using the app via Expo, so the only way to debug this was to use adb logcat.

I surrounded the code with try catch and got this error (still on prod):
{ [Error: Failed to capture view snapshot] framesToPop: 1, code: 'E_UNABLE_TO_SNAPSHOT' }
I search the source code for it and noticed the method captureView in
causes the error.

Any idea on what causes this ?


Anyone ? My app is bugged in production because of this.


I was able to fix this issue by adding collapsable={false} to the View i was trying to snapshot and by setting it’s width and height to a fix pixels number. Setting flex: 1 or a percentage width/height wouldn’t work.
I have no idea why, but it’s the combination of these 2 params that made it for me. Furthermore, I found the collapsable property by wandering through the internet (it is mentioned no where in React-native docs) and I have no idea what it does.


Hey @emixis,

Glad you got it figured out. Sorry we couldn’t be of more help. Interesting that the collapsable property and setting a fixed value for width and height fixed it. Any ways, thank you for sharing with the community. Hopefully it helps someone in the future who encounters this issue.



closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.