Web page with JSON hangs

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.

Web page with JSON hangs

Postby rjxray » Mon Sep 24, 2018 6:37 am

I recently updated my Windows app from CEF 3.3071 to CEF 3.3538.
Mostly it works well but this page https://geocv.com/version-features-equi ... 67thstreet which works in my app using 3.3071 now just hangs when I load it.
I see this error in my console: "Uncaught (in promise) SyntaxError: Unexpected end of JSON input"
I don't see that error when using 3.3071.
It loads OK in the 3.3538 cefclient so I guess there is something I need to change in my app?
I'm unfamiliar with JSON so any help would be greatly appreciated.
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

Re: Web page with JSON hangs

Postby Czarek » Mon Sep 24, 2018 7:41 am

Are you modifying requests in any way? Are you using resource handler or request handler or changing user agent string?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Web page with JSON hangs

Postby rjxray » Mon Sep 24, 2018 8:05 am

I'm creating the browser with these settings
Code: Select all
   CefBrowserSettings settings;
   settings.web_security = STATE_DISABLED;
   settings.webgl = STATE_ENABLED;
   settings.windowless_frame_rate = 30;

I'm using off screen rendering
I'm loading with GetMainFrame()->LoadURL(url);

I'm copying these binaries and resources from CEF (and openFrameworks, the development framework I am using)
robocopy "$(ProjectDir)libs/CEF/win64/$(Configuration)/" "$(ProjectDir)bin/" "*.dll" "*.bin" /njs /njh /np /fp /bytes /XX
robocopy "$(ProjectDir)libs/CEF/win64/Resources/" "$(ProjectDir)bin/" "*" /E /njs /njh /np /fp /bytes /XX
for /d %%f in ("$(OF_ROOT)\libs\*") do (if exist "%%f\lib\vs\$(Platform_Actual)\*.dll" ( robocopy "%%f\lib\vs\$(Platform_Actual)" "$(ProjectDir)bin" "*.dll" /njs /njh /np /fp /bytes /XX ))

As far as I can see there is nothing else
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

Re: Web page with JSON hangs

Postby Czarek » Mon Sep 24, 2018 8:35 am

Did you run cefclient with the --off-screen-rendering-enabled flag? Test cefclient with the same settings as yours. Compare cefclient binary files with yours.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Web page with JSON hangs

Postby Czarek » Mon Sep 24, 2018 8:43 am

Also custom builds with use_jumbo_build=true option can sometimes result in strange issues, this option is not stable.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Web page with JSON hangs

Postby rjxray » Mon Sep 24, 2018 9:16 am

Thanks, i'll check those things
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

Re: Web page with JSON hangs

Postby rjxray » Mon Sep 24, 2018 10:33 am

Running cefclient with the --off-screen-rendering-enabled flag loads the page OK.
I am not using the use_jumbo_build=true option
cef.pak, cef_100_percent.pak, cef_200_percent.pak, cef_extensions.pak, devtools_resources.pak are all identical to cef_client copies
chrome_elf.dll, d3dcompiler_43.dll, d3dcompiler_47.dll, libcef.dll, libEGL.dll, libGLESv2.dll are all identical to cef_client copies
natives_blob.bin, snapshot_blob.bin, v8_context_snapshot.bin are all identical to cef_client copies.
locales folder is identical to the cefclient folder
cefclient has a swiftshader folder containing libEGL.dll and libGLESv2.dll these are different to the versions in the cefclient folder.
I tried copying the cefclient\swiftshader folder to my folder, but it made no difference.
I tried overwriting my libEGL.dll and libGLESv2.dll files with those from the cefclient swiftshader folder but it made no difference.
I have a win\compatibility.manifest file which cefclient does not have.
its contents are
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!--The ID below indicates application support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!--The ID below indicates application support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!--The ID below indicates application support for Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <!--The ID below indicates application support for Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <!--The ID below indicates application support for Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
    </application>
  </compatibility>
</assembly>

I couldn't build when I removed it so I removed the reference from my project properties and now I can build and run but the web page still hangs.

So I think I've checked everything?

By the way I discovered that cefsimple will also load the url without problems, which supports the idea that I have something added which is not needed, maybe a hangover from the earlier version. I'll keep looking.
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

Re: Web page with JSON hangs

Postby rjxray » Tue Sep 25, 2018 2:41 am

Fixed.
It was
Code: Select all
settings.web_security = STATE_DISABLED

that caused the problem.
I don't know why it was there
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 25 guests