shareAsync: Failed to share the file: Failed to find configured root that contains

Hi guys,
im using Expo SDK 37 with react-native-view-shot v3.1.2 and im getting into wired issue, “some” of my android users expecting the following error when capture screenshot:

Error: Failed to share the file: Failed to find configured root that contains /storage/emulated/0/Android/data/im.outa.AmbitoDolar/cache/ReactNative-snapshot-image6993239015783902665.png
  at value ([native code])
  at value ([native code])

this happens sporadically and I have no idea why :cry:

here the snippet from my code:

captureRef(shareViewContainerRef.current, {
  // opts
}).then(
  (uri) => {
    Sharing.shareAsync('file://' + uri);
  },
  (error) =>
    console.error('Unable to generate snapshot', error)
);

its /storage/emulated/0 directory an valid temporary files? i need some extra android permission to read that file?

This is one of the devices that throws an error:

Additionally create a bug in react-native-view-shot repository:

I remind you that this only happens with some androids, any advice will be welcome, thanks !!!

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