Google earth is not loading in v93.1.1.140 · cefsharp/CefSharp · Discussion #3826 (original) (raw)
Hello Team,
I have downloaded the CefSharp.MinimalExample from the GitHub repo https://github.com/cefsharp/CefSharp.MinimalExample.
Which is having the CefSharp NuGet package with version 93.1.1.140, I am running WPF app on my windows 10 x64 machine (project platform set to x64 in visual studio).
And when I run the project and navigate to http://earth.google.com in the browser, the web page is not loading even after 2minutes.
I made some changes to the App.xaml file to enable WebGL, even after that, I observed the same behavior with Google earth.
settings.CefCommandLineArgs.Add("enable-gpu");
settings.CefCommandLineArgs.Add("enable-webgl");
Even same behavior observed with WinForms application also.
Can you guys please help me with this, am I missing any thing on configuration.
You must be logged in to vote
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Google Earth is using ShareArrayBuffer
which can be enabled with an origin trial which it seems like cef does not support.
Here is the relevant exception from the DevTools log:
[0925/090023.156:INFO:CONSOLE(1)] "Uncaught ReferenceError: SharedArrayBuffer is not defined", source: https://earth.google.com/static/9.146.0.2/earthwasm.js (1)
See: https://developer.chrome.com/blog/enabling-shared-array-buffer/
However I was able to get it working by enabling the SharedArrayBuffer feature via command line argument:
settings.CefCommandLineArgs.Add("enable-features", "SharedArrayBuffer");
You might need to clear the cache
folder.
See https://web.dev/cross-origin-isolation-guide/
You must be logged in to vote
0 replies
@campersau: Amazing, thanks a lot. That worked like a charm. ✔✔
@amaitland: Thanks for pointing out in the right direction. 👍👍
You must be logged in to vote
1 reply
However I was able to get it working by enabling the SharedArrayBuffer feature via command line argument:
This suggestion should come with a security disclaimer.
Background information:
I have created a discussion ticket last time on enabling geo-location in cefsharp (even with fixed longitude and latitude), @amaitland suggested to use emualtion.
Tried setting fixed values, but getting same issue.
Browser.GetDevToolsClient().Emulation.SetGeolocationOverrideAsync(37.2968617,-121.81741295,50);
@campersau : Do you have any suggestion on this on how to enable ?
#3719
You must be logged in to vote
0 replies
Hi @campersau:
i was going through few articles regarding ShareArrayBuffer is prone to "Spectre and Meltdown" attacks, and need to enable CORP.
https://developer.chrome.com/blog/enabling-shared-array-buffer/
https://web.dev/cross-origin-isolation-guide/
I am using below args, please let me know if that solve the problem of security.
//Isolates the browsing context exclusively to same-origin documents. Cross-origin documents are not loaded in the same browsing context.
settings.CefCommandLineArgs.Add("cross-origin-resource-policy", "same-site");
//A document can only load resources from the same origin, or resources explicitly marked as loadable from another origin
settings.CefCommandLineArgs.Add("cross-origin-opener-policy", "same-origin");
settings.CefCommandLineArgs.Add("cross-origin-embedder-policy", "require-corp");
settings.CefCommandLineArgs.Add("enable-features", "SharedArrayBuffer");
You must be logged in to vote
0 replies