godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.52k stars 21.26k forks source link

Webrtc loading error when exporting apk from windows, not linux #84464

Open tlloancy opened 1 year ago

tlloancy commented 1 year ago

Godot version

4.1.3

System information

Windows 10

Issue description

  E  USER ERROR: Can't open dynamic library: godot-extension-4.1-webrtc/webrtc/lib/libwebrtc_native.android.template_debug.arm64.so. Error: dlopen failed: library "libwebrtc_native.android.template_debug.arm64.so" not found.
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E     at: open_dynamic_library (platform/android/os_android.cpp:170)
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E  USER ERROR: GDExtension dynamic library not found: godot-extension-4.1-webrtc/webrtc/lib/libwebrtc_native.android.template_debug.arm64.so
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E     at: open_library (core/extension/gdextension.cpp:455)
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E  USER ERROR: Failed loading resource: res://godot-extension-4.1-webrtc/webrtc/webrtc.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E     at: _load (core/io/resource_loader.cpp:274)
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E  USER ERROR: Error loading extension: res://godot-extension-4.1-webrtc/webrtc/webrtc.gdextension
2023-11-05 01:09:14.720 12289-12289 godot                   org.godotengine.Snake                E     at: load_extensions (core/extension/gdextension_manager.cpp:143)

Steps to reproduce

Launch apk from android studio

Minimal reproduction project

N/A

tlloancy commented 1 year ago

think it's a relative/absolute path history . But Strange: Windows as usual. On one machine i can launch the .exe by indicating absolute path. So i encountered the same problem on the other and solved the problem by launching the .exe from inside its folder

tlloancy commented 1 year ago

this is not fixed on 4.2 [edit] are there any workaround in the meanwhile

akien-mga commented 1 year ago

Could you provide a minimal reproduction project?

tlloancy commented 1 year ago

godot-test-webrtc.zip

akien-mga commented 1 year ago

That project doesn't contain the WebRTC native GDExtension which seems to be the problem in your original report.

tlloancy commented 1 year ago

i didn't put it because it takes 900 mo

tlloancy commented 1 year ago

i deleted everything except the main project