Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcef is missed #9

Open
Sergey-Terekhin opened this issue Jun 3, 2018 · 3 comments
Open

libcef is missed #9

Sergey-Terekhin opened this issue Jun 3, 2018 · 3 comments

Comments

@Sergey-Terekhin
Copy link

Hi!
I try to create Avalonia app with CefGlue and get following error in runtime:

Unable to load DLL 'libcef': Не найден указанный модуль. (Exception from HRESULT: 0x8007007E)

I've added packages as in the readme and in the sample project:

    <PackageReference Include="VitalElement.CefGlue.Core" Version="0.9.0-build20-alpha" />
    <PackageReference Include="VitalElement.CefGlue.Core.Avalonia" Version="0.9.0-build20-alpha" />

StackTrace:

   at Xilium.CefGlue.Interop.cef_browser_host_t.create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_request_context_t* request_context)
   at Xilium.CefGlue.CefBrowserHost.CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, String url, CefRequestContext requestContext)
   at CefGlue.Avalonia.AvaloniaCefBrowser.ArrangeOverride(Size arrangeBounds)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ItemsPresenterBase.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.DockPanel.ArrangeOverride(Size arrangeSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Decorator.ArrangeOverride(Size finalSize)
   at Avalonia.Controls.Primitives.AdornerDecorator.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Controls.WindowBase.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteArrangePass()
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at FAFClient.Program.Main(String[] args) in H:\Projects\FAFClient.Net\FAFClient\Program.cs:line 13
@Sergey-Terekhin
Copy link
Author

I've downloaded x64 build from here (official builds): http://opensource.spotify.com/cefbuilds/index.html
And got following error Invalid Operation Exception - "Failed to create browser."

   at Xilium.CefGlue.CefBrowserHost.CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, String url, CefRequestContext requestContext)
   at CefGlue.Avalonia.AvaloniaCefBrowser.ArrangeOverride(Size arrangeBounds)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ItemsPresenterBase.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.DockPanel.ArrangeOverride(Size arrangeSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
   at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Decorator.ArrangeOverride(Size finalSize)
   at Avalonia.Controls.Primitives.AdornerDecorator.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
   at Avalonia.Controls.WindowBase.ArrangeOverride(Size finalSize)
   at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
   at Avalonia.Layout.Layoutable.Arrange(Rect rect)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteArrangePass()
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at FAFClient.Program.Main(String[] args) in H:\Projects\FAFClient.Net\FAFClient\Program.cs:line 13

NathanielACollier added a commit to NathanielACollier/dotnetCoreAvaloniaWebPad that referenced this issue Jul 31, 2018
@danwalmsley
Copy link

You need to add a reference to packages:
https://www.nuget.org/packages/VitalElement.CefGlue.Core.Win-x64/0.9.0-build20-alpha

someone also needs to update the build.cake script to generate a nuget with the native parts in for all platforms. I wont have time to do this myself.

build.cake actually shows you how to generate a package per platform.

@tttrrryyyyeer
Copy link

I run avalonia app in ubuntu 19.04 and catch

Unhandled Exception: System.NotSupportedException: cef_api_hash call is not supported. ---> System.DllNotFoundException: Unable to load shared library 'libcef' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibcef: cannot open shared object file: No such file or directory
   at Xilium.CefGlue.Interop.libcef.api_hash(Int32 entry)
   at Xilium.CefGlue.CefRuntime.CheckVersionByApiHash()
   --- End of inner exception stack trace ---
   at Xilium.CefGlue.CefRuntime.CheckVersionByApiHash()
   at Xilium.CefGlue.CefRuntime.Load(String path)
   at Xilium.CefGlue.CefRuntime.ExecuteProcess(CefMainArgs args, CefApp application, IntPtr windowsSandboxInfo)
   at CefGlue.Avalonia.CefGlueApplicationExtensions.<>c__DisplayClass0_0`1.<ConfigureCefGlue>b__0(T b)
   at Avalonia.Controls.AppBuilderBase`1.Start(AppMainDelegate main, String[] args)

Runtime: .Net Core 2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants