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

0.3 Plugin error: 'WebRTCDataChannel' is not a valid type in Win 10 Godot Engine v3.1.1.stable #5

Closed
tomoprime opened this issue Oct 17, 2019 · 13 comments

Comments

@tomoprime
Copy link

After importing plugin zip into an empty project folder WebRTCNativeDemo I get error:

Godot Engine v3.1.1.stable.official (c) 2007-2019 Juan Linietsky, Ariel Manzur & Godot Contributors.
res://scripts/SimplePeer.gd:42 - Parse Error: Identifier 'WebRTCDataChannel' is not a valid type (not a script or class), or could not be found on base 'self'.
modules/gdscript/gdscript.cpp:580 - Method/Function Failed, returning: ERR_PARSE_ERROR
Switch Scene Tab

Am I missing something? Sorry I'm new to using Godot 3.1.1 let alone to using GDNative.
Will I even need the WebRTC plugin if switching to Godot 3.2 Alpha 2 then?

@tomoprime
Copy link
Author

Update: running the above project in Godot 3.2 Alpha 2 has no issues as expected.

@Faless
Copy link
Collaborator

Faless commented Oct 18, 2019 via email

@tomoprime
Copy link
Author

tomoprime commented Oct 18, 2019

it is strange. I started up a nodejs instance on a mac.
https://github.com/godotengine/godot-demo-projects/tree/master/networking/webrtc_signaling/server_node

Then on Windows I connected to it with Godot 3.2 for the webrtc_signaling demo using the address of the mac. Without adding this GDNative plugin to the webrtc_signaling demo project folder.

But after adding this plug as required. The webrtc_signaling demo cannot make a connection to the Mac that is running the nodejs server code.

ERROR: _get_socket_error: Socket error: 10022
At: drivers/unix/net_socket_posix.cpp:198
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:425
Signaling server disconnected: 1000 - Unknown
Disconnected: 1000: Unknown

Update:
However if I go into Project Settings -> GDNative, and disable both webrtc.tres and webrtc_debug.tres I am then able to connect to the remote nodejs server.

Signaling server connected with ID: 1
Joined lobby HceN79Uj26F820i3

@Faless
Copy link
Collaborator

Faless commented Oct 18, 2019 via email

@tomoprime
Copy link
Author

tomoprime commented Oct 18, 2019 via email

@Faless
Copy link
Collaborator

Faless commented Oct 18, 2019 via email

@tomoprime
Copy link
Author

tomoprime commented Oct 18, 2019 via email

@tomoprime
Copy link
Author

Sorry just wanted to note I had used the 64bit build of Windows with the 0.3 Plugin release.
https://downloads.tuxfamily.org/godotengine/3.2/alpha2/Godot_v3.2-alpha2_win64.exe.zip

@tomoprime
Copy link
Author

Sorry if this appears as a duplicate msg as my last post was lost somehow. Just wanted to point out I had used the Win64 binary of Godot 3.2 Alpha 2 with the prebuilt v0.3 WebRTC plugin.

@tomoprime
Copy link
Author

tomoprime commented Oct 21, 2019

Note I had only tested Signaling in that example. I just checked out your bomber-rtc demo to gain some more clarity on what works...

When I:
Enable the webrtc-native plugin:

  • Local Signaling and WebRTC works
  • Remote Signaling fails, doesn't make it to WebRTC step

Disable the webrtc-native plugin:

  • Remote Signaling works but WebRTC fails

@dryw
Copy link

dryw commented Oct 23, 2019

I can confirm the above behaviour both in 3.2 Alpha 1 and Alpha 2. bomber-rtc works as expected in linux but on windows I get the following errors when using a remote signalling server:

webrtc-native plugin disabled:

  • Windows client connects to signalling server and receives a lobby ID.
  • Throws an ERR_UNCONFIGURED error when an RPC is made (to be expected)
  • Even just building and then deleting the copied-over webRTC dll will get you to this state.

webrtc-native plugin enabled:

  • Socket error 10022 (drivers/unix/net_socket_posix.cpp:197 @ _get_socket_error())
  • Signalling server does not even see the request

Changing the port to a lower value, such as 567 eliminates the socket error but then produces:
thirdparty\mbedtls\library\ssl_tls.c:4064: unknown record type thirdparty\mbedtls\library\ssl_tls.c:4344: ssl_get_next_record() returned -29184 (-0x7200) thirdparty\mbedtls\library\ssl_cli.c:1506: mbedtls_ssl_read_record() returned -29184 (-0x7200) ERROR: StreamPeerMbedTLS::_do_handshake: TLS handshake error: -29184 At: modules\mbedtls\stream_peer_mbedtls.cpp:91 mbedtls error: returned -0x7200

This seems to be the case for both 32/64 bit windows.

If I connect to a local signalling server, everything appears to work.

Will look into rebuilding the plugin against the latest headers. Let me know if there's any specific debugging information that would be helpful!

@tomoprime
Copy link
Author

@dryw Thank you for testing my Windows case as well. It's good to know Linux is ok. I was trying to build the plugin for MacOS but the native code reference for the webrtc_ios target was pushing over 10GB to download on my machine and I ran out of disk space. They say you need under 6GB but my sync grew much larger.

Btw I tested a different port when trying the bomber example on Heroku which might work on linux,
e.g.: ws://bomber-rtc.herokuapp.com

Heroku sets it's own ports so you must update line 6 in server.js to load by ENV:
const PORT = process.env.PORT || 9080;

Note: @Faless it may be ideal to create an external bomber-rtc app on free Heroku to test remote Signaling code changes for godot. The URL given above isn't set up as I reserved a different name to test so not to take over ownership.

@Faless
Copy link
Collaborator

Faless commented Oct 24, 2019

Discussion moved to a separate issue (#6).
Clsoing.

@Faless Faless closed this as completed Oct 24, 2019
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

3 participants