How can I build JCEF with a custom CEF?

Having problems with building or using the JCEF Java binding? Ask your questions here.

How can I build JCEF with a custom CEF?

Postby dennprog » Fri Feb 10, 2023 7:01 am

Hello. I need to build JCEF with a custom version of CEF for AltLinux. I built CEF branch=5359, got binaries. After I’ve updated JCEF to the commit 7000daa, configured it, replaced cef binaries from downloaded to mine and build it. But got errors when run Chrome.
Code: Select all
(java:6338): Gdk-WARNING **: 11:50:19.414: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
[0208/115019.526048:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[0208/115019.537976:FATAL:ax_node_data.cc(673)] Check failed: name.empty() == GetNameFrom() == ax::mojom::NameFrom::kAttributeExplicitlyEmpty (1 vs. 0)If the accessible name of Role::kApplication class: '' is being set to an empty string to improve the user experience, call `SetNameExplicitlyEmpty` instead of `SetName`.
#0 0x7fce4845eb82 base::debug::CollectStackTrace()
#1 0x7fce48381113 base::debug::StackTrace::StackTrace()
#2 0x7fce4839a3af logging::LogMessage::~LogMessage()
#3 0x7fce4839b1be logging::LogMessage::~LogMessage()
#4 0x7fce4a44a9d7 ui::AXNodeData::SetNameChecked()

What is correct way building with custom CEF?
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am

Re: How can I build JCEF with a custom CEF?

Postby magreenblatt » Fri Feb 10, 2023 11:31 am

The reported error is a debug check. Using a Release build of CEF should avoid it.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: How can I build JCEF with a custom CEF?

Postby dennprog » Mon Feb 13, 2023 2:02 am

I build a release.
Code: Select all
ninja -C out/Release_GN_x64 cefclient cefsimple chrome_sandbox
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am

Re: How can I build JCEF with a custom CEF?

Postby ndesktop » Mon Feb 13, 2023 7:37 am

This is a DCHECK_EQ.
Maybe you are building with DCHECK on ?
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: How can I build JCEF with a custom CEF?

Postby dennprog » Mon Feb 13, 2023 8:01 am

I build by this manual: https://bitbucket.org/chromiumembedded/ ... QuickStart
Code: Select all
export GN_DEFINES="use_sysroot=true use_allocator=none symbol_level=1 is_cfi=false use_thin_lto=false proprietary_codecs=true component=shared_library remove_webcore_debug_symbols=1 fastbuild=2 ffmpeg_branding=Chrome"
./cef_create_projects.sh
ninja -C out/Release_GN_x64 cefclient cefsimple chrome_sandbox
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am

Re: How can I build JCEF with a custom CEF?

Postby ndesktop » Mon Feb 13, 2023 1:20 pm

Maybe it's use_thin_lto?
Here is a discussion on forum.
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: How can I build JCEF with a custom CEF?

Postby dennprog » Mon Feb 20, 2023 11:25 am

Thank you @ndesktop, it helped. But now I have another problem when I run the browser, it crashes:
Code: Select all
(java:4333): Gdk-WARNING **: 12:23:18.387: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
[0217/122318.484506:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[0217/122318.734194:WARNING:alloy_constrained_window_views_client.cc(63)] No likely focused browser
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fa99d49d395, pid=4333, tid=4374
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.17.1+1) (build 11.0.17.1-ea+1)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.17.1-ea+1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libcef.so+0xad0f395]  constrained_window::CreateBrowserModalDialogViews(views::DialogDelegate*, aura::Window*)+0x55
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid4333.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=32
#

Can I see somewhere how builds CEF before it packs in an archive and downloads by JCEF? I needs to build mine with the same parameters.
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am

Re: How can I build JCEF with a custom CEF?

Postby magreenblatt » Mon Feb 20, 2023 11:50 am

The official build configuration is https://bitbucket.org/chromiumembedded/ ... figuration
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: How can I build JCEF with a custom CEF?

Postby dennprog » Thu Mar 02, 2023 8:17 am

After some digging and rebuilding I got this error:
Code: Select all
[0302/155511.810094:INFO:CONSOLE(1)] "Unsupported MIME type or codec:  video/mp4; codecs="avc3.4d001e,mp4a.40.02"", source: http://192.168.1.172:9200/desktop/static/js/4.cf73fa7a.chunk.js (1)

What's wrong in my build? This web site works in the native Chrome as usual.
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am

Re: How can I build JCEF with a custom CEF?

Postby dennprog » Mon Mar 13, 2023 3:29 am

dennprog wrote:After some digging and rebuilding I got this error:
Code: Select all
[0302/155511.810094:INFO:CONSOLE(1)] "Unsupported MIME type or codec:  video/mp4; codecs="avc3.4d001e,mp4a.40.02"", source: http://192.168.1.172:9200/desktop/static/js/4.cf73fa7a.chunk.js (1)

What's wrong in my build? This web site works in the native Chrome as usual.

It was resolved by adding parameters "proprietary_codecs=true ffmpeg_branding=Chrome" to GN_DEFINES.
dennprog
Newbie
 
Posts: 7
Joined: Fri Feb 10, 2023 6:58 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 15 guests