Not loading from cache when no internet

Hello,

I’ve been using Addressables for a couple of months in a live application. After upgrading it to 1.11.2 it has stopped working when there is no internet. All of my bundles are remote and are downloaded at app start. Previously, the app could then be run without internet after that. Now, if the app launches without internet, there is an exception.

The confusing part is, this only happens on the Android device, it does not happen in the editor if I replicate the same scenario - I clear the cache, start play mode, downloads everything, stop play mode, turn off internet, and start play mode and it runs just as expected.

On Android, if I do the same steps and then run the app without internet after previously downloading everything, I get this error:

07-12 00:47:57.738 24903 24928 E Unity : NullReferenceException: Object reference not set to an instance of an object.07-12 00:47:57.738 24903 24928 E Unity : at UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource.WebRequestOperationCompleted (UnityEngine.AsyncOperation op) [0x00000] in <00000000000000000000000000000000>:0
07-12 00:47:57.738 24903 24928 E Unity : at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
07-12 00:47:57.738 24903 24928 E Unity : at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0
07-12 00:47:57.738 24903 24928 E Unity :
07-12 00:47:57.738 24903 24928 E Unity : (Filename: currently not available on il2cpp Line: -1)

Addressables 1.11.2
Unity 2019.2.9f1

It’s working now, all the bundles were reset to local build/load instead of remote build/load. This seems to happen every so often and I’ve read it has to do with them not being marked dirty and thus not saving, which would make sense because Unity lost all of my schemas recently and I had to redo all of them to be remote build/load.

Please fix those issues, it’s difficult to use this for production when schemas can just disappear and when they can also sometimes not save.

Thanks for flagging. Have you filed a bug report for this by chance? Please do, if you haven’t, as it will help us investigate this further: Unity QA: Building quality with passion

Not yet but I will. It just happened again, exception only when not connected to internet.