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.

[Solved] Unity - Entitlement working but unable to retrieve AssetFiles

InpuInpu Posts: 56 Oculus Start Member
edited October 2018 in Platform SDK Development
Hi !

My environment is the following : Unity v2017.3.1f1, Oculus Utilities v1.27.0, OVRPlugin v1.27.0, SDK v1.29.0, Oculus Go

I've set up the Platform SDK. The Entitlement and the AsyncInitialize is working fine on the Editor with the OculusPlatformSettings configured with my Oculus account, but when I'm calling AssetFile.GetList().OnComplete(MyFunction), I'm never getting a callback to my "MyFunction" method.

If I push it to my alpha channel, it seems to reach it properly, but then I have another issue : it doesn't find any asset file despite the fact that I can see them on the build details.

I'm not sure what I'm doing wrong here ? Commands like Users.GetLoggedInUser() are working fine on the editor, but anything related to the AssetFiles doesn't seems to trigger any event on the editor.

Thanks, also paging @imperativity :)

Edit 1 :

By doing more test I've noticed the following :

- On the Oculus Go, If I launch the app for the first time after an update or the first instalation, AssetFile.GetList() return an empty array

- If I launch the app at least a second time after an installation or an update, it does return all my Assets.

That's really weird.

Edit 2 : Additional information : I've tried upgrading to Unity 2017.4.9, still the exact same behavior.

Edit 3 :

I'm still experiencing both issues :

- Unable to get the AssetFiles on the Editor (callback method never called)

- Unable to get AssetFile on first launch after an install or an update

I'm trying to go deeper in the process, here's what's working when I'm able to get the assetfiles :

- I can loop my AssetFile list and get the one I want

- I can download it, after it's downloaded, it's put on the following folder according to AssetFileDownloadResult : /storage/emulated/0/Android/obb/fr.InsideLearning.AQUIOThermes/myFile

- I'm able to retrieve it using "UnityEngine.Networking.UnityWebRequest.GetAssetBundle" with the URI : "file:///storage/emulated/0/Android/obb/fr.InsideLearning.AQUIOThermes/myFile", I'm also downloading the .meta and .manifest file.

However, when I'm trying to get the AssetBundle using DownloadHandlerAssetBundle.GetContent(), I'm getting the following error :

"Failed to open file 'archive:/CAB-5aadb2fd12ba293da215f3179655470e/CAB-5aadb2fd12ba293da215f3179655470e.resource'. (No such file or directory)".

Am I doing something wrong ? Is this the right way to read AssetBundle files generated using Unity and set as "DLC" on Oculus ? It's kind of driving me crazy, this is a critical piece of the app I'm creating for a customer.

For information, I've set permissions to READ and WRITE to external storage.

I really, really need your help,

PS : Maybe that's related, but you say on the documentation that users can manually download DLC file outside the app, but I can't find a way to do it when I'm on the app main page on the Oculus go, or from my smartphone








Answers

  • InpuInpu Posts: 56 Oculus Start Member
    edited August 2018
    Alright :

    - The GetContent() error I was having was due to an Unity bug so I stopped usind BundleAssets. So on the Oculus Go everything's working fine now.

    I still have two issues remaining :

    - Unable to get the AssetFiles on the Editor (callback method never called), maybe it is by design ?

    - Unable to get AssetFile on first launch after an install or an update. This is kind of random. I have some code that just output the number of Asset I'm getting from Oculus. Sometime it says 0 assets, sometimes it find every assets. When it find zero assets, there's no error. it just return 0 file in the List.

    I'm doing every check I can to make sure the AssetFile.GetList() method can run properly, i.e checking if Core has been initialised before getting the assets.

    I've upgraded my project to Unity 2018.1, no change. To make sure it wasn't some kind of "I started the method too soon" issue, I modified my code to start again getting the Asset from Oculus in case it was returning no assets. It didn't worked and keep looping trying to get the assets.



  • InpuInpu Posts: 56 Oculus Start Member
    @imperativity Sadly it seems that the issue where GetList() randomly doesnt return any assets it a known issue, no fix ETA for now :(. This make it impossible to use the DLC system into a released build, that's really a shame as it was really handy and time saving.
  • InpuInpu Posts: 56 Oculus Start Member
    @imperativity thanks for following this up, I'm holding my hosting backup plan for now !
  • InpuInpu Posts: 56 Oculus Start Member
    @imperativity  That's great news ! But what's an "OTA" update ? ^^
  • InpuInpu Posts: 56 Oculus Start Member
    Hi @imperativity, do you have any update for me ?
  • InpuInpu Posts: 56 Oculus Start Member
    Hi @imperativity, sorry to ping you again. I didn't got any update since your message, and I still have the issue. Do you have any new informations ?
  • InpuInpu Posts: 56 Oculus Start Member
    @imperativity Thanks for coming back to me. Do you have any ETA ? It was supposed to be last week.
  • InpuInpu Posts: 56 Oculus Start Member
    Hi @imperativity, we started some initial deployment of the app this week, and the issue seems worse. I had to update the app to add a popup that ask the user to restart the app everytime AssetFile.GetList() returns an empty array, but sometimes even restarting the app doesn't work. Do you have an ETA for the fix ?
  • InpuInpu Posts: 56 Oculus Start Member
    If anyone came across the same issue : still no ETA for the fix unfortunately. Keeping finger crossed...
  • InpuInpu Posts: 56 Oculus Start Member
    It seems that a firmware update is rolling on the Oculus Go. @imperativity do you know if it include the fix ? I can't find the changelogs.

    Thanks !
  • InpuInpu Posts: 56 Oculus Start Member
    @imperativity : It has fixed the issue ! That's awesome, thanks :smile:
  • PHORIA-DevPHORIA-Dev Posts: 2
    NerveGear
    Hey, I'm having the exact same issue and have spent ages trying to fix it to no success. It sounds like imperativity had a solution, however his account has been deleted so I can't see what it was. Do you remember how you fixed this?
  • InpuInpu Posts: 56 Oculus Start Member
    Hi !

    If I recall correctly, it was the firmware update that fixed the issue. I've checked the ticket that I had with the support, and I end up closing it too after the update.
  • PHORIA-DevPHORIA-Dev Posts: 2
    NerveGear
    Thanks for the fast reply! That's unfortunate to hear. I'll keep looking around and hopefully find something. :smile:
Sign In or Register to comment.