Page not fully loading

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Page not fully loading

Postby wolf24 » Tue Feb 16, 2021 12:28 pm

Hello,

Opening the URL https://www.lakemedelsverket.se/ in cefclient.exe does not fully load this page, the main content is missing.

Tested with this app: https://cef-builds.spotifycdn.com/cef_b ... nt.tar.bz2

Any idea how to get this working?

Thanks,
Wolf
wolf24
Newbie
 
Posts: 4
Joined: Tue Feb 16, 2021 12:12 pm

Re: Page not fully loading

Postby magreenblatt » Tue Feb 16, 2021 12:37 pm

Are there any error messages in the DevTools console?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Page not fully loading

Postby wolf24 » Tue Feb 16, 2021 1:02 pm

Yes. This is the debug log:

Code: Select all
[0216/190043.209:INFO:CONSOLE(1)] "ERROR [object Object]", source: https://www.lakemedelsverket.se/dist/main.js?v=20201207095638 (1)
[0216/190047.154:INFO:CONSOLE(1)] "ERROR Error: Uncaught (in promise): t: {"headers":{"normalizedNames":{},"lazyUpdate":null},"status":404,"statusText":"OK","url":"https://www.lakemedelsverket.se/api/episerver/v2.0/content/100?expand=*","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://www.lakemedelsverket.se/api/episerver/v2.0/content/100?expand=*: 404 OK","error":"\r\n<!DOCTYPE html>\r\n\r\n<html lang=\"sv\">\r\n<head>\r\n\r\n    <base href=\"/\">\r\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=2.0\" />\r\n\r\n    <title></title>\r\n\r\n    <!-- Open graph markup -->\r\n    <meta property=\"og:url\" />\r\n    <meta property=\"og:type\" content=\"article\" />\r\n    <meta property=\"og:description\" />\r\n    <meta property=\"og:image\" />\r\n    \r\n    <!-- Search indexing -->\r\n    <meta name=\"robots\">\r\n    <meta name=\"robots\">\r\n    <meta name=\"description\">\r\n\r\n\r\n    <!-- Favicon -->\r\n    <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/dist/assets/favicons/apple-touch-icon.png\">\r\n    <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/dist/assets/favicons/favicon-32x32.png\">\r\n    <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/dist/assets/favicons/favicon-16x16.png\">\r\n    <link rel=\"manifest\" href=\"/dist/assets/favicons/site.webmanifest\">\r\n    <link rel=\"mask-icon\" href=\"/dist/assets/favicons/safari-pinned-tab.svg\" color=\"#66c0f6\">\r\n    <link rel=\"shortcut icon\" href=\"/dist/assets/favicons/favicon.ico\">\r\n    <meta name=\"msapplication-TileColor\" content=\"#ffffff\">\r\n    <meta name=\"msapplication-config\" content=\"/dist/assets/favicons/browserconfig.xml\">\r\n    <meta name=\"theme-color\" content=\"#ffffff\">\r\n\r\n    <!-- Turn off Edge phone number format recognition -->\r\n    <meta name=\"format-detection\" content=\"telephone=no\">\r\n\r\n    <link rel=\"stylesheet\" href=\"/dist/styles.css?v=20201207095638\" />\r\n\r\n    \r\n\r\n    <!-- ReadSpeaker script -->\r\n    <script type=\"text/javascript\">\r\n        window.rsConf = {\r\n            general: {\r\n                usePost: true,\r\n                selectionPlayer: '#readspeaker_button1'\r\n            },\r\n            params: '//cdn1.readspeaker.com/script/11228/webReader/webReader.js?pids=wr'\r\n        };\r\n    </script>\r\n    <script src=\"//cdn1.readspeaker.com/script/11228/webReader/webReader.js?pids=wr\" type=\"text/javascript\"></script>\r\n<script type=\"text/javascript\">var appInsights=window.appInsights||function(config){function t(config){i[config]=function(){var t=arguments;i.queue.push(function(){i[config].apply(i,t)})}}var i={config:config},u=document,e=window,o=\"script\",s=\"AuthenticatedUserContext\",h=\"start\",c=\"stop\",l=\"Track\",a=l+\"Event\",v=l+\"Page\",r,f;setTimeout(function(){var t=u.createElement(o);t.src=config.url||\"https://az416426.vo.msecnd.net/scripts/a/ai.0.js\";u.getElementsByTagName(o)[0].parentNode.appendChild(t)});try{i.cookie=u.cookie}catch(y){}for(i.queue=[],r=[\"Event\",\"Exception\",\"Metric\",\"PageView\",\"Trace\",\"Dependency\"];r.length;)t(\"track\"+r.pop());return t(\"set\"+s),t(\"clear\"+s),t(h+a),t(c+a),t(h+v),t(c+v),t(\"flush\"),config.disableExceptionTracking||(r=\"onerror\",t(\"_\"+r),f=e[r],e[r]=function(config,t,u,e,o){var s=f&&f(config,t,u,e,o);return s!==!0&&i[\"_\"+r](config,t,u,e,o),s}),i}({instrumentationKey:\"f41a3a53-a9ca-4992-8aa1-afa7c4d8c650\",sdkExtension:\"a\"});window.appInsights=appInsights;appInsights.queue&&appInsights.queue.length===0&&appInsights.trackPageView();</script></head>\r\n<body>\r\n    \r\n\r\n\r\n\r\n<input name=\"__RequestVerificationToken\" type=\"hidden\" value=\"R6RqSDn5oyvHfdl-GbL50PBg3vHOlLA5uzlIuJPK9CCMDvVJZWF1bCd5Wv5sE9lyq86e-1VrfISyVGuK_we6LyTfxNrcQmVhcBDwLjLwoWk1\" />\r\n\r\n<app-root></app-root>\r\n\r\n<script  src=\"/dist/runtime.js?v=20201207095638\"></script>\r\n<script nomodule src=\"/dist/polyfills-es5.js?v=20201207095638\"></script>\r\n<script  src=\"/dist/polyfills.js?v=20201207095638\"></script>\r\n<script  src=\"/dist/main.js?v=20201207095638\"></script>\r\n\r\n    \r\n</body>\r\n</html>"}", source: https://www.lakemedelsverket.se/dist/main.js?v=20201207095638 (1)
wolf24
Newbie
 
Posts: 4
Joined: Tue Feb 16, 2021 12:12 pm

Re: Page not fully loading

Postby HarmlessDave » Tue Feb 16, 2021 6:52 pm

That looks like errors in the scripts sent from the server, not a CEF problem.

What errors do you get in Google Chrome with the F12 developer tools open?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Page not fully loading

Postby wolf24 » Wed Feb 17, 2021 2:28 am

In Google Chrome, I don't get an error in the developer tools. And the page is fully loaded.

Also other Chromium based browsers don't show an error in the dev tools. I only see this error in CEF.
wolf24
Newbie
 
Posts: 4
Joined: Tue Feb 16, 2021 12:12 pm

Re: Page not fully loading

Postby amaitland » Wed Feb 17, 2021 2:50 am

Have you considered they are blocking CEF based browsers? Wouldn't be the first time.

Try changing your user agent
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: Page not fully loading

Postby amaitland » Wed Feb 17, 2021 2:56 am

They may also be relying on features that are implemented in Chromium and not in CEF. CEF only supports a subset of the features chromium does.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: Page not fully loading

Postby ndesktop » Wed Feb 17, 2021 4:23 am

Me I get a 400. It looks like is originating from a script - https://www.lakemedelsverket.se/api/routing?isEpi=false :
Code: Select all
main.js?v=20201207095638:formatted:7353 ERROR t {headers: e, status: 400, statusText: "OK", url: "https://www.lakemedelsverket.se/api/routing?isEpi=false", ok: false, …}
Ze @ main.js?v=20201207095638:formatted:7353
e.handleError @ main.js?v=20201207095638:formatted:7365
(anonymous) @ main.js?v=20201207095638:formatted:10642
...

and
Code: Select all
error: "Bad Request"
headers: e {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
message: "Http failure response for https://www.lakemedelsverket.se/api/routing?isEpi=false: 400 OK"
name: "HttpErrorResponse"
ok: false
status: 400
statusText: "OK"
url: "https://www.lakemedelsverket.se/api/routing?isEpi=false"

400 is Bad request which is done by ... their scripts (?!).
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Page not fully loading

Postby wolf24 » Wed Feb 17, 2021 5:37 am

Have you considered they are blocking CEF based browsers? Wouldn't be the first time.
Try changing your user agent


Changing the user agent did not change this behavior.

Honestly, I don't think that they block CEF.

I use CEF4Delphi which contains a very basic demo ("SimpleBrowser") that seems to work correctly with this page, the page is fully loaded. With the more advanced demo "MiniBrowser" (or also with the official cefsample.exe) this page does not work.

So it seems that this page stops working when certain CEF features are used.
wolf24
Newbie
 
Posts: 4
Joined: Tue Feb 16, 2021 12:12 pm

Re: Page not fully loading

Postby ndesktop » Wed Feb 17, 2021 6:55 am

With 4280 (modified, I admit): cefsimple loads normally, cefclient does not. Windows 10 x64.
Spotify builds do not deliver cefsimple.exe, I'm afraid.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 68 guests