Search Unity

Oculus Go - Apps built on Unity 2019.1 crash when opening them in the Go

Discussion in 'AR/VR (XR) Discussion' started by fariazz, Feb 26, 2019.

  1. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Hey there! I was wondering if anyone has been able to run a project built with Unity 2019.1 in the Oculus Go.

    After my main project failed, tried again in a new project with the must basic setup (a new scene, switched platform to Android, added package name, enabled Oculus go then built). The app builds and installs, but crashes on startup in the Go. I'm using the Android SDK and NDK that come with Unity. It's literally a new install of Unity 2019.1.0b4 (tried with 0b3 and same thing).

    The hello world app: https://github.com/fariazz/oculus-go-hello-world-bug

    Adb logcat:

    Code (CSharp):
    1. -26 12:22:02.503   982  1008 V BackupManagerService: restoreAtInstall pkg=com.zenva.hellooculusgo token=9 restoreSet=0
    2. 02-26 12:22:03.195   982  1074 I ActivityManager: Force stopping com.zenva.hellooculusgo appid=10076 user=0: from pid 5904
    3. 02-26 12:22:03.458   982  1305 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity} from uid 2000 on display 0
    4. 02-26 12:22:13.974   982  1288 I ActivityManager: Start proc 5978:com.zenva.hellooculusgo/u0a76 for activity com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity
    5. 02-26 12:22:14.160   982  1348 D VoldConnector: SND -> {14 volume mkdirs /storage/emulated/0/Android/obb/com.zenva.hellooculusgo/}
    6. 02-26 12:22:14.689   982  1287 I WindowManager: WIN DEATH: Window{9a0a1b8 u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity}
    7. 02-26 12:22:14.690   982  1297 I ActivityManager: Process com.zenva.hellooculusgo (pid 5978) has died
    8. 02-26 12:22:14.691   982  1287 W WindowManager: Force-removing child win Window{e7a2da6 u0 SurfaceView - com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity} from container Window{9a0a1b8 u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity}
    9. 02-26 12:22:14.691   982  1297 W ActivityManager: Force removing ActivityRecord{a581ba3 u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity t163}: app died, no saved state
    10. 02-26 12:22:22.089   982  1250 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10010000 pkg=com.zenva.hellooculusgo cmp=com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity (has extras)} from uid 10021 on display 0
    11. 02-26 12:22:22.622   982   995 I ActivityManager: Start proc 6040:com.zenva.hellooculusgo/u0a76 for activity com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity
    12. 02-26 12:22:23.339   982  1074 I WindowManager: WIN DEATH: Window{227b1c7 u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity}
    13. 02-26 12:22:23.339   982  1074 W WindowManager: Force-removing child win Window{7401bdb u0 SurfaceView - com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity} from container Window{227b1c7 u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity}
    14. 02-26 12:22:23.339   982  1297 I ActivityManager: Process com.zenva.hellooculusgo (pid 6040) has died
    15. 02-26 12:22:23.340   982  1297 W ActivityManager: Force removing ActivityRecord{f4697cf u0 com.zenva.hellooculusgo/com.unity3d.player.UnityPlayerActivity t164}: app died, no saved state
    16.  
     
    ROBYER1 likes this.
  2. Kyodan

    Kyodan

    Joined:
    Feb 5, 2015
    Posts:
    8
    My initial guess is this may be due to the AndroidManifest.xml file not containing the required flags for Oculus Go development. You can generate one using the Oculus Integration (through Tools -> Oculus -> Create store-compatible AndroidManifest). Regardless, the contents of that file can be found below:

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3.     android:installLocation="auto">
    4.     <application
    5.         android:allowBackup="false">
    6.         <activity
    7.             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
    8.             android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
    9.             android:launchMode="singleTask"
    10.             android:name="com.unity3d.player.UnityPlayerActivity"
    11.             android:excludeFromRecents="true">
    12.             <intent-filter>
    13.                 <action android:name="android.intent.action.MAIN"/>
    14.                 <category android:name="android.intent.category.INFO"/>
    15.             </intent-filter>
    16.         </activity>
    17.         <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
    18.     </application>
    19. </manifest>
    20.  
    Save as AndroidManifest.xml and place in the Assets/Plugins/Android folder (if missing, you must create).
     
  3. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Thanks for responding. I've installed the Oculus plugin, updated it to the latest version, generated the AndroidManifest.xml file, but the result is the same after building and installing to the device.

    In our project that's on 2018.3 we are able to run on the device without the manifest file, so I don't think that is related to this issue.
     
    Kyodan likes this.
  4. frankadoriv

    frankadoriv

    Joined:
    Jul 19, 2017
    Posts:
    14
    You still have this problem?
     
  5. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Yes, but I've been able to narrow down to the selection of IL2CPP under Player Settings - Other Settings - Scripting Backend. I can run the app fine when selecting the scripting backend Mono. I've reported this bug here: https://developer.oculus.com/bugs/bug/414296145973060/
     
    Kyodan and gjf like this.
  6. frankadoriv

    frankadoriv

    Joined:
    Jul 19, 2017
    Posts:
    14
    On my case i just found it was a VulkanAPI problem, so i just deactivated. I still didnt test IL2CPP because is to slow under development phase
     
  7. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    It'd be interesting to see if you can build with IL2CPP (agree it's slow, but it's necessary when you want to publish to the Oculus Store). I've recorded the bug with a new project:
     
  8. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Just tested in the new version 2019.1.0b5 and the issue seems to be resolved! I was able at last to run the app built with IL2CPP on the Oculus Go.
     
    Rakesh6720 and Kyodan like this.
  9. frankadoriv

    frankadoriv

    Joined:
    Jul 19, 2017
    Posts:
    14
    Great to hear! Upgrading now.
    You had luck trying to make work LWRP with PP on VR?
     
    Tom-Goethals and fariazz like this.
  10. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Haven't tried the LWRP on 2019.1.x yet. Tried it in 2018.3 a while back and it worked fine.