debugging crash with Cypress test framework

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.

debugging crash with Cypress test framework

Postby zakalwe » Fri May 08, 2020 3:03 pm

I am trying to use Cypress (cypress.io) to test a cef based app. The test framework uses remote debugging, it also adds a couple of extensions via command line. The first issue I ran into is that it specifies two extensions in the command line, separated by a '.' but CEF was expecting ';'. I changed that code to separate the extensions via '.' and got a little further. I have not looked at these extensions yet to try to understand what they do, however I will note that Cypress works for testing Chrome and Electron just fine.

My app us based on cefclient with minimal modifications. Running on Mac OSX. I compiled with no sandbox.
cef_binary_81.3.1+gb2b49f1+chromium-81.0.4044.113_macosx64

I've attempted to debug this for a while but a couple of things were elusive. First, I downloaded symbols, and also get the set target.source-map to give me source level debugging.
However, I am seeing this in lldb:

Chromium Embedded Framework was compiled with optimization - stepping may behave oddly; variables may not be available.

how do I compile against a debug cef binary? I thought I was - what can I check to make sure I'm linking with a debug binary? Is there a required argument to cmake I'm missing?

I may be able to reproduce this just by trying to load the extensions. There are two so I'm now going to see if only one or both cause this crash.

Now the app is crashing here:

EXC_BAD_ACCESS (code-1, address=0x0)

#0 0x000000010b53b3b6 in ThemeService::DoSetTheme(extensions::Extension const*, bool) at /Users/johnb/cloudwing/cef_binary/chromium/src/chrome/browser/themes/theme_service.cc:592
#1 0x000000010b53cd46 in ThemeService::ThemeObserver::OnExtensionLoaded(content::BrowserContext*, extensions::Extension const*) at /Users/johnb/cloudwing/cef_binary/chromium/src/chrome/browser/themes/theme_service.cc:126
#2 0x00000001083a1631 in extensions::ExtensionRegistry::TriggerOnLoaded(extensions::Extension const*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/browser/extension_registry.cc:64
#3 0x0000000108f06dac in extensions::CefExtensionSystem::NotifyExtensionLoaded(extensions::Extension const*) at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:646
#4 0x0000000108f05adc in extensions::CefExtensionSystem::LoadExtension(extensions::CefExtensionSystem::ComponentExtensionInfo const&, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:579
#5 0x0000000108f04eea in extensions::CefExtensionSystem::LoadExtension(std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:311
#6 0x0000000108f076bf in extensions::(anonymous namespace)::LoadExtensionOnUIThread(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:106
#7 0x0000000108f07802 in void base::internal::FunctorTraits<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), void>::Invoke<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>&&, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >&&, base::FilePath&&, bool&&, scoped_refptr<CefRequestContext>&&, scoped_refptr<CefExtensionHandler>&&) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/bind_internal.h:399
#8 0x0000000108f07770 in void base::internal::InvokeHelper<false, void>::MakeItSo<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>&&, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >&&, base::FilePath&&, bool&&, scoped_refptr<CefRequestContext>&&, scoped_refptr<CefExtensionHandler>&&) [inlined] at /Users/johnb/cloudwing/cef_binary/chromium/src/base/bind_internal.h:599
#9 0x0000000108f07764 in void base::internal::Invoker<base::internal::BindState<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, void ()>::RunImpl<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), std::__1::tuple<base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), std::__1::tuple<base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) [inlined] at /Users/johnb/cloudwing/cef_binary/chromium/src/base/bind_internal.h:672
#10 0x0000000108f07750 in base::internal::Invoker<base::internal::BindState<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, void ()>::RunOnce(base::internal::BindStateBase*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/bind_internal.h:641
#11 0x000000010926a6e3 in base::OnceCallback<void ()>::Run() && [inlined] at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/callback.h:98
#12 0x000000010926a689 in base::TaskAnnotator::RunTask(char const*, base::PendingTask*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/common/task_annotator.cc:142
#13 0x0000000109286e54 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*, bool*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:365
#14 0x0000000109286b67 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:219
#15 0x0000000109307cc4 in base::MessagePumpCFRunLoopBase::RunWork() at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:491
#16 0x00000001092ff67a in cef_time_delta ()
#17 0x000000010930762f in base::MessagePumpCFRunLoopBase::RunWorkSource(void*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:467
#18 0x00007fff4354de33 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#19 0x00007fff4354ddd9 in __CFRunLoopDoSource0 ()
#20 0x00007fff4353179b in __CFRunLoopDoSources0 ()
#21 0x00007fff43530d65 in __CFRunLoopRun ()
#22 0x00007fff4353066e in CFRunLoopRunSpecific ()
#23 0x00007fff4278f1ab in RunCurrentEventLoopInMode ()
#24 0x00007fff4278eee5 in ReceiveNextEventCommon ()
#25 0x00007fff4278ec76 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#26 0x00007fff40b2677d in _DPSNextEvent ()
#27 0x00007fff40b2546b in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#28 0x00007fff40b1f588 in -[NSApplication run] ()
#29 0x000000010930899c in base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:829
#30 0x0000000109306fd2 in base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:186
#31 0x00000001092877db in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:463
#32 0x0000000109245468 in base::RunLoop::Run() at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/run_loop.cc:155
#33 0x0000000108ee5fe6 in CefRunMessageLoop() at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/context.cc:307
#34 0x0000000100229a4a in ::cef_run_message_loop() at /Users/johnb/cloudwing/cef/cef-macosx64/cef_binary/libcef_dll/wrapper/libcef_dll_dylib.cc:991
#35 0x000000010022c3a9 in CefRunMessageLoop() at /Users/johnb/cloudwing/cef/cef-macosx64/cef_binary/libcef_dll/wrapper/libcef_dll_wrapper.cc:134
#36 0x000000010009ae01 in client::MainMessageLoopStd::Run() at /Users/johnb/cloudwing/cef/shared/browser/main_message_loop_std.cc:14
#37 0x000000010008ba05 in client::(anonymous namespace)::RunMain(int, char**) at /Users/johnb/cloudwing/cef/client/cefclient_mac.mm:421
#38 0x000000010008af42 in main at /Users/johnb/cloudwing/cef/client/cefclient_mac.mm:443
#39 0x00007fff6f4ba3d5 in start ()
#40 0x00007fff6f4ba3d5 in start ()
zakalwe
Newbie
 
Posts: 7
Joined: Thu Jan 23, 2020 3:49 pm

Re: debugging crash with Cypress test framework

Postby magreenblatt » Fri May 08, 2020 3:12 pm

CEF does not support most Chrome extensions (details here). At the same time, loading an extension should also not crash. Please provide details about the extensions that you are trying to load.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: debugging crash with Cypress test framework

Postby zakalwe » Fri May 08, 2020 3:33 pm

I've uploaded the two extensions, zipped. No idea if this matters, but on my system they are unzipped and the paths point the directories where they live. This command line is controlled by cypress so I can't change it (might possibly be able to but not easily).

Running with parameter to load only 'CypressExtention' crashes as well, but at a different spot:

#0 0x0000000109a0ec30 in logging::LogMessage::~LogMessage() at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/logging.cc:953
#1 0x000000010b8eabbe in extensions::(anonymous namespace)::ParseHelper(extensions::Extension*, char const*, extensions::APIPermissionSet*, extensions::URLPatternSet*, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> >*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/common/manifest_handlers/permissions_parser.cc:238
#2 0x000000010b8e97e2 in extensions::PermissionsParser::Parse(extensions::Extension*, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> >*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/common/manifest_handlers/permissions_parser.cc:399
#3 0x000000010b8a56f1 in extensions::Extension::InitFromValue(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> >*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/common/extension.cc:592
#4 0x000000010b8a4bf7 in extensions::Extension::Create(base::FilePath const&, extensions::Manifest::Location, base::DictionaryValue const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/common/extension.cc:196
#5 0x000000010b8a4998 in extensions::Extension::Create(base::FilePath const&, extensions::Manifest::Location, base::DictionaryValue const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/extensions/common/extension.cc:155
#6 0x00000001097056f7 in extensions::CefExtensionSystem::CreateExtension(extensions::CefExtensionSystem::ComponentExtensionInfo const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) [inlined] at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:541
#7 0x00000001097056cc in extensions::CefExtensionSystem::LoadExtension(extensions::CefExtensionSystem::ComponentExtensionInfo const&, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:557
#8 0x0000000109704eea in extensions::CefExtensionSystem::LoadExtension(std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:311
#9 0x00000001097076bf in extensions::(anonymous namespace)::LoadExtensionOnUIThread(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>) at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/cef/libcef/browser/extensions/extension_system.cc:106
#10 0x0000000109707802 in void base::internal::FunctorTraits<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), void>::Invoke<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>&&, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >&&, base::FilePath&&, bool&&, scoped_refptr<CefRequestContext>&&, scoped_refptr<CefExtensionHandler>&&) at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/base/bind_internal.h:399
#11 0x0000000109707770 in void base::internal::InvokeHelper<false, void>::MakeItSo<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>&&, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >&&, base::FilePath&&, bool&&, scoped_refptr<CefRequestContext>&&, scoped_refptr<CefExtensionHandler>&&) [inlined] at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/base/bind_internal.h:599
#12 0x0000000109707764 in void base::internal::Invoker<base::internal::BindState<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, void ()>::RunImpl<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), std::__1::tuple<base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(void (*&&)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), std::__1::tuple<base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) [inlined] at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/base/bind_internal.h:672
#13 0x0000000109707750 in base::internal::Invoker<base::internal::BindState<void (*)(base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath const&, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler>), base::WeakPtr<extensions::CefExtensionSystem>, std::__1::unique_ptr<base::DictionaryValue, std::__1::default_delete<base::DictionaryValue> >, base::FilePath, bool, scoped_refptr<CefRequestContext>, scoped_refptr<CefExtensionHandler> >, void ()>::RunOnce(base::internal::BindStateBase*) at /Users/john.burkhardt/pathai/imaging/cloudwing/cef_binary/chromium/src/base/bind_internal.h:641
#14 0x0000000109a6a6e3 in base::OnceCallback<void ()>::Run() && [inlined] at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/callback.h:98
#15 0x0000000109a6a689 in base::TaskAnnotator::RunTask(char const*, base::PendingTask*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/common/task_annotator.cc:142
#16 0x0000000109a86e54 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*, bool*) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:365
#17 0x0000000109a86b67 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:219
#18 0x0000000109b07cc4 in base::MessagePumpCFRunLoopBase::RunWork() at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:491
#19 0x0000000109aff67a in cef_time_delta ()
#20 0x0000000109b0762f in base::MessagePumpCFRunLoopBase::RunWorkSource(void*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:467
#21 0x00007fff4354de33 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#22 0x00007fff4354ddd9 in __CFRunLoopDoSource0 ()
#23 0x00007fff4353179b in __CFRunLoopDoSources0 ()
#24 0x00007fff43530d65 in __CFRunLoopRun ()
#25 0x00007fff4353066e in CFRunLoopRunSpecific ()
#26 0x00007fff4278f1ab in RunCurrentEventLoopInMode ()
#27 0x00007fff4278eee5 in ReceiveNextEventCommon ()
#28 0x00007fff4278ec76 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#29 0x00007fff40b2677d in _DPSNextEvent ()
#30 0x00007fff40b2546b in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#31 0x00007fff40b1f588 in -[NSApplication run] ()
#32 0x0000000109b0899c in base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:829
#33 0x0000000109b06fd2 in base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) at /Users/johnb/cloudwing/cef_binary/chromium/src/base/message_loop/message_pump_mac.mm:186
#34 0x0000000109a877db in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:463
#35 0x0000000109a45468 in base::RunLoop::Run() at /Users/spotify-buildagent/buildAgent/work/215ce731d4621561/CEF3_git/chromium/src/base/run_loop.cc:155
#36 0x00000001096e5fe6 in CefRunMessageLoop() at /Users/johnb/cloudwing/cef_binary/chromium/src/cef/libcef/browser/context.cc:307
#37 0x0000000100229a4a in ::cef_run_message_loop() at /Users/johnb/cloudwing/cef/cef-macosx64/cef_binary/libcef_dll/wrapper/libcef_dll_dylib.cc:991
#38 0x000000010022c3a9 in CefRunMessageLoop() at /Users/johnb/cloudwing/cef/cef-macosx64/cef_binary/libcef_dll/wrapper/libcef_dll_wrapper.cc:134
#39 0x000000010009ae01 in client::MainMessageLoopStd::Run() at /Users/johnb/cloudwing/cef/shared/browser/main_message_loop_std.cc:14
#40 0x000000010008ba05 in client::(anonymous namespace)::RunMain(int, char**) at /Users/johnb/cloudwing/cef/client/cefclient_mac.mm:421
#41 0x000000010008af42 in main at /Users/johnb/cloudwing/cef/client/cefclient_mac.mm:443
#42 0x00007fff6f4ba3d5 in start ()
#43 0x00007fff6f4ba3d5 in start ()
Attachments
CypressExtension.zip
Looks like this one does the bulk of the work, sets up a socket io back to the test runner !?
(184.18 KiB) Downloaded 649 times
theme.zip
extension one (this seems to be the one from the original post's call stack.
(2.56 KiB) Downloaded 600 times
zakalwe
Newbie
 
Posts: 7
Joined: Thu Jan 23, 2020 3:49 pm

Re: debugging crash with Cypress test framework

Postby magreenblatt » Fri May 08, 2020 3:38 pm

Please add a bug.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: debugging crash with Cypress test framework

Postby zakalwe » Fri May 08, 2020 4:16 pm

Preparing bug...

In the meantime I downloaded cefclient release binary and it doesn't crash, appears to load the cypress extension because it pops up a new window showing it running.

So now I'd like to do a bit more testing before proceeding, starting with a clean debug build of cefclient to see if I can reproduce it there.
zakalwe
Newbie
 
Posts: 7
Joined: Thu Jan 23, 2020 3:49 pm

Re: debugging crash with Cypress test framework

Postby zakalwe » Fri May 08, 2020 4:58 pm

Verified that this crash happens in a clean debug build of cefclient. Bug filed here:

https://bitbucket.org/chromiumembedded/ ... ensions-in

I am hopeful that this can be worked out because it appears to load in release (although I haven't run it with Cypress to see if it can complete the connection and run tests)

Thanks,
John
zakalwe
Newbie
 
Posts: 7
Joined: Thu Jan 23, 2020 3:49 pm

Re: debugging crash with Cypress test framework

Postby magreenblatt » Fri May 08, 2020 5:27 pm

Thanks for creating the issue. Note that we will be looking at fixing the crashes, not resolving any other issues that may exist with the extensions (missing APIs, etc). That said, contributions to add this support would likely be welcome. You can find related details and guidance in the extension issue #1947 linked above.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: debugging crash with Cypress test framework

Postby garyzhang » Thu Dec 02, 2021 10:01 pm

Hi @zakalwe

I'm trying to test cef with Cypress, but don't know how. After doing a lot of search, you are the only person I found doing this way. Could you share how did you achieve it?

Regards,
Gary
garyzhang
Newbie
 
Posts: 1
Joined: Thu Dec 02, 2021 9:52 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 16 guests