Skip to main content
Participant
March 22, 2018

Virtual Reality SDK Oculus failed to initialize.

Hello, as you have seen in the title I'm having problems to Initialize the Oculus Rift SDK in Unity. I'm working in an app for samsung Gear VR.
the versions I'm using are these:
  • Unity 2017.3.1f1 
  • ovr_unity_utilities_1.24.0
  • OVRPlatformSDK_v1.24.0
  • ovr_avatar_sdk_1.24.0
I'm following the instructions marked in this guide : https://developer.oculus.com/documentation/platform/latest/concepts/pgsg-unity-gsg/

When I put play in my game the following messages appear in my console:
-Virtual Reality SDK Oculus failed to initialize.
Attempting to enable None instead.
-Unity v2017.3.1f1, Oculus Utilities v1.24.0, OVRPlugin v1.24.0, SDK v0.0.0.
UnityEngine.Debug:Log(Object)
OVRManager:Awake() (at Assets/OVR/Scripts/OVRManager.cs:904)



The first one appears as a warning and the second one appears as a message. Also, I've put the 'Gear VR App Id' number in the 'OculusPlatformSettings' and these errors still appearing.

I've made every step from 'Create an App' to 'Configuring Your App for Local Development', but I get stuck in the 'Initialize the SDK and Perform the Entitlement Check' step, basicly that step asked me to create a script for initialize the SDK with my appID but I have no idea how to use it, or if I have to use it.

I created a script like this:

using UnityEngine;
using Oculus.Platform;

public class AppEntitlementCheck: MonoBehaviour {

void Awake ()
{
try
{
Core.AsyncInitialize();
Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCallback);
}
catch(UnityException e)
{
Debug.LogError("Platform failed to initialize due to exception.");
Debug.LogException(e);
// Immediately quit the application.
UnityEngine.Application.Quit();
}
}

void GetEntitlementCallback (Message msg)
{
if (msg.IsError)
{
Debug.LogError("You are NOT entitled to use this app.");
UnityEngine.Application.Quit();
}
else
{
Debug.Log("You are entitled to use this app.");
}
}
}

Could you explain to me why these error still appearing and if there's a solution?

I'll give thanks to everyone who support me in this topic.

:smile:

This topic has been closed for replies.

44 replies

Up and Coming
April 1, 2018
Okay, so I am installing now 2017.2.2f1 and if what's presumed is correct it will work fine right out of the box with VR.

And...no...that doesn't work either.

I don't think this is on Oculus end but rather Unitys end.
Up and Coming
April 1, 2018
Okay so I finally found the way to fix it. 

You need to roll back to version 2017.1 of Unity! The version I'm on is specifically 2017.1.0f3. 

I notice that when 'XR Settings' was added to Unity for some reason VR stopped working. I just hadn't noticed this as I hadn't playtested VR in about two months. 

In the release notes it MIGHT be this update for 2017.2: 


Moved types in the UnityEngine.VR.* namespaces to UnityEngine.XR.* namespaces. Renamed VR to XR across the API; for example, types like VRSettings, VRDevice, VRNode to XRSettings, XRDevice, XRNode. Configured API updater to automatically update existing scripts and assemblies.


I'm not entirely sure though. It had to do when they moved from VR to XR that all the sdks can't initialize and that builds don't work. 

Agian, I can't say anything for sure but again 2017.1.0f3 works fine out of the box.
Participant
April 4, 2018
I'm still having this issue as well. A partner of ours in Rotterdam is apparently not having any issues; they created an empty project in Unity 2018.1.0b12 and the 1.24 version of the Oculus utilities and apparently it works fine on their end. They regressed all the way down to 1.21 with no issues.

However, when I did the same thing, the plugin still does not initialize. There has been some confusion on our end because I don't know the exact steps they took in Rotterdam, just that it works. We also have some people in our office claiming that Oculus is integrated into 2018, but I haven't found any evidence that indicates that's true.

So here are the exact steps I took in a brand new project:

0. The Oculus app is running on my machine.
1. Create a new 3D project in Unity 2018.1.0b12
2. Add a plane to a scene and save it.
3. Verify in Player Settings that virtual reality support is enabled and Oculus is enumerated. It is, along with OpenVR, the default settings.
4. Run the app. I get the warning message "Virtual Reality SDK Oculus failed to initialize."
5. Stop the app. Remove OpenVR, as we aren't supporting it.
6. Import version 1.24 of the Oculus utilities.
7. Run the app. I get the warning message "Virtual Reality SDK Oculus failed to initialize."
8. Import that package for the 1.24 version of the Oculus platform. I should mention that in previous apps we didn't need this; the plugin in the utilities was sufficient to run an app with Oculus support.
9. Run the app. I get the warning message "Virtual Reality SDK Oculus failed to initialize."

I ran the OculusLogGatherer.exe tool, but there doesn't seem to be any way to share it on the forum, so I'll start looking through it.




Participant
April 4, 2018
Here's part of my autoanalysis log (too long to post the whole thing):

=============
LOG ANALYSIS
=============

[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.034 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\core\Unicode.cpp(10) : Failed to convert from utf8: The parameter is incorrect. (1971052)
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.034 {!ERROR!} [VRAudioDevice] Unable to set output device for SDK: Failed to convert from utf8: The parameter is incorrect.
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.034 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\core\Unicode.cpp(10) : Failed to convert from utf8: The parameter is incorrect. (1971052)
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.034 {!ERROR!} [VRAudioDevice] Unable to set input device for SDK: Failed to convert from utf8: The parameter is incorrect.
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.154 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\Network\FileHttpRequest.cpp(339) : Download CompatLibData failed with error: FatalError domain: TigonFileDownloaderProtocolError code: 0 detail: Unexpected HTTP response. (1971005)
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.154 {!ERROR!} [OculusAppFramework.cpp] Download of https://www2.oculus.com/compatibility_library?access_token=OC|1522986184659833| failed: OVR64123165
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:52.164 {!ERROR!} [OVRServer] Downloaded compatibility JSON is bad. First 50 characters: %s
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:59.385 {!ERROR!} [os/file] Unable to open path 'C:\Program Files\Unity\Editor\Unity.exe [3]
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:59.385 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\os\file.cpp(508) : Error normalising path (1971039)
[Service_2018-04-04_09.48.51.txt] 04/04 09:48:59.385 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\os\file.cpp(920) : Failed to open file: The system cannot find the path specified. (1971052)
[Service_2018-04-04_09.48.51.txt] 04/04 10:23:28.739 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\Network\SimpleHttpRequest.cpp(183) : Request MarauderBatchUpload errored: TransientError domain: CURLcode code: 56 detail: 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054 (1971012)
[Service_2018-04-04_09.48.51.txt] 04/04 10:23:28.739 {!ERROR!} [Analytics] Error uploading marauder logs: OVR40779122
[Service_2018-04-04_09.48.51.txt] 04/04 10:28:28.758 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\Network\SimpleHttpRequest.cpp(183) : Request MarauderBatchUpload errored: TransientError domain: CURLcode code: 56 detail: 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054 (1971012)
[Service_2018-04-04_09.48.51.txt] 04/04 10:28:28.758 {!ERROR!} [Analytics] Error uploading marauder logs: OVR40779122
[Service_2018-04-04_09.48.51.txt] 04/04 10:57:40.409 {!ERROR!} [NVDirectDisplay] NVDirectDisplayFrameNotifier::GetWaitableHandle: NvAPI_D3D_UpdatePeriodicFrameNotification error. NV status: -1 (NVAPI_ERROR)
[Service_2018-04-04_09.48.51.txt] 04/04 10:57:40.409 {!ERROR!} [NVDirectDisplay] NVDirectDisplayFrameNotifier::GetWaitableHandle: NvAPI_D3D_UpdatePeriodicFrameNotification error. NV status: -1 (NVAPI_ERROR)
[Service_2018-04-04_09.48.51.txt] 04/04 10:57:40.827 {!ERROR!} [Kernel:Default] [DisplayManager] NVidia power mode default not settable because another instance has it set.
[Service_2018-04-04_09.48.51.txt] 04/04 10:58:38.923 {!ERROR!} [OAF ERROR] C:\cygwin\data\sandcastle\boxes\trunk-hg-ovrsource-pc-sdk\Software\OculusSDK\PC\OAF\liboaf\Network\SimpleHttpRequest.cpp(183) : Request MarauderBatchUpload errored: TransientError domain: CURLcode code: 56 detail: 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054 (1971012)
[Service_2018-04-04_09.48.51.txt] 04/04 10:58:38.923 {!ERROR!} [Analytics] Error uploading marauder logs: OVR40779122
Participant
April 4, 2018
It looks like it's having difficulty reaching various Oculus URLs and also can't launch Unity because it's only looking for it in the standard install location; I'm not sure how that's relevant to my app though, as this log is generated by the oculus log gatherer itself.

I should mention that I have multiple versions of Unity installed via u3d, because we work with a variety of partners on different continents with Unity projects in different versions. I'm not sure why that would be relevant, but it might be.
Participant
April 4, 2018
So it runs fine in 0b13 for me. I did a fresh install and it ran straightaway. I then ran the same project in 0b13 and it works as well. Loaded it up in 0b12 again and again the SDK failed to initialize. I'd love to say that's the end of it, except that our partner in Rotterdam also got it running in 0b12.
Participant
April 4, 2018
I uninstalled 0b12 and reinstalled a fresh version without u3d and it works; so it seems to be u3d related somehow; or maybe when I installed it via u3d there was a dependency I didn't include in the install (although I don't believe VR support is optional). So that's the solution for me; HTH someone else.

Participant
April 4, 2018
interestingly, I removed the Oculus utilities, then had to re-add them as apparently we had some dependencies, and the problem is back for me in both b12 and b13. So it's somehow related to removing or adding Oculus utilities possibly.
New Participant
April 5, 2018
Hello Everybody, I am very new to unity and currently working on my first VR project, today I wanted to add in the Oculus avatar model so I can use the touch controllers in game and this is where my issues first started! At first the avatar wasnt working in game so I couldn't see the avatar hands, however when I created a blank project the avatar models worked! So now  I need to find out why it doesn't work in my project? Anyway I decided to deleted the Oculus Integration and re download it off the Unity store, but once I had done that each time I got more and more errors, but again I tested it in a blank project and it works!  
New Participant
April 5, 2018