-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several wallpapers not working due to CORS issue in loading file URL resources while using MS Edge Engine #1160
Comments
This is known issue, Edge webview player is still under development and not primary browser:
In CefSharp custom schemehandler is used for fetching resources; schemehandler is not supported by WebView2 yet:
Another option is to start a localhost server but that seemed like too much - starting a new server for each wallpapers. For now waiting for WebView2 to support custom schemehandler. There are also other concerns with using WebView2 - the method I use to pause browser rendering is not official and this is not thoroughly tested in WebView2 yet (especially since webview shares resources(?) with other apps.) |
Possible solution is to implement CORS proxy server in lively and run it locally then |
@rocksdanister hey, can u assign me for this issue? I'll fix it |
There's lightweight http server like Watson |
Describe the bug
Several of the default wallpapers such as "Rain v2", "Ripples" are unable to load and will either just show a blank screen or partially function without any images. This only happens while using MS Edge Webview Engine. Further digging deeper into this got me that the requests for resources such as images are blocked by CORS policy.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Simply the wallpapers should work in any engine as they are intended to.
Screenshots/Video
Here are screenshots detailing the evident case while loading "Rain v2":
Desktop (please complete the following information):
Additional context
Possible Solution:
Maybe this issue could be bypassed by setting edge://flags but I don't want to make a highly OS coupled browser vulnerable. While searching for other solutions I found this StackOverflow Answer. We just need to allow file resource access grant so we can use the flag
"--allow-file-access-from-files"
as mentioned in comment by mbassett on the first answer and use the rest of the suggestion in 1st answer. I guess by writingvar op = new CoreWebView2EnvironmentOptions("--allow-file-access-from-files");
and setting it as a parameter to the line 86 of the file lively/src/Lively/Lively.PlayerWebView2/MainWindow.xaml.cs might fix this.Log file (Important)
Log file attached here:
lively_log_20220402_150750.zip
The text was updated successfully, but these errors were encountered: