Hello,
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
.
EDIT
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 expo/android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/ViewShot.java at 41458d1de91544c41097818db21e44e9aa84688c · expo/expo · GitHub
causes the error.
Any idea on what causes this ?