Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Quest 2 - Unity - Issue with OVR Scene Quick Preview

mariuxtheonemariuxtheone Posts: 10
Brain Burst
Hello,

I am trying to run the OVR Scene Quick Preview on the Quest 2 for my Unity game. While it works perfectly on Quest 1, on Quest 2 this is what happens:

1) Build and Deploy App works fine, it runs the OVR Transition Scene on Quest 2 (Black screen with floating white windows saying "Failed to Get Scene Info Data"
2) When I try to do Build And Deploy Scenes, I get this error:

Log
Building and deploying transition APK  . . . Success!
Building scene bundles . . . 
Deploying scene bundles to device . . . 
Failed!
adb: error: failed to stat remote object '/sdcard/Android/data/com.my.vrgame/cache/scenes/OVRMasterBundle': No such file or directory

and it doesn't run.

I have allowed for the data permission on Quest 2. Suggestions?
Tagged:

Comments

  • mariuxtheonemariuxtheone Posts: 10
    Brain Burst
    No, still getting the same error. Tried with a fresh project importing the Oculus plugin from scratch, still getting the same.
  • WebbstreWebbstre Posts: 10
    Brain Burst
    Same problem here!
  • TimothyNLTimothyNL Posts: 1
    NerveGear
    edited October 2020
    No, still getting the same error. Tried with a fresh project importing the Oculus plugin from scratch, still getting the same.
    I have the same problem, with the Quest 2 in Unity 2020.1.4f1 with Oculus Integration 20.1.0. 
    I thought I might try a new project, but thanks for the heads up that that won't help!

    (Am new to (VR) development, and new to these fora. Just got a Quest 2 and finished the Create with Code course, I work with an average laptop so Link won't work for me. DM me if you have any starter tips or tricks).
  • mdroxasmdroxas Posts: 2
    NerveGear
    I tried the sample scenes. While they deploy and the cameras work, the controllers are not visible. The HandTest_Custom has hands, but in different orientation and the buttons don't work.

    Are we to assume that Unity Integration is not working for Quest 2?
  • mariuxtheonemariuxtheone Posts: 10
    Brain Burst
    Btw: tried the OVR Build APK & Run, also that one doesn't work. Looks like it's a permissions problem.

    Getting this in the Log when trying to run OVR Build APK & Run:

    OVRADBTool avc:  denied  { read } for  scontext=u:r:system_server:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=0
    System server has no access to read file context u:object_r:sdcardfs:s0 (from path /sdcard/Oculus/Temp/launcher-debug.apk, context u:r:system_server:s0)
    Error: Unable to open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Consider using a file under /data/local/tmp/
    Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Exception occurred while executing:
    java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:461)
    at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1060)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:169)
    at android.os.ShellCommand.exec(ShellCommand.java:108)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21881)
    at android.os.Binder.shellCommand(Binder.java:881)
    at android.os.Binder.onTransact(Binder.java:765)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4880)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4015)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)

    I'm on Unity 2019.4.5f1 with the related Android SDK installed automatically with Unity.
  • mariuxtheonemariuxtheone Posts: 10
    Brain Burst
    Also OVR Build APK & Run doesn't work.

    It looks like a permission error. I'm on Unity 2019.4.5f1, Android SDK installed with this version of Unity. 

    This is what I am getting in the Log;

    OVRADBTool avc:  denied  { read } for  scontext=u:r:system_server:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=0
    System server has no access to read file context u:object_r:sdcardfs:s0 (from path /sdcard/Oculus/Temp/launcher-debug.apk, context u:r:system_server:s0)
    Error: Unable to open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Consider using a file under /data/local/tmp/
    Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Exception occurred while executing:
    java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:461)
    at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1060)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:169)
    at android.os.ShellCommand.exec(ShellCommand.java:108)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21881)
    at android.os.Binder.shellCommand(Binder.java:881)
    at android.os.Binder.onTransact(Binder.java:765)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4880)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4015)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)


  • WebbstreWebbstre Posts: 10
    Brain Burst
    We can't be the only ones having this problem, right?
  • originlab3doriginlab3d Posts: 9 Oculus Start Member
    Same problem here!
  • dustwisedustwise Posts: 3
    NerveGear
    edited October 2020
    I am also experiencing this issue. As a developer who is using Oculus hardware and Oculus software, it is frustrating buying into an ecosystem to have it not function.

    Question: Is anyone else here having further issues with their Android installs?

    I've had to install Android Studio and point Unity to them. I am also prompted to upgrade my Android SDK (and am unable to) on building and have to tell it to use the highest installed, which I assume is coming from my Studio installs.

    Why are we unable to preview our scenes? Any successes?

    I am disheartened no one from Oculus has responded.

    EDIT: I managed to fix my SDK issue by following unity_03phillipsm's advice here: answers.unity.com/questions/1750743/unable-to-start-adb-server-make-sure-the-android-s should it be affecting anyone else. That said, it did not resolve the OVRMasterBundle issue posed by the thread.
  • Korax_19Korax_19 Posts: 1
    NerveGear
    Also OVR Build APK & Run doesn't work.

    It looks like a permission error. I'm on Unity 2019.4.5f1, Android SDK installed with this version of Unity. 

    This is what I am getting in the Log;

    OVRADBTool avc:  denied  { read } for  scontext=u:r:system_server:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=0
    System server has no access to read file context u:object_r:sdcardfs:s0 (from path /sdcard/Oculus/Temp/launcher-debug.apk, context u:r:system_server:s0)
    Error: Unable to open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Consider using a file under /data/local/tmp/
    Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    Exception occurred while executing:
    java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/Oculus/Temp/launcher-debug.apk
    at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:461)
    at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1060)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:169)
    at android.os.ShellCommand.exec(ShellCommand.java:108)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21881)
    at android.os.Binder.shellCommand(Binder.java:881)
    at android.os.Binder.onTransact(Binder.java:765)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4880)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4015)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)



    OVR Build APK and Run is working for me on the Quest 2, only the Scene Quick Preview does not.
  • WebbstreWebbstre Posts: 10
    Brain Burst
    i figured it out. The original quest was built of of a version of Android 7.1, but the Quest 2 is Android 10, which requires API Level 29. After updating my API I was able to successfully load an apk
  • gazowen84gazowen84 Posts: 7
    Brain Burst
    edited October 2020
    Same issue here. 

    Webbstre said:
    i figured it out. The original quest was built of of a version of Android 7.1, but the Quest 2 is Android 10, which requires API Level 29. After updating my API I was able to successfully load an apk
    I have unity set to to API level 29. still same issue :/

    Building scene bundles . . . 
    Deploying scene bundles to device . . . 
    Failed!
    adb: error: failed to stat remote object '/sdcard/Android/data/com.DefaultCompany.Again1/cache/scenes/OVRMasterBundle': No such file or directory

  • WebbstreWebbstre Posts: 10
    Brain Burst
    I have realized that the correct APK allows me to Build and Run, but the whole Test Scene loading still fails. Oopsies
  • mariuxtheonemariuxtheone Posts: 10
    Brain Burst
    Anyone from Oculus looking into this?
  • rrajagop99rrajagop99 Posts: 2
    NerveGear
    I am having the same issue ....
    Deploying scene bundles to device . . . 
    Failed!
    adb: error: failed to stat remote object '/sdcard/Android/data/com.VP.newvrgame/cache/scenes/OVRMasterBundle': No such file or directory

    I asked Oculus support ... no solutions from them.  I sent it as "Report a Bug" in ODH, no response yet. 
    I have tried making changes to OVRBundleManager.cs and OVRBundleTool.cs  I have transferred files from OVRAssetBundles and OVRTransitionscene.unity to Quest2.  Tried API level 28, 29 and 30. Tried the regular Build and Run in "File" instead of OVR Scene Quick Review.  NO luck yet.

    Seriously, anyone in Oculus aka Facebook trying to get a solution for us? Who else to ask?
    What else can we do?
  • rrajagop99rrajagop99 Posts: 2
    NerveGear
    edited November 2020
    I finally took the following steps and made it deploy to my VR headset since both OVR Build APK and Run as well as OVR Scene Quick Review did not work for me on Quest 2.
    1. In Unity: File - Build Settings - Export Project - Export - by saving in a folder.  It builds a Gradle project in that folder
    2. In Android Studio: import the Gradle project pointing to the folder above
    3. In Android Studio: while keeping the VR device connected to the computer, Build - Build APK. After that is complete then Hit the play button next to the device - It goes thru' Gradle Build Running
    4.  Go to your VR device and it should show up in Applications - Unknown sources.
     Good Luck.
  • dustwisedustwise Posts: 3
    NerveGear
    Please help us with this, Oculus. The radio silence is deafening.
  • dustwisedustwise Posts: 3
    NerveGear
    Are others who experience this issue on windows insider rings? 

    I'm close to trying a complete Windows install to try and fix this issue.
  • huebreezehuebreeze Posts: 1
    NerveGear
    edited January 2
    I found the issue!

    In Assets/Oculus/VR/Editor/OVRBundleManager.cs, on line 453 it detects that no bundle has been previously deployed by comparing the error message to the string "does not exist". But as reported in the OP the error message is "No such file or directory".

    I changed line 453 to instead read:
    if (output.Contains("does not exist") || output.Contains("No such file or directory"))
    And now it works!
  • TrippopotomusTrippopotomus Posts: 1
    NerveGear

    huebreeze said:
    I found the issue!

    In Assets/Oculus/VR/Editor/OVRBundleManager.cs, on line 453 it detects that no bundle has been previously deployed by comparing the error message to the string "does not exist". But as reported in the OP the error message is "No such file or directory".

    I changed line 453 to instead read:
    if (output.Contains("does not exist") || output.Contains("No such file or directory"))
    And now it works!
    Hue! Champion!!! Totally easy fix. Thanks.
  • DevelopedRealityDevelopedReality Posts: 4 Oculus Start Member
    Thanks for this! Trying to get this utility to actually work has been driving me crazy all morning. 
Sign In or Register to comment.