Open cokealmonacid opened 5 years ago
Im getting the following error when launch the app on android emulator and devices, on iOS emulator works fine:
action {type: "persist/REHYDRATE", payload: undefined, err: Error: No such file '/data/user/0/com.findmebikegps/files/persistStore/root'; /data/user/0/com.find…, key: "root"}
Actually im using for the storage redux-persist-filesystem-storage, if change it and use the exact same example of this repo have the following error:
action {type: "persist/REHYDRATE", payload: undefined, err: undefined, key: "root"}
This is the App.js file:
import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; /* Redux configuration */ import { applyMiddleware, compose, createStore } from 'redux'; import { persistStore, persistReducer } from 'redux-persist'; import FilesystemStorage from 'redux-persist-filesystem-storage'; import { PersistGate } from 'redux-persist/integration/react'; import { Provider } from 'react-redux'; import logger from 'redux-logger'; import thunk from 'redux-thunk'; import reducers from './src/reducers'; /* App Configuration */ import { name as appName } from './app.json'; import App from './src/App'; const persistedReducer = persistReducer({ key: 'root', keyPrefix: '', storage: FilesystemStorage, }, reducers); function configureStore(initialState) { const enhancer = compose( applyMiddleware(thunk, logger), ); return createStore(persistedReducer, initialState, enhancer); } const initialState = {}; export const store = configureStore(initialState); export const persistor = persistStore(store); class App extends Component { render() { return ( <Provider store={store}> <PersistGate loading={null} persistor={persistor}> <App /> </PersistGate> </Provider> ); } }
Dependencies versions:
"react": "16.6.3", "react-native": "0.58.3", "react-redux": "^6.0.0", "redux": "^4.0.1", "redux-logger": "^3.0.6", "redux-persist": "^5.10.0", "redux-persist-filesystem-storage": "^1.3.2",
https://github.com/robwalkerco/redux-persist-filesystem-storage/issues/47 and https://github.com/robwalkerco/redux-persist-filesystem-storage/pull/33/files are related
Im getting the following error when launch the app on android emulator and devices, on iOS emulator works fine:
action {type: "persist/REHYDRATE", payload: undefined, err: Error: No such file '/data/user/0/com.findmebikegps/files/persistStore/root'; /data/user/0/com.find…, key: "root"}
Actually im using for the storage redux-persist-filesystem-storage, if change it and use the exact same example of this repo have the following error:
action {type: "persist/REHYDRATE", payload: undefined, err: undefined, key: "root"}
This is the App.js file:
Dependencies versions: