android – Expo React Native FileSystem – Please make sure directory ‘(null)’ exists before calling downloadAsync Error


I have the problem that I can’t download an audio file with IOS, with Android everything works perfectly.

I check if the directory exists and if not I create it (works fine) but when I execute the command FileSystem.downloadAsync with IOS I get the error message [Error: Directory for ‘file:///var/mobile/Containers/Data/Application/5EAC4BD5-CFE0-4542-9F26-F0BE6E76D160/Documents/MyFile.mp3’
does not exist. Please make sure directory ‘(null)’ exists before calling downloadAsync].

of course i made sure that the directory was created beforehand. As I said, the same code works on Android.

The only difference to Android is that the path to the location looks different.

For both, I use the path from FileSystem.documentDirectory + /MyPath/MyFile.mp3 to save the file.

I just can’t find a solution, I would be happy if someone could help me.

I am using Expo SDK 48

Find solution to fix the Error

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img