TLS/SSL is currently not supported, it requires some fixes in the underlying library used. See this issue for a workaround used in the past: https://github.com//socketio-client-ue4/issues/39
I am trying to develop a technical demo for Oculus Quest and my current ordeal is that it wont connect to a dedicated host server on the local WiFi network. Both machines are on the same network and I can ping the oculus quest from the server machine. Don’t know how to ping the machine from the Quest, but regardless, the game can connect to the dedicated server from another windows machine that is on the same network, but not from the oculus, which runs android. Ive added all the possible permissions to the android permission list, but to no avail. Oculus runs Android so I
m wondering if this plugin could solve my issue out of the box, but it seems like it deals with just communication layer, not the connection layer.
Would be thankful if someone could confirm or deny this. Or maybe someone has experience building this plugin into an android game and connecting to another device.
Weirdly enough, today it decided to start working just as intended without any additional hassle. Updated and rebuilt the engine and rebuilt the project, although I had done it before like times 10 at least.
I use this plugin to connect services to quest projects, so it definitely compiles are and runs on the quest. You just need a socket.io type server and point your quest client to the server url or ip with port thats running the socket.io server.
Heya! Truly appreciate your activity here.
Funnily enough my server test project stopped connecting to my local server from Quest after a rebuild again and I haven’t a clue why, as I did not change any content. The rebuild was a sanity check test after I had replicated the settings to the main project with the content etc and it wouldn’t work there either.
I have tried cleaning everything through the ADB, uninstalling from Quest, rebuilding with deleting Intermediate folders etc, but nothing helps. I suspect it’s something with the settings of permissions when deploying to the Quest, but I really don’ t know. Would you perhaps have some pointers, as you are also working with the Quest?
I definitely had it working once and I could just launch the server and launch the app from the quest and it connected, but no more.
The next step that I will try is building with socket.io, I suppose, but I am building from Oculus 4.25.3 sdk branch and it keeps saying that the plugin is made for 4.25.0 and disabling it on build.
Edit: still struggling to achieve consistent behavior for the connectivity. Sometimes when I build to Quest, it connects to the dedicated server, sometimes it just doesn’t.
And when I build server with socket.io, it gives me this: Screenshot by Lightshot
Am I supposed to install some third party stuff for this to work?
if its disabling the plugin it won’t work right. If you’re using a custom branch remove the engine version field from uplugin file and make sure your project has socket.io client plugin as a dependency in the uproject file.
With those, recompile your project and it should re compile the plugin for your engine version.
Usually when I dev quest stuff I just use a canonical engine version and select android as build target with relevant oculus plugins enabled, so YMMV.
Hi there! I just bought your plugin today and have been trying to get it to work with HTML 5. When I run it in editor (or packaged for windows) it is able to connect to the socket/ server just fine. However, when I package it out and run it in the browser, soon as I try to emit an event the game crashes and gives an error:
Uncaught abort(197) at Error at jsStackTrace (blob:http://127.0.0.1:5500/0cd32848-f0c9-…1c50698:654:12) at stackTrace (blob:http://127.0.0.1:5500/0cd32848-f0c9-…1c50698:669:11) at abort (blob:http://127.0.0.1:5500/0cd32848-f0c9-…50698:21005:43) at nullFunc_viii (blob:http://127.0.0.1:5500/0cd32848-f0c9-…c50698:17194:2) at b197 (:wasm-function[130013]:0x3b8495d) at UObject::execCallMathFunction(UObject*, FFrame&, void*) [__ZN7UObject20execCallMathFunctionEPS_R6FFramePv] (:wasm-function[14313]:0x687dbf) at UObject::execLetObj(UObject*, FFrame&, void*) [__ZN7UObject10execLetObjEPS_R6FFramePv] (:wasm-function[14335]:0x68d639) at ProcessLocalScriptFunction(UObject*, FFrame&, void*) [__Z26ProcessLocalScriptFunctionP7UObjectR6FFramePv] (:wasm-function[14444]:0x69bc6c) at void ProcessScriptFunction(UObject*, UFunction*, FFrame&, void*, void ()(UObject, FFrame&, void*)) [_Z21ProcessScriptFunctionIPFvP7UObjectR6FFramePvEEvS1_P9UFunctionS3_S4_T] (:wasm-function[14445]:0x69cc02) at ProcessLocalFunction(UObject*, UFunction*, FFrame&, void*) [__Z20ProcessLocalFunctionP7UObjectP9UFunctionR6FFramePv] (:wasm-function[14443]:0x69ae28)
Has anyone tried using this plugin with HTML5? Any help or ideas appreciated.
Update. I tried downloading the 4.23 version of the plugin through github, adding the plugin folder to my project, and packaging that way. I also added “HTML5” to the platform whitelist in the uplugin file.
When I do things this way now the project fails to package. I am going to post the log below. If I can’t get this to work in the next 48 hours I am going to ditch the plugin and go with basic http requests. That is less than ideal though because my app is based on two way communication.
Packaging Log:
In file included from D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/connection.hpp:1640:
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(228,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(299,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(332,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(482,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(520,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(548,9): error: cannot use ‘throw’ with exceptions disabled
throw exception(“Call to set_status from invalid state”,
^
Super unfortunate that Socket.IO isn’t compiled to work with HTML5. I know that Low Entry plugins have been made to work with HTML5 packaging and use. However, its 2021 and socket fits more use cases than standard rest API’s.
You may want to check out this recommendation in the github issue tracking HTML5: https://github.com//socketio-client-ue4/issues/94#issuecomment-450806877. There’s another open source websocket plugin that has HTML5 support via js wrapper scripts and it might be what you’re looking for (albeit raw websockets vs socket.io).
Release
Made an early release for UE5.0EA. Can be found here: https://github.com//socketio-client-ue4/releases/tag/1.7.0
Win10, UE4.26, JSON: {“test”:“value”}
I trying to convert JSON string to Struct and print that in log, i simply write that code in Level Blueprint
Boolean All filled correctly - is true, that code starts fine, but value is not showing up
Use ValueFromJsonString. ToJsonValue assumes you want a string literal value and not to try to decode JSON string which is what you’re expecting in that blueprint node.
Hi! I’m getting different Session ID than the socket.id the server sees. Is there any other way I can get the ID?
I seem to be running into issues with socket.io on Oculus Quest. I see others in this thread have had similar issues and I’m assuming have managed to get them running. Currently, I am able to connect to my Heroku app when running the headset from my computer. However, when I build the project and run it on the headset using Oculus Developer Hub it can no longer connect to the server. I have set the internet to true in my manifest file. Although, I’m having no luck any ideas? I’ve included my manifest below.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.epicgames.MyProject" android:installLocation="internalOnly" android:versionCode="1" android:versionName="1.0">
<!-- Application Definition -->
<application android:label="@string/app_name" android:icon="@drawable/icon" android:hardwareAccelerated="true" android:extractNativeLibs="true" android:name="com.epicgames.unreal.GameApplication" android:requestLegacyExternalStorage="true" android:hasCode="true">
<activity android:name="com.epicgames.unreal.GameActivity" android:exported="true" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="mcc|mnc|uiMode|density|screenSize|smallestScreenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|touchscreen|locale|fontScale|layoutDirection" android:resizeableActivity="false" android:launchMode="singleTask" android:screenOrientation="sensorLandscape" android:debuggable="true">
<meta-data android:name="android.app.lib_name" android:value="Unreal" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="com.oculus.intent.category.VR" />
</intent-filter>
<meta-data android:name="com.oculus.vr.focusaware" android:value="true" />
</activity>
<activity android:name=".DownloaderActivity" />
<meta-data android:name="com.epicgames.unreal.GameActivity.EngineVersion" android:value="5.0.2" />
<meta-data android:name="com.epicgames.unreal.GameActivity.EngineBranch" android:value="++UE5+Release-5.0" />
<meta-data android:name="com.epicgames.unreal.GameActivity.ProjectVersion" android:value="1.0.0.0" />
<meta-data android:name="com.epicgames.unreal.GameActivity.DepthBufferPreference" android:value="0" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bPackageDataInsideApk" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bVerifyOBBOnStartUp" android:value="false" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bShouldHideUI" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.ProjectName" android:value="MyProject" />
<meta-data android:name="com.epicgames.unreal.GameActivity.AppType" android:value="" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bHasOBBFiles" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.BuildConfiguration" android:value="Development" />
<meta-data android:name="com.epicgames.unreal.GameActivity.CookedFlavors" android:value="ASTC" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bValidateTextureFormats" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bUseExternalFilesDir" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bPublicLogFiles" android:value="false" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bUseDisplayCutout" android:value="false" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bAllowIMU" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bSupportsVulkan" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.StartupPermissions" android:value="android.permission.WRITE_EXTERNAL_STORAGE" />
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<service android:name="OBBDownloaderService" />
<receiver android:name="AlarmReceiver" />
<receiver android:name="com.epicgames.unreal.LocalNotificationReceiver" />
<receiver android:name="com.epicgames.unreal.MulticastBroadcastReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<meta-data android:name="android.max_aspect" android:value="2.10" />
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|delmar" />
<meta-data android:name="com.oculus.handtracking.frequency" android:value="LOW" />
<receiver android:name="com.epicgames.unreal.RemoteFileManagerReceiver" android:exported="true">
<intent-filter>
<action android:name="com.epicgames.unreal.RemoteFileManager.intent.COMMAND" />
</intent-filter>
</receiver>
<meta-data android:name="com.epicgames.unreal.RemoteFileManager.bAllowNetworkConnection" android:value="true" />
</application>
<!-- Requirements -->
<uses-feature android:glEsVersion="0x00030002" android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Supported texture compression formats (cooked) -->
<supports-gl-texture android:name="GL_KHR_texture_compression_astc_ldr" />
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />
<uses-feature android:name="oculus.software.handtracking" android:required="false" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.usb.host" />
</manifest>
Added the ability to get socket.id in https://github.com//SocketIOClient-Unreal/commit/05346a82d32181b1b151b2336922b387bb30a4d4. Clone or grab latest release to get the feature.
Not sure why. I remember a long while back Quest 1 definitely worked with the socket.io plugin at that time (e.g. https://twitter.com//status/1228864897133318144) but that was only tested to a local server without SSL.
Support for these features have been added since so it should still work, but it may depend on your specific version of socket.io library and plugin.
The latest version available on github is 2.4.0, see if that works for you, if not I recommend opening an issue on https://github.com//SocketIOClient-Unreal/issues for easier tracking. See related issue https://github.com//SocketIOClient-Unreal/issues/196 (not much to go on atm, but might want to reach out to that dev if upgrading doesn’t work?)
hello.
I have a question regarding callbacks while working with SocketIOClient.
There is ‘EmitWithCallBack’ that can use callback when the client sends emit, but why isn’t there a function that can use callback when the server sends emit to the client? For example BindEventWithCallBack.
The callback we are talking about here is not the callback that executes another function in Unreal.
This is the callback that is invoked when transmission and reception are normally performed after sending emit.
Am I using SocketIOClient incorrectly?
Or does the callback not work well when the server emits?
Unfortunately due to how the current socket.io c++ lib is written it requires an immediate (i.e. on network thread) reply to acknowledge server calls. That makes it not feasible to do in blueprint safely without re-writing the underlying lib setup. The current workaround is to use a separate event emit that the server listens to as a ‘callback’.
See https://github.com//SocketIOClient-Unreal/issues/79 for current status on this feature and a possible separate workaround.
Are there any plans to also release this for 5.5?
Here’s the latest release supporting UE 5.5: Release v2.9.0 Release for UE5.5 · getnamo/SocketIOClient-Unreal · GitHub
Marketplace release pending more time availability, likely sometime in January.