Godot can't find dll on win sometimes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Pavel

Hello Godot experts,

I am looking for some help, as I have no idea how to debug this issue.

I have a project, which uses my gdnative library libgaben.dll and libsteam_api64.dll as a dependency. It works on all linux and mac and most of win machines I managed to reach, but one win machine gives this error when I try to start it:

Godot Engine v3.4.4.stable.official.419e713a2 - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
OpenGL ES Batching: ON

ERROR: Can’t open dynamic library: bin/windows/libgaben.dll, error: Error 126: The specified module could not be found.
.
at: open_dynamic_library (platform/windows/os_windows.cpp:2353) - Condition “!p_library_handle” is true. Returned: ERR_CANT_OPEN
ERROR: No valid library handle, can’t get symbol from GDNative object
at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can’t get symbol from GDNative object
ERROR: No nativescript_init in “res://bin/windows/libgaben.dll” found
at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in “res://bin/windows/libgaben.dll” found
ERROR: Script does not inherit a Node: res://bin/gaben.gdns
at: start (main/main.cpp:1832) - Condition “!valid_type” is true. Continuing.
ERROR: No valid library handle, can’t terminate GDNative object
at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can’t terminate GDNative object

This is build info for this problematic build:

Edition Windows 10 Home
Version 21H2
Installed on ‎2021-‎04-‎06
OS build 19044.1645
Experience Windows Feature Experience Pack 120.2212.4170.0

Any ideas where to dig?