Replies: 3 comments 2 replies
-
The versions tested were not 84 and 89, but 87 and 89 |
Beta Was this translation helpful? Give feedback.
-
Hi Alex. We are in the process of preparing to go to version 119 of CefSharp. One of our Engineers is updating us to .Net 4.6.2 now. I am using the RenderProcessMessageHandler. I've tried to run timing loops for a few seconds to slow these non Main frames down, until I sent a receipt from the OnContextCreated function that it has been called back, but that does not work. It appears that the OnContextCreated would work on version 99.2.120. I would ideally run Javascript on the frame in the OnContextCreated function, but it does not receive all of the frames. I'm sure I'm not connecting all of the dots, could you please assist? Thank you, |
Beta Was this translation helpful? Give feedback.
-
I am getting this exception: "The ChromiumWebBrowser instance creates the underlying Chromium Embedded Framework (CEF) browser instance in an async fashion. The undelying CefBrowser instance is not yet initialized. Use the IsBrowserInitializedChanged event and check the IsBrowserInitialized property to determine when the browser has been initialized."} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am having much difficulty now loading the browser.
We have a WPF application. It was on version 75. I have been testing versions 84 and 89. The PCs are both on Windows 10 Personal and Enterprise.
This reason for this is referenced in my earlier post today:L:ocal PDF files not displayed. Question about versions. #4633
The error is: CefSharp.Wpf.ChromiumWebBrowser getbrowser method throws 'The ChromiumWebBrowser instance creates the underlying Chromium Embedded Framework (CEF) browser instance in an async fashion. The undelying CefBrowser instance is not yet initialized.
I initialize CefSettings shown below.
b__2_0() in C:\bms-04052023\bms-2\BMS_Client\POSClient\App.xaml.cs:line 43-var cefSettings = new CefSharp.Wpf.CefSettings
{
// RemoteDebuggingPort = 18888
LogSeverity = LogSeverity.Verbose,
//CachePath = SystemService.CefCacheDir,
//LogFile = SystemService.CefSharpLogFile
};
CefSharp.Cef.Initialize(cefSettings);
-The program throws an exception on the bolded line.: Also even if I set a breakpoint and wait for a minute, the browser never loads."IsLoaded" property is false. The "Isloading" property is also false.
public static void InvokeScript(ChromiumWebBrowser browser, string basecode, params string[] arguments)
{
var instance = browser.GetBrowser();
...
-When using version 87, the stack trace is shown below
Unhandled Exception: System.Exception: The ChromiumWebBrowser instance creates the underlying Chromium Embedded Framework (CEF) browser instance in an async fashion. The undelying CefBrowser instance is not yet initialized. Use the IsBrowserInitializedChanged event and check the IsBrowserInitialized property to determine when the browser has been initialized. I realise this is asynchronous. "IsInitialized" is true.
at CefSharp.Wpf.ChromiumWebBrowser.ThrowExceptionIfBrowserNotInitialized() in C:\projects\cefsharp\CefSharp\Internals\Partial\ChromiumWebBrowser.Partial.cs:line 329
at CefSharp.Wpf.ChromiumWebBrowser.GetBrowser() in C:\projects\cefsharp\CefSharp.Wpf\ChromiumWebBrowser.cs:line 2630
at POSBrowserInterface.CefInterface.InvokeScript(ChromiumWebBrowser browser, String basecode, String[] arguments) in C:\bms-04052023\bms-2\BMS_Client\POSBrowserInterface\CefInterface.cs:line 12
at BMSClient.POSClient.MainWindow.wnd_SizeChanged(Object sender, SizeChangedEventArgs e) in C:\bms-04052023\bms-2\BMS_Client\POSClient\MainWindow.xaml.cs:line 1396
at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Application.<>c.b__105_0(Object obj)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at BMSClient.POSClient.App.<>c.
at BloomNetClient.Common.Helpers.SingleStartup(Guid applicationIdentifier, String applicationName, ILog logger, Action startUp) in C:\bms-04052023\bms-2\BloomLink_Client\BloomNetClient.Common\Helpers.cs:line 130
at BMSClient.POSClient.App.Main() in C:\bms-04052023\bms-2\BMS_Client\POSClient\App.xaml.cs:line 35
The program '[28060] BMSClient.POSClient.exe' has exited with code 0 (0x0).
Please assist.
Thank you,
Ken
Beta Was this translation helpful? Give feedback.
All reactions