Search code examples
c#wpflocal-storagewebbrowser-controldesktop-bridge

LocalStorage not found on Desktop Bridge WebBrowser


I have a converted WPF app with Desktop Bridge that has a WebBrowser which loads two AngularJS WebApps. An error is happening due to object localStorage, which WeBbrowser can't access, same error at both WebApps. The URL loaded is remote, there is nothing locally loaded in WebBrowser.

The exception happens when trying to execute "window.localStorage" (javaScript code of page loaded) and the error message is: System can't find the specified file. However, when I run the MSI installer and use it as a regular WPF app, everything works right.

EDIT

I've found that localStorage files from converted app are saved at path: %userprofile%\AppData\Local\Packages\PackageName\AC\Microsoft\Internet Explorer\DOMStore

But converted app when fails, this structure folder doesn't exist. I don't know why...

Do you know what it's causing the problem or any solution to it? Thanks.


Solution

  • I've tested in a lot of devices with Windows 10 and found that always fails when users have Anniversary Update but it works always OK when users have Creators Update.

    I don´t know the reason. I suspect is something that has been correct with this build.

    So I decided to retarget the App min version to Creators Update and everything is working now.