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

[Android] Plugin not working with Godot 3.3.2 Android's custom builds (library not exported). #45

Closed
Nachocss opened this issue Jul 26, 2021 · 9 comments
Labels
bug Something isn't working Upstream An issue that is due to Godot Engine and not (just) the plugin itself.

Comments

@Nachocss
Copy link

Hi, I was trying to figure out why my implementation of the plugin didn't work at all, which shouldn't happen since I'm recovering some code of another webRTC project (in that case, focused on Web environment).

The thing is, I realized it actually works connecting Windows to Windows builds, which can send packets among them, so the problem is setting the network peers on Android targets, which doesn't throw any error but leave the network peers' array empty.

So my question is, do I need to set some permission on the export settings to get it working properly?

Thank you in advance.

@Faless
Copy link
Collaborator

Faless commented Jul 26, 2021

Hi, I was trying to figure out why my implementation of the plugin didn't work at all

This seems pretty generic. Can you expand on this? Did you get a crash? Did you get an error? Do you have godot-related errors in adb logcat?

do I need to set some permission on the export settings to get it working properly?

Well, definitely android.permission.INTERNET, probably android.permission.ACCESS_NETWORK_STATE.

@Nachocss
Copy link
Author

Nachocss commented Jul 26, 2021

This seems pretty generic. Can you expand on this? Did you get a crash? Did you get an error? Do you have godot-related errors in adb logcat?

All right, I'm checking logcat and it seems to throw an error with the following message:
**ERROR**: Default GDNative WebRTC implementation not defined.

However, GDNative plugins are enabled and webrtc.tres and webrtc_debug.tres are pointing to the correct directories.
image

Well, definitely android.permission.INTERNET, probably android.permission.ACCESS_NETWORK_STATE.

android.permission.INTERNET was enabled when I opened the issue. After enabling android.permission.ACCESS_NETWORK_STATE I got the same result.

@Faless
Copy link
Collaborator

Faless commented Jul 26, 2021

Are you using the latest version of the plugin? What is your device OS and model?

**ERROR**: Default GDNative WebRTC implementation not defined.

You should be getting some other godot **ERROR**s before this, can you post those too?

@Nachocss
Copy link
Author

I'm using 0.5 version on Godot v3.3.2-stable win64.

Android version: 10
API level: 29
Device model: Redmi Note 8

You should be getting some other godot **ERROR**s before this, can you post those too?

You are right, it's throwing

07-26 12:22:22.567 27134 27333 E godot   : **ERROR**: Can't open dynamic library: libwebrtc_native.android.release.arm64v8.so, error: dlopen failed: library "libwebrtc_native.android.release.arm64v8.so" not found.

07-26 12:22:22.567 27134 27333 E godot   :    At: platform/android/os_android.cpp:228:open_dynamic_library() - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN

Do I need to place the library elsewhere than res://webrtc/lib/ or could it be related to read permissions?

@Faless
Copy link
Collaborator

Faless commented Jul 26, 2021

Do I need to place the library elsewhere than res://webrtc/lib/

No, the plugin zip must be extracted in the root folder of the project. As mentioned in the documentation.

or could it be related to read permissions?

I doubt it given the error.


If you export and open the generate APK do you get the library in the right place?

android

@Nachocss
Copy link
Author

No it doesn't
image

@Nachocss
Copy link
Author

Nachocss commented Jul 26, 2021

It seems the problem is related to custom build use (in order to implement Admob).
By disabling custom builds, it includes the library where it should be
image

@Faless
Copy link
Collaborator

Faless commented Jul 26, 2021

It seems the problem is related to custom build use (in order to implement Admob).

Thanks for reporting back.
The issue seems fixed via godotengine/godot#49912, which will be available in future Godot releases (including 3.3.3 and 3.4s). Closing as fixed.

@Faless Faless closed this as completed Jul 26, 2021
@Faless Faless changed the title Is there any permission that must be enabled to get webRTC working on Android? [Android] Plugin not woring with Godot 3.3.2 Android's custom builds (library not exported). Jul 26, 2021
@Faless Faless added bug Something isn't working Upstream An issue that is due to Godot Engine and not (just) the plugin itself. labels Jul 26, 2021
@Nachocss Nachocss changed the title [Android] Plugin not woring with Godot 3.3.2 Android's custom builds (library not exported). [Android] Plugin not working with Godot 3.3.2 Android's custom builds (library not exported). Jul 26, 2021
@Nachocss
Copy link
Author

For the record, build is working correctly on Godot 3.4.beta1 without further change than Godot version

Thank you @Faless Really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Upstream An issue that is due to Godot Engine and not (just) the plugin itself.
Projects
None yet
Development

No branches or pull requests

2 participants