Open AaronClaros opened 6 months ago
@AaronClaros
Reopen the ticket if needed
@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
Libs no longer exist with 0.10.0. Remove it. I will ask testing for export since I do not have windows
@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!
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
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.
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.
ok @pimhakkert we have to investigate
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
this is how looks in editor, vs windows build![image](https://github.com/Lecrapouille/gdcef/assets/10788766/4f800058-7779-4f18-a43c-7565ab259ae8)
this is how looks the windows build folder: (I added "cef_artifacts" folder manually)![image](https://github.com/Lecrapouille/gdcef/assets/10788766/6287b2a1-e7ff-4895-9c8c-342209a6c895)