CloudXR 4.0 Unity Client Plugin Can not Connect Server(0x800b1004)

When I build and deploy unity project to Meta Quest 2, It launch successfully, but client unable to connect CloudXR Server. I tested Android Studio project and everything works as expected.

When I control logs on client side, I found this strange values on CxruAutoconnectSamleLog_*****.txt

Log : 14-24-02 : CXRU Info: Set stream 0 requested resolution/framerate to  1440x1584 pxl 71.82072 fps
Log : 14-24-02 : CXRU Info: Set stream 1 requested resolution/framerate to  1440x1584 pxl 71.82072 fps
.......
Log : 14-24-02 : CXRU Info: CloudXR:CXR Client Library:errChk Client asking for 2 video streams, first is 71.8 fps, 1440 x 1584, 88298 kbps, format 0.

It seem good values but when I check Streamer_Client_Log_****.txt. I found that:

(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Application requested for 2 video streams, 1 audio streams, 1 input streams, 0 mic streams
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: streamIndex 0
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: vct 3, maximumBitrateKbps 88298, enableVideoScale 1, format 1
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: video content type VR, Server Connection type 1, Resolution 3072x3072@90
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Mode: 3072x3072@90, recommended max bitrate: 88298, client provided max bitrate: 88298
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: streamIndex 1
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: vct 3, maximumBitrateKbps 88298, enableVideoScale 1, format 1
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Video config: video content type VR, Server Connection type 1, Resolution 3072x3072@90
(I)[2023-11-25 11:24:02,295]=14:24:02=*00000*{538483743088}<ConfigHelper>     Mode: 3072x3072@90, recommended max bitrate: 88298, client provided max bitrate: 88298

What do I need to change to configure stream? I can not find anything about this part of SDK.

My Setup:
Unity: 2022.3.12.f1
Oculus Quest 2 Runtime Version: 59.0.0.172.706.535797236
Unity Plugin 0.1.0
Server OS: Windows 11, Steam VR 2.1.7 beta

Streamer_Client_Log_2023-11-25_14.24.02[1].txt (6.5 KB)
CxruAutoconnectSampleLog_2023-11-25_14-24-01[1].txt (11.2 KB)

When I read logs, I found this part

(I)[2023-11-26 00:31:33,027]=03:31:33=*00000*{502160222576}<AutoClientWebSoc> Connecting to host 192.168.1.84, port 48010
(E)[2023-11-26 00:31:33,028]=03:31:33=*00000*{502160222576}<RtspClient>       Failed to create the RTSP session: I/O error: 1
(E)[2023-11-26 00:31:33,028]=03:31:33=*00000*{502160222576}<SignalingHandler> Unexpectedly disconnected from server: connection creation
(M)[2023-11-26 00:31:33,028]=03:31:33=*00000*{502160222576}<SignalingHandler> connectWithRtspHandshake: return 0x800b1004
(I)[2023-11-26 00:31:33,028]=03:31:33=*00000*{502160222576}<SignalingHandler> Failed connection with URL: ... ret:0x800B1004

So I decided to compare this part with Native Android Project.

(I)[2023-11-26 00:29:36,653]=03:29:36=*00000*{500867545456}<AutoClientWebSoc> Connecting to host 192.168.1.84, port 48010
(I)[2023-11-26 00:29:36,676]=03:29:36=*00023*{500867545456}<RtspSessionPocoB> WS client using no SSL
(I)[2023-11-26 00:29:36,676]=03:29:36=*00000*{500867545456}<RtspSessionPoco>  streamingSessionId : 
(I)[2023-11-26 00:29:36,676]=03:29:36=*00000*{500867545456}<RtspClient>       Creating RTSP handshake client using POCO at port 48010
(I)[2023-11-26 00:29:36,676]=03:29:36=*00000*{500867545456}<SignalingHandler> Sending signaling event ready with value 1

WS client using no SSL That parts make sense now, because Unity must be blocking insecure SSL connection.
I just created basic websocket on server machine and add connection code to my Unity project. As I expected, something blocks WS connection on Client side.

After some research, I have learned that there is bug with OpenXR Package 1.8.2 on Unity. It does not mater if you uncheck Force Remove Internet Permission, it is always checked on build or something like that.

Unity Bug tracking page.

Problem Fixed in openxr 1.9.1.

Other poblems is I was unable to upgrade package on Unity 2022 LTS, Unity Package Manager shows just 1.8.2 as latest. I upgraded my editor to Unity 2023.2.1f1 and it upgraded package to latest 1.9.1 version and all connection problem solved

2 Likes

Thanks for following up and linking to the Unity bug report. Glad an update to the engine resolved it.

1 Like

Hi, did you encounter any similar error “A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction See the Console for details.” when you packaged the apk with 2023.2.1f1? If so, how did you fix it? I followed the solution I found on the internet to solve this error, and the apk that I successfully build still has the problem of frequent flashbacks.

I was able to get past this MergeNativeLibs error by using the sans C++ Version of the plugin instead (there are two versions you can install in package manager). It builds and runs on my HMD, but the client seems to exit right after starting. Not sure if that’s because its not connecting to my locally hosted sample server or what, still testing that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.