Packaging VR onto Android - Bottomless Pit

Hi all,

I’ve been trying for weeks to get a consistent workflow down for Packaging a VR project onto an Oculus Quest 2. Every day I’ve troubleshooted new error messages, but it always seems to be 1 step forward and 2 steps backwards. Now things are just not starting to make sense at all.

I’ve had successful installations onto the device that work perfectly fine, and then decide to never load again until I do a fresh installation. I’ve done this with just a plain cube and a Pawn and I’ll still often have the 3 never-ending white dots of doom.

Anything with more than a cube (including the untouched UE VR Demo project) and it’s completely hopeless…

Here are the main two errors from preventing me to package the VR Expansion Plugin Demo project, that I’m unable to find a trace of anywhere.

" Error: MapFormatSupport: R64_UINT is not supported with VkFormat 110 "

" Error reentered: Assertion failed: IsInGameThread() [File:D:/build/++UE5/Sync/Engine/Source\Runtime/Core/Private/Misc/OutputDeviceRedirector.cpp] [Line: 277] "

Repeatedly packaging (definition of insanity…) occasionally doesn’t bring these errors up, but again, when attempting to run on the device I’ll just have a never-ending loading screen and eventual eery darkness

Quick Launch straight to the device whilst connected with a wire is the same thing. VR Preview doesn’t even work at all for me in UE5, it simply remains greyed out despite my device being listed and connected in the Device Manager, and despite the fact VR Preview works absolutely fine in UE4!

I’m doing this as part of an upskilling program at my job, so I’ve had the privilege of trying 3 separate Quest 2 devices all with similar results, therefore it’s unlikely to be a headset hardware issue.

Bar those 2 errors mentioned above that pop up now and again (specific to the VR Expansion Plugin project), I’m at the point where I’ve cleaned up all of the other error messages, yet my project, however big or small, simply. will. not. run!! Making it very difficult to troubleshoot from here onwards…

It all seems incredibly volatile and there’s really nothing out there that goes through the whole process in detail. I’ve tried the few tutorials there are online and I’ve gone through the basic UE documentation (Oculus Development Requirements, Android Packaging etc), each time encountering new problems, then going down a seemingly bottomless rabbit hole of new issues specific to that tutorial, repeat x100. I understand there are multiple factors at play - drivers, sdk’s, project settings, asset optimisation… but things like installing near 10 year old discontinued JDK’s because it “just works” seems nonsensical. Not that I expected it to be easy either, just make a little more sense!!

If anyone has some advice or magic to share then that would be greatly appreciated as my sanity is starting to dwindle!! :slight_smile:

1 Like

I feel your pain. It’s stories like this that have kept me using 4.22.3 - GLES2 for Quest 2 since I know it works reliably. I never use Launch game, always package and use generated batch file to deploy shipping build to device. I use a limited feature set - no landscape, no ISM, static lighting etc. I do use VRE plugin and media playback. Use VRE to give you a desktop pawn so you don’t have to develop in VR exclusively.
I feel like I’m going to have to wait for 5.1 or later before I upgrade the version of UE I use for commercial projects that have to be 100% stable.
Hope this helps in some way.

1 Like

Im going through a similar thing but haven’t been able to build for quest at all in UE5. I would say try to get VR preview working before anything else. You may need to install/reinstall/update the oculus adb drivers.

Overall it seems like that has been a severe lack of focus on Quest/mobile vr by the unreal engine developers. Probably has to do with the push for UE5 features (lumen, nanite) that are not supported in VR. Im considering switching back to Unity because honesly i feel as though i could have rebuilt my whole game in Unity in the amount of time that i’ve spent trying to configure stuff to work with Unreal.

1 Like

I bashed my head against a wall trying to get EA UE5.0 to work with any of these SKDs - tried the 3 online tutorials and none worked. Gave up and tried UE 4.27 and it worked, then UE5.0 came out so I thought maybe something would’ve improved… but they still have the same old documentation!

I had similar issues.

In fact IslandPlaya replied to my post too. Android Instabilities - #3 by illYay

I don’t get it. Is it an issue with devices that Facebook/Meta builds specifically or all Android? I myself was doing stuff with the Portal since I’m a dev there and have unlocked devices.

I built a very simple demo project, and the base FPS demo worked. I had one point where an Actor was getting destroyed and some script ran and I had a crash. I even noticed that there appears to be a limit to what the scene can handle, and too much and the game crashes.

I really do hope that with time some more focus is put on this but as you’ve all stated Epic has been dealing with a ton of changes, larger world support, double floats, chaos, lumen, nanite etc… Hats off to them for sure for reaching for the stars with things like the Matrix demo and the new CWF city generator and MASS. Sometimes it does feel that things slip due to this (mobile, VR) and with all the pushes to cutting edge the lower end suffers (PhysX is likely the more optimized choice for mobile as well). I’m still using 4.24 for my PCVR project and did get 4.27 running/packaged to quest2 and just kind of breathed a sigh of relief.

I would recommend heading over to the oculus start discord “unreal” channel as we (UE devs, indies, VR community) go over these topics and more and do assist developers attempting to get through these hurtles.

On a lighter note Daffy has it all figured out :rofl:
image

4 Likes

to add onto that statement, on 5/25/2022 I’ll be hosting an AMA on behalf of oculus in the oculus start discord for anyone with unreal related questions.

4 Likes

Do you have to be a member of the Oculus Start program to join the discord?

1 Like

They do have a validation process yes

Running into this today on 5.0.3

“Error: MapFormatSupport: R64_UINT is not supported with VkFormat 110”

SOLUTION: I figured out my error. Oculus Quest 2 doesn’t support AAB like new Android SDK requires. Uncheck Generate App Bundle and use traditional APK.

Im also in the boat of quest packaging hell. It seems to always be one step forward two steps back.

2 Likes

I keep getting this on 5.0.2 oculus branch. I have a feeling it’s related to redpoint epic online systems plugin, but I can’t be sure without ripping it out of my project.

UATHelper: Packaging (Android (ASTC)): C:\Users\makeA\.gradle\caches\transforms-2\files-2.1\4867ec1a16869c9b3799ac8e883e8ca5\jetified-play-services-base-11.8.0\proguard.txt:3:89-97: R8: The field name "<fields>" is used in a field rule. The characters in this field name are legal for the JVM, but unlikely to originate from a source language. Maybe this is not the rule you are looking for.

UATHelper: Packaging (Android (ASTC)): > Task :app:mergeReleaseNativeLibs
UATHelper: Packaging (Android (ASTC)): C:\Users\makeA\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: program header with offset 0x510b90 and file size 0x17470 goes past the end of the file

I’ve tried upgrading my gradle and proguard, disabling progaurd/minification, changing sdk/ndk, etc. No dice. Anyone have any ideas?

We’re also getting this exact same error: “C:\Users\jack\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: program header with offset 0x510b90 and file size 0x17470 goes past the end of the file” after merging in the latest OVR plugin changes from the Oculus branch on a pretty much blank project. So I guess this is something that has happened with one of the recent updates. Not sure about the field name message you are getting, doesn’t happen in a blank project at least.

To add to the list of Quest packaging hell, when we try to package our project for Android, the packaging process just memory leaks until our computer runs out of memory in our actual project. Then errors out with an OOM error. This is the step where the memory leaks starts to happen for us. I’ve posted on UDN about it, but still no response :frowning:

weird about the memory leak, I’m not getting that. I think? I do have 128gb of ram so maybe I just never noticed.

Are you using any plugins? I’ve been suspicious that my redpoint EOS plugin is causing at least one of the log errors.

I was getting the fields error on stock unreal, switching sdk/ndk set up made that go away. I have also manually updated my gradle. Can’t seem to force my proguard settings to update though. Not enough docs explaining where to override.

Here’s a draft post on my website about how to update gradle if you want to do that.
Manually Updating Gradle in Unreal Engine (draft) – Life Art Studios

Did you ever work out how to fix this? I’m getting the same error in 4.27

nope, magically went away for me. I believe it may have something to do with trying to use the override manifest or android permissions stuff on my end.

The issue is you most likely have extra android permission and you haven’t pressed the configure for android button in your project settings - Android

I’ve had no probs with 4.27 and 5.03 at all
I suggest the gdxr utbe vids
if you migrate to 5.1 though you have to copy over the content from a blank 5.1 vr template project to get the new hands and enhanced inputs.

I have not been able to successfully build to quest in 5.1
it says I don’t have my sdk installed
but
4.27 and 5.03 build fine using ndk 21e and sdk 29 and all my tools, win64 compiles too
I dl the 25b ndk using the “install android bat”
it shows fine in my android studio
but unreal chokes on it, says I don’t have the right ndk (that it downloaded).
I just converted all my projects to 5.1!
but the quest ones I have to go back to 5.03 until the next update to the engine

edit:
I was able to build for quest on 5.1 this morning
but I had to uninstall the ndk25b that unreal had installed using Android
I uninstalled 25b and reinstalled it
the reinstalled version was more than 500 megs larger
I went back to unreal, set the sdk to 30 (its 29 for 4.27 and 5.03) and ndk to latest and set the path to the freshly dl’d ndk25b
and it worked.
I was frustrated.
So maybe that will work for some of you
uninstall the ndk25 using android studio
and then reinstall it
and make sure you have sdk 30.

2 Likes

For anyone looking for a build of UE5 with Software Occlusion culling for VR projects … just wanted to leave this here :slight_smile:

2 Likes