Expo FileSystem + redux persist on detached app

Hi,
I’m having some reset trouble using redux-persist, I try to move from AsyncStorage to file storage as it seems to be a good alternative.
I’ve tried few options and this one seems to be the more appropriate: https://github.com/techwes/redux-persist-expo-fs-storage/tree/4877be61eeb1a42a329dcb5aa3c5026e766ef448
It uses expo FileSystem to store data in a file.
Note that I’ve detached from expo, I added the permission to read and write on external storage but I got this error.

M

'file:/data/user/0/fr.myapp.android/files/ExperienceData/%2540alanlanglois%252myapp/myapp' could not be created.

I suspect it might be related to the path it tries to add the folder, which might be good when it’s an expo experience but not when detached…

Any guess?

Thanks

Hmm, I’m not seeing anything obvious. Could you create a snack or git repo that demonstrates the issue?

1 Like

Hi @thetc
I’ve manage to make it work using react native fs librarie. It was painful to add / link this lib but it seems to work.
The only difference I can see is the path which differ (expoKit adds “ExperienceData/%2540alanlanglois%252Fmyapp/” to the path.
I’ve published two files I’ve edited, one using react-native-fs the other one expo fileSystem:
https://github.com/alanlanglois/ExpoFS

You can try to link it to one of your existing project using redux persist v5.

The error I get using expo FS is :
Error: Directory 'file:///data/user/0/fr.myapp.android/files/ExperienceData/%2540alanlanglois%252Fmyapp/appData' could not be created.

Thanks for your help,

Alan

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