x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

When playing in the editor WebSocket connection successful but failed when playing in packaged, why?

When playing in the editor WebSocket (from Runtime/Online/WebSocket) connection was successful but failed when playing in packaged project. Why? UE4 versions used were 4.18 and 4.19. Platform is Windows x64.

Here's the log.

 [2018.10.23-08.55.37:666][308]LogTemp: Display: Connecting to wss://localhost/lobby/
 [2018.10.23-08.55.38:397][350]LogWebSockets: Warning: Lws(Error): server's cert didn't look good, X509_V_ERR = 20: error:00000014:lib(0):func(0):SSL lib
 [2018.10.23-08.55.38:431][352]LogWebSockets: Warning: Lws(Error): server's cert didn't look good, X509_V_ERR = 20: error:00000014:lib(0):func(0):SSL lib
 [2018.10.23-08.55.38:443][352]LogTemp: Display: Error connecting: Connection timed out

Upon closer examination, the UE4's WebSocket library uses Libwebsocket and OpenSSL, and that X509_V_ERR = 20 means X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY. See here. But I'm sure the certificate is valid, and not self-signed. Can anyone help? Again note that the connection works in the editor but not in packaged project. I'm not sure why.

In 4.20 the log is like this

 [2018.10.23-13.28.59:390][399]LogTemp: Display: Connecting to wss://localhost/lobby/
 [2018.10.23-13.29.00:119][446]LogWebSockets: Warning: Lws(Error): SSL error: unable to get local issuer certificate (preverify_ok=0;err=20;depth=3)
 [2018.10.23-13.29.00:121][446]LogWebSockets: Warning: Lws(Error): SSL connect error 336134278: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
 [2018.10.23-13.29.00:122][446]LogTemp: Display: Error connecting: lws_ssl_client_connect2 failed

Basically the same error, but more verbose.

Product Version: UE 4.19
Tags:
more ▼

asked Oct 23 '18 at 01:18 PM in Packaging & Deployment

avatar image

Engineer
1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Sigh, turns out UE4 doesn't automatically copy the certificate file into pak file. Also the SSL module really lacks documentation, but I figured it all out eventually. https://api.unrealengine.com/INT/API/Runtime/SSL/Interfaces/ISslCertificateManager/AddCertificatesToSslContext/index.html

more ▼

answered Oct 24 '18 at 02:06 PM

avatar image

Engineer
1 2

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question