Building new version fails with attribute directive ignored

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.

Re: Building new version fails with attribute directive igno

Postby magreenblatt » Tue Oct 09, 2018 3:33 pm

How are you running the message loop in your application? See the documentation and cefclient sample application for correct usage of OnScheduleMessagePumpWork.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building new version fails with attribute directive igno

Postby hhyyrylainen » Wed Oct 10, 2018 3:45 am

I tried googling the place where the processes get stuck and I found this thread: viewtopic.php?f=6&t=15118&start=10#p35681

And by running my program as: "LD_PRELOAD=lib/libcef.so ./LeviathanEditor --disable-gpu"
It works correctly!

So I guess the problem is the linking order as I am linking against X11?
hhyyrylainen
Techie
 
Posts: 14
Joined: Tue Apr 10, 2018 3:08 am

Re: Building new version fails with attribute directive igno

Postby magreenblatt » Wed Oct 10, 2018 4:35 am

Or maybe there's another version of CEF somewhere else in your PATH?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building new version fails with attribute directive igno

Postby hhyyrylainen » Wed Oct 10, 2018 5:05 am

I changed "cef" to be the first entry in the list of libraries to link and now it works without needing LD_PRELOAD.

Now I'm back at my original problem of trying to load es6 javascript modules in CEF. It seems that version 3.3396.1777.g636f29b refuses to load them and doesn't even print any errors. And I can't use the latest version because it doesn't compile due to the warnings. I haven't tried to compile the latest version 10/09/2018 - CEF 3.3497.1837.g00188c7, yet. Could that have fixed the compiler warnings that prevent me building the version before that?

The module works perfectly when loaded with chrome from a local http server. But when I load it in CEF using custom http domain handler it fails at some point that doesn't print any info.
hhyyrylainen
Techie
 
Posts: 14
Joined: Tue Apr 10, 2018 3:08 am

Re: Building new version fails with attribute directive igno

Postby magreenblatt » Wed Oct 10, 2018 5:19 am

hhyyrylainen wrote:The module works perfectly when loaded with chrome from a local http server. But when I load it in CEF using custom http domain handler it fails at some point that doesn't print any info. It seems that version 3.3396.1777.g636f29b refuses to load them and doesn't even print any errors.

What Chrome version are you testing with? Does it work if you load from a local http server using the CEF sample application at the same version?

hhyyrylainen wrote:And I can't use the latest version because it doesn't compile due to the warnings.

I'm not seeing the`-Werror=attributes` warnings on Ubuntu 16.04 with GCC version 5.4.0, or with Clang. We should probably disable them in the CMake configuration for newer GCC versions.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building new version fails with attribute directive igno

Postby hhyyrylainen » Wed Oct 10, 2018 5:44 am

When loading the file through a local web server instead of with my CefFileResourceHandler it loads the modules correctly.

Do I need to set some header or a MIME type other than "application/javascript" for loading modules through the resource handler?
hhyyrylainen
Techie
 
Posts: 14
Joined: Tue Apr 10, 2018 3:08 am

Re: Building new version fails with attribute directive igno

Postby magreenblatt » Wed Oct 10, 2018 5:57 am

hhyyrylainen wrote:When loading the file through a local web server instead of with my CefFileResourceHandler it loads the modules correctly.

Do I need to set some header or a MIME type other than "application/javascript" for loading modules through the resource handler?

I don't know, I haven't tried it. Does the Network tab in DevTools show you any differences between the local server headers and the resource handler headers? Maybe it's passing something some additional request header (like Range) that your handler isn't handling?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building new version fails with attribute directive igno

Postby hhyyrylainen » Wed Oct 10, 2018 6:06 am

The requests look almost completely different:

This is the web server request:
Image

This is with the resource handler:
Image

But the reponse body looks identical in both cases. And the difference in the mime header is that mine doesn't have "; charset=UTF-8" in it.

Edit: I think I got it working by adding this code:
Code: Select all
     response->SetStatus(200);
        response->SetStatusText("OK");

and no change to the application/javascript MIME type.
Last edited by hhyyrylainen on Wed Oct 10, 2018 6:15 am, edited 1 time in total.
hhyyrylainen
Techie
 
Posts: 14
Joined: Tue Apr 10, 2018 3:08 am

Re: Building new version fails with attribute directive igno

Postby magreenblatt » Wed Oct 10, 2018 6:14 am

The headers look OK. Is there any difference in the response size, contents, etc?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building new version fails with attribute directive igno

Postby hhyyrylainen » Wed Oct 10, 2018 6:36 am

Yes I did get it working (in case you missed my edit to my previous post) by setting the HTTP status code to 200.

Now I just need to figure out why one of my two vp9 encoded videos refuses to play with this version of CEF. I guess I'll need to hack a newer version to compile as the video plays fine in the chrome version I have but fails in cefclient.

Edit: the only difference I found with the two videos was that one was encoded with an older version of ffmpeg and the newer video causes this in the log:

[1010/153005.461095:INFO:audio_manager_pulse.cc(206)] Not implemented!
[1010/153005.465644:INFO:audio_manager_pulse.cc(206)] Not implemented!

But the video doesn't fail. And shows the first frame. When I tried stripping the audio I don't get those messages anymore but the video doesn't play either.
hhyyrylainen
Techie
 
Posts: 14
Joined: Tue Apr 10, 2018 3:08 am

PreviousNext

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 95 guests