[Gear VR] Release for distribution build fails

I haven’t built for distribution since 4.13 (and back then it worked just fine)

Finally today I wanted to build my first alpha build for Oculus Home and … it failed. Some Oculus lib is missing apparently (I’ve never seen this issue before). Here is output log:

EDIT: Tried with 4.16 - same issue: https:///1UasbpPk

Namely yet again someone forgot to include oculus stuff into UE4:

UATHelper: Packaging (Android (ETC2)): [javac] Z:\src\com\epicgames\ue4\GameActivity.java:705: error: package com.oculus.svclib does not exist

The issue is with missing Java classes when using entitlement check blueprint node (and using Oculus Online Subsystem). Has nothing to do with NDK/SDK (which are 21 or 22, since S6 is all on 6.0.1 and S7 is on the same or newer Android)

S6 was originally released with Android 5.0.2 and Note 4 even older (4.4.4). By setting the min SDK to 19 you allow users that did not update (or in some cases did not even get an option to update) the ability to install the game (otherwise they will purchase and complain it does not install). It’s ok to build for 21 though for the NDK I guess :slight_smile:

I don’t support Note 4 and people should keep their devices upgraded. I have all mine upgraded and therefore I can’t test on Android-less-than-6.0.1. Update for Android is free, so they can always update if they buy my app :wink:

The point is that none of this has anything to do with the issue at hand.

You’re right it’s not to do with the issue - you’re using the Oculus Online Subsystem plugin - I also cannot build with that :frowning:

You’re wrong though about expecting people to keep their devices updated - some people are stuck on carriers that do the updates and those carriers do not bother doing any. If the apps free the only negative then will be those users giving poor reviews - but the fact all you need to do is change one number in your export settings means there’s no reason not to support all gearvr android versions :wink:

Hello motorsep,

The users on this post seem to of encountered the same issue of that missing package:

Can you see if what worked for them may be able to help you with this issue? If not, the logs mention this warning as well:

Warning: Oculus: Failed Oculus login. Not currently logged into Oculus.  Make sure Oculus is running and you are entitled to the app.

This could be related as it may need to be connected for signing reasons for Distribution.

Hi Matthew

That’s not the issue. That warning is simply there because I closed Oculus Home since I don’t need it (that’s relevant to Rift and VR preview, definitely irrelevant to Gear VR development).

The issue is in missing Java classes for Oculus Online System (Oculus confirmed). Supposedly Oculus pushed fixes, but I don’t know whether they did it for their branch or into Epic’s master.

It would be nice if those fixes, if those are indeed the fixes, end up in 4.15.3 (ot some hotfix for 4.1.5) too.

Glad to hear you already know what the actual issue is. We don’t currently have any bug reports in related to this, as far as I can find at least, as well as no other reports. I don’t see it likely that this would be fixed in a hotfix if it is indeed a bug.

As you mentioned that Oculus has confirmed that this is the problem, could you provide a link to that confirmation for additional information?

Just out of curiosity - shouldn’t be thread marked as resolved when the issue is actually resolved? (or recorded into your system with a reference link where users can track progress)

This bug is critical as it prevents releasing on Oculus Home for Gear VR and potentially for Rift.

As with all answerhub posts, the thread is automatically marked as resolved when an answer has been posted by a staff member. Just because it’s resolved doesn’t mean I’m done looking into it. It’s only for tracking reasons.

As for this being critical, one thing to note is that, if this is particularly blocking you at the moment, I would suggest using the Github build as suggested by the Oculus Staff members to have a working version in the meantime. I’ll escalate this to see if we can get it into the hotfix. I’ll keep you updated here.

Before I can do something about getting this reported, I need to have a reproduction. I attempted to reproduce this by using the Blueprint ThirdPersonExample template.

  1. Enabled the “Online Subsystem Oculus” plugin
  2. Disabled the “Oculus Rift” plugin (tried with it enabled as well, just in case)
  3. Set the Android SDK to 19, set minimum SDK to 19
  4. Enabled “Configure the AndroidManifest for deployment to GearVR”
  5. Moved the Keystore over to the project and filled out those settings.

After doing that, I attempted to package with For Distribution enabled ( already had my .osig from previous projects) and was able to do so without any errors. Is there anything that I may of missed that could help reproduce this?

I built engine from source from Oculus branch - when loading my project engine told me it was created in a different version of UE4 and thus required to be converted. So I did that on a copy of my project. Then it turned out that it’s not compatible with FMOD, which puzzles me - FMOD for 4.15 should work fine on both launcher’s and Oculus’ branch, but it doesn’t.

Well, did you have BP entitlement check node in your project ?

I can try removing that node and see if it builds for distribution. Also, just having Online Susbystem Oculus enabled doesn’t do it - defaultEngine.ini in the project folder has to be edited to enable it.

I disabled Oculus Online System, and I still can’t build it :frowning:

Also disabled Oculus Rift plugin, and now UE4 hangs when opening my project with the following error:

https://s29.postimg.org/u5py4mx2f/ue4_vr_error.png

https://s29.postimg.org/u5py4mx2f/ue4_vr_error.png

To be clear - I have Rift (and thus Oculus Home is installed), but currently I develop for Gear VR

I was able to find a post about that error, if any of the information there may be able to help you. Unfortunately, none of the users came back to confirm if it helped or not.

When you fail building with the Online Subsystem Oculus plugin disabled, do you get the same error messages as before?

No, when I disable Online Subsystem Oculus I get no error. I only get that error when I disable Oculus Rift / Steam VR plugins. I also never hard this issue before I installed Rift / Steam VR software. Maybe UE4 trying to communicate with VR software and not being able to because plugins are disabled?

I updated OP - same issue in 4.16.1

Props to the folks from Android gear vr shipping distribution package fail - Platform & Builds - Unreal Engine Forums

I was able to resolve the issue by commenting out a small block in GearVR_APL.xml in …\Epic Games\UE_4.16\Engine\Plugins\Runtime\GearVR\Source\GearVR\

com.oculus.svclib.OVREntitlementChecker.doAutomatedCheck(this);

Since I use manual entitlement check using respective BP node, I figured that won’t hurt anyway.

Ideally this should have been fixed by Oculus/Epic a few revisions back. Hopefully either next hotfix or 4.17 will have this issue fixed.