I have an Angular Application running over Electron that is already in production, however I've made an update that is not yet released that has a serious issue.
I use IndexedDB do store the application data, and as for now I've been loading the app internal website with
mainWindow.loadURL('file://' + __dirname + '/index.html#');
However I had to create a custom protocol with registerBufferProtocol for loading files and now I load them like this
mainWindow.loadURL('customprotocol://localhost/index.html#');
It seems that Electron thinks this is a different website, so instead of accessing the same localStorage and indexedDB instances it provides a new one.
I need to find a way to instantiate and load the main browser windows using my new protocol, but keeping the old app data accessible in the same way as before.
On the Developer Tools Window of the old version of my app shows the localStorage session belongs to file://
However in the new App Version I made it shows that the localStorage session belongs to the other "new" site which loads with my custom protocol fredata://localhost
On the App Data path, the folder of all the different website files are still present, I was wondering if a simple rename would suffice, but I don't think it is that simple.


