I got a fix for you guys. I struggled with that for my application on my windows users and it is really annoying.
However, I've found a valide workarround.
The error and crash happens due the thrown error in the plugin.
So you 2 options. Either you fix the race condition or you handle the Storage creation properly.
I am using 4 windows on my side and all of them have parallel access to the storage which makes everything complicated but however I could get it running without hassle once I put the creation in a while loop.
function createStore(){
return new Vuex.Store({
plugins: [
pathify.plugin,
createPersistedState({
throttle: 1000,
whitelist: (mutation) => true,
}),
createSharedMutations()
],
modules
})
}
let store
while(store === undefined){
try {
store = createStore()
break;
}
catch(e){
// alert("Error in Store, guess race condition. Recreating Storage." + e)
continue;
}
}
export default store
I got a fix for you guys. I struggled with that for my application on my windows users and it is really annoying.
However, I've found a valide workarround.
The error and crash happens due the
thrown error
in the plugin.So you 2 options. Either you fix the race condition or you handle the Storage creation properly.
I am using 4 windows on my side and all of them have parallel access to the storage which makes everything complicated but however I could get it running without hassle once I put the creation in a while loop.