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

error: "Can't open dynamic library: cef_artifacts/libgdcef.dll" when execute a build for windows platform #45

Open
AaronClaros opened this issue Mar 2, 2024 · 9 comments

Comments

@AaronClaros
Copy link

AaronClaros commented Mar 2, 2024

OS: windows 11
Godot version: 4.2.1

Description: gdcef extension works fine on godot editor, but when I try to export for windows, an execute the build, I get this error stack

ERROR: Can't open dynamic library: cef_artifacts/libgdcef.dll. Error: Error 126: The specified module could not be found..
   at: (platform/windows/os_windows.cpp:394)
ERROR: GDExtension dynamic library not found: cef_artifacts/libgdcef.dll
   at: open_library (core/extension/gdextension.cpp:719)
ERROR: Failed loading resource: res://libs/gdcef.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
   at: (core/io/resource_loader.cpp:274)
ERROR: Error loading extension: res://libs/gdcef.gdextension
   at: (core/extension/gdextension_manager.cpp:234)

image

this is how looks in editor, vs windows build
image

this is how looks the windows build folder: (I added "cef_artifacts" folder manually)
image

@Lecrapouille
Copy link
Owner

Lecrapouille commented Mar 3, 2024

@AaronClaros

  • it seems the .gdextension file is missing in your export. It's present in demos/xx/libs: try to copy the folder.

Capture d’écran_2024-03-03_10-08-32

@Lecrapouille
Copy link
Owner

Reopen the ticket if needed

@Pastew
Copy link

Pastew commented Jun 9, 2024

@Lecrapouille
Hello, I have the same problem. Browser runs fine in Godot Editor. But it doesn't work when I export it to Windows.

Build files:

$ ls -lr .
total 68024
-rwxr-xr-x 1 Pastew 197121   593920 Jun 10 00:37  libgdcef.dll*
-rw-r--r-- 1 Pastew 197121    68352 Jun 10 00:37 'CEF in 3D.pck'
-rwxr-xr-x 1 Pastew 197121 68880384 Jun 10 00:37 'CEF in 3D.exe'*
-rwxr-xr-x 1 Pastew 197121   109056 Jun 10 00:37 'CEF in 3D.console.exe'*

If I copy cef_artifacts to build folder it doesn't help.

Output from debug console:

ERROR: Can't open dynamic library: cef_artifacts/libgdcef.dll. Missing dependencies: libcef.dll. Error: Error 126: The specified module could not be found..
   at: (platform/windows/os_windows.cpp:392)
ERROR: GDExtension dynamic library not found: cef_artifacts/libgdcef.dll
   at: open_library (core/extension/gdextension.cpp:719)
ERROR: Failed loading resource: res://cef_artifacts/gdcef.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
   at: (core/io/resource_loader.cpp:274)
ERROR: Error loading extension: res://cef_artifacts/gdcef.gdextension
   at: (core/extension/gdextension_manager.cpp:234)
Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 546.33 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3060

ERROR: Viewport Texture must be set to use it.
   at: get_height (scene/main/viewport.cpp:137)
ERROR: Viewport Texture must be set to use it.
   at: get_width (scene/main/viewport.cpp:127)
WARNING: Glow is not supported when using the GL Compatibility backend yet. Support will be added in a future release.
     at: environment_set_glow (servers/rendering/storage/environment_storage.cpp:387)
ERROR: Cannot get class 'GDCef'.
   at: (core/object/class_db.cpp:358)
WARNING: Node CEF of type GDCef cannot be created. A placeholder will be created instead.
     at: instantiate (scene/resources/packed_scene.cpp:254)
SCRIPT ERROR: Invalid call. Nonexistent function 'initialize' in base 'Control'.
          at: _ready (res://GUI.gd:151)

I don't see libs directory you mentioned in this issue inside 3D or 2D demos in this version 0.10.0

@Lecrapouille
Copy link
Owner

Libs no longer exist with 0.10.0. Remove it. I will ask testing for export since I do not have windows

@Lecrapouille Lecrapouille reopened this Jun 10, 2024
@Lecrapouille
Copy link
Owner

@Pastew effectively, Godot does not copy the cef_artfacts folder. From memory, Godot3 did it correctly. Maybe opening a bug on Godot team. You can copy it manually. Other point, there is a small issue on my side. In godot script "exported_artifacts" that can be set with CEF.initialize( is by default equal to the folder path holding with your binary instead of path to cef_artifacts, therefore forcing either to set it each time or to remove the folder cef_artifcats. Ok I'll fix it but also manage absolute pathes. Thnak you!

@Lecrapouille
Copy link
Owner

Lecrapouille commented Jun 16, 2024

Sorry, I had no time for testing my last commit fixing. @Pastew if you want to check. I'll see to create a new tag

@Pastew
Copy link

Pastew commented Jun 16, 2024

Sure, I will test it when a new tag appears (but not earlier than June 22nd).

For now - I just moved cef_artifacts content to .exe's directory and it works.

@c0if
Copy link

c0if commented Jul 24, 2024

Same problem here, and also caught something weird and a weird solution to the problem.

This solution isn't ideal because it's really messy and wastes more disk space, but adding the cef_artifacts content on to the root of exported build directory and adding the cef_artifacts folder with the same content works. Yes you really need to duplicate for it to work.

However, while I was debugging the error using Process Monitor in order to see what paths it was using, I saw that it's able to find the libgdcef.dll file just fine inside my cef/ folder, but for everything such as the libcef.dll, it's unable to find it and goes through most of the Windows filesystem, even though the libcef.dll is also inside the cef/ folder.

image
image
image

@Lecrapouille Lecrapouille reopened this Jul 24, 2024
@Lecrapouille
Copy link
Owner

ok @pimhakkert we have to investigate

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

4 participants