Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug RemoteProviderException: TextDataProvider : unable to load "assets/aa/settings.json"

Discussion in 'Addressables' started by Peter77, Aug 7, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,588
    Unity 2019.4.20f1, Addressables 1.18.13, Android Player

    I see a few of the following error logged in Unity Cloud Diagnostics:
    Code (CSharp):
    1. RemoteProviderException: TextDataProvider : unable to load from url : jar:file:///data/app/com.company.product/base.apk!/assets/aa/settings.json
    How is that even possible, this file is part of the APK. Why can't Addressables load it?
     
    BAIZOR, lucbloom and nick-morhun like this.
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    I'll ping the team for some insight.
     
    Peter77 likes this.
  3. jack-fang

    jack-fang

    Joined:
    May 10, 2013
    Posts:
    17
    upload_2021-8-24_17-5-55.png
    use Addressable 1.18: build apk Test
    Addressables.CheckForCatalogUpdates(false); throw Exception
    android allow http
    URL browser can access,
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    762
    @Peter77 I've been trying to reproduce this on 1.18.13 and haven't had any luck. Though, it's possible that my project isn't setup right to reproduce the issue. Does the issue still occur on 1.18.15? We fixed a pretty bad issue that went out into 1.18.13 and I'm wondering if that caused what you're seeing.

    If it is still occurring, can you submit a ticket with full repro steps and/or a repro project?
     
    Peter77 likes this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,588
    Thank you for the reply.

    I upgraded to 1.18.15 when it came out, but had to revert back to 1.18.13 on the same day, due to a severe editor performance issue that was introduced with 1.18.15. I'm unable to tell whether it's fixed in 1.18.15 as of now. https://forum.unity.com/threads/cas...-15-inspector-performance-regression.1151420/

    I wish I knew how to reproduce it and if I find out, I'll submit a bug-report. Unfortunately I only see in Unity Cloud Diagnostics that the issue is occurring. I don't think I saw this problem during my own tests.
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,588
    EDIT: Changing the Android Package Name and Product Name worksaround the issue.

    Hi @davidla_unity , I found a case that throws RemoteProviderException's under Android, but does work under Windows Standalone.It does reproduce with Addressables 1.18.15.

    I was actually trying to test something else and I really have no idea why it's not working. Perhaps it's related to the problem I mentioned in the first post in this thread, because both throw a RemoteProviderException.

    Please see bug-report:
    (Case 1361380) 2019.4: Addressables Android Player causes RemoteProviderException, but Windows Player works

    Running the attached project on Android displays a RemoteProviderException.
    Running the attached project on Windows does not display a RemoteProviderException.

    Code (CSharp):
    1. RemoteProviderException : Invalid path in AssetBundleProvider: 'jar:file:///data/app/com.MyCompany.AddressablesContentUpdate-2/base.apk!/assets/aa/Android/defaultlocalgroup_unitybuiltinshaders_1812b6184567f0fac607fc5546d4ec83.bundle'.
    2. RemoteProviderException : Invalid path in AssetBundleProvider: 'jar:file:///data/app/com.MyCompany.AddressablesContentUpdate-2/base.apk!/assets/aa/Android/defaultlocalgroup_monoscripts_e015a7508d7cf33cc00ab7e8a8a0ac05.bundle'.


    Reproduce
    1. Open attached project
    2. Open Build Settings, enable "Development Build" and switch to Windows Standalone build target
    3. Open "Window > Asset Management > Addressables > Groups" and click "Build > New Build > Default Build Script"
    4. Click "File > Build and Run"
    5. In the Windows Player, notice when you click, it changes the background color, thus loaded the menu scene
    6. Close Windows Player and switch back to Unity Editor
    7. Open Build Settings and switch to Android build target
    8. Open "Window > Asset Management > Addressables > Groups" and click "Build > New Build > Default Build Script"
    9. Click "File > Build and Run"

    Actual
    Android Player outputs a RemoteProviderException.

    Expected
    No exception.
     

    Attached Files:

    Last edited: Aug 29, 2021
  7. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    762
    Hey, sorry for the delayed response, I've been out for a bit.

    That's interesting that it's just Android. Thanks for attaching your repro steps and project here. I'll download it and take a look. I checked the status of the ticket you submitted and it looks like our QA is having some issues reproducing it. I'll take a look independently but they might be able to help you out in the meantime.

    Thanks again for submitting everything.
     
  8. kjyv

    kjyv

    Joined:
    Feb 20, 2018
    Posts:
    53
    We're also seing this every now and then, it is usually fixed with a rebuild of the apk. We're on 1.18.15, Unity on macOS, device is Android 9
     
  9. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    106
    Hi there, so QA spend some time looking into this issue but unfortunately they were never able to reproduce it, nor did they receive any reports of a similar case so they've closed the case for the time being. Is this issue still occurring on newer addressables versions? If it's becoming an issue again or if there's another repro that a user could provide I'm sure we would be able to look into it and see if there's anything to be done, but until then there's not much we can do unfortunately. Please don't hesitate to message again in this thread if it continues to be an issue @kjyv @Peter77
     
  10. aleksander_bashkiriev

    aleksander_bashkiriev

    Joined:
    Sep 16, 2020
    Posts:
    3
    Hi!
    We have the same problem on some devices after add aab build.

    User see error - look image.

    Unity version 2020.3.17f
    Addressables version 1.18.16
     

    Attached Files:

  11. BlinksTale

    BlinksTale

    Joined:
    Dec 15, 2013
    Posts:
    13
    Hi all,

    I also had this error with Addressables working on my local build but not Cloud builds:
    Code (CSharp):
    1. System.Exception: Invalid path in TextDataProvider [...]/aa/settings.json'.
    The solution was that I didn't realize there was a setting in Cloud Builds to build Addressables, and I needed to enable it and make it not a "content only" build (so it built the player + addressable content):
    https://docs.unity3d.com/Manual/UnityCloudBuildAddressables.html

    While this is ultimately really useful, it definitely caught me off guard. I wish I had gotten a popup or email when I first committed Addressables as a package to my git (or when Unity Cloud noticed it) so that I could opt in for building them or not. I spent far too long hunting this down since I didn't realize it was a setting (probably should have read Cloud Build documentation better the first time some 6-12mo ago).

    Either way - it works for me now! I hope sharing this helps someone else too.
     
    lucbloom likes this.
  12. xwin28

    xwin28

    Joined:
    Nov 9, 2019
    Posts:
    2
    This sound like stupid but when i do this:
    1: Build Addressable Group
    2: Upload to Cloud
    3: Build Game (Android)
    => it work normal (on Adroid Device)

    But when i do this:
    1: Build Addressable Group
    2: Upload to Cloud
    3: Play on Editor -> work normal
    3: Build Game (Android)
    => Error "unable to load from url : jar:file:///data/app/com.DefaultCompany.product/base.apk!/assets/aa/settings.json" show up (On Android Device)

    You should try out. Maybe this could help.
     
  13. aleksander_bashkiriev

    aleksander_bashkiriev

    Joined:
    Sep 16, 2020
    Posts:
    3
    lucbloom and Peter77 like this.
  14. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    I have the same exact issue on Addressables 1.19.13 the latest.
     
  15. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    SHOW STOPPER for all of us!
    Works on all Unity employees machines, but fails on outside machines.
    To may recollection this was not there a month ago!
    Please note people are asking for the resolution.
    Also note that unity_shane might believe the bug was fixed and it is not!
    I tried CCN Addressables which works fine on iOS and in Editor but fails in Android on
    2021.2.0b15
    Addressables 1.19.13 the latest

    still fails.
    Logcat from Editor:

    2021-12-05 15:06:07.285 12902 12931 Error Unity RemoteProviderException : TextDataProvider : unable to load from url : jar:file:///data/app/com.CCNStudios.ConstructSearch-Vfqoi8Jn8e__HmquBQqZIw==/base.apk!/assets/aa/settings.json
    2021-12-05 15:06:07.285 12902 12931 Error Unity UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
    2021-12-05 15:06:07.285 12902 12931 Error Unity ResponseCode : 404, Method : GET
    2021-12-05 15:06:07.285 12902 12931 Error Unity url : jar:file:///data/app/com.CCNStudios.ConstructSearch-Vfqoi8Jn8e__HmquBQqZIw==/base.apk!/assets/aa/settings.json
    2021-12-05 15:06:07.364 12902 12931 Warn Unity Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].


    I can see where the problem is:
    1. When BUILDING Addressables in the Editor, there are two places where the build output(s) appear:
    i. com.unity.addressables/aa
    ii. ServerData
    the settings.json and the catalog.json appears in i and the rest of bundle and catalog info in ServerData
    A. This is a horrible design
    B. Prone to bugs, since /aa should be for the LOCAL operations and I believe that confusion is causing the bug
    C. There are multiple ways to create the correct output and each have slightly different look to them, and that is another issue.
    D. I have no idea why BUILD was made as as singleton insofar as the Addressables PROFILE, I think often Unity tries to JAM CRAM too much into a single UI on the Editor. Simple make 2 distinct UIs one for Local and one for CCD/remote.
     
    Last edited: Dec 5, 2021
  16. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    I was able to solve the /aa/settings.json problems, there are number of new bugs introduced by Unity. If need be I shall share the findings.

    CCD works perfectly delivering to Android mobiles, no errors at CCD side, but something in the standard API of Addressables is broken bad! I vividly recall all the code in question was working flawlessly until recently.

    It breaks sharp at LoadSceneAsync.

    I wrote to support and we need to solve this issue real quick, since it is a serious showstopper and we do not have any time to wait for another day even.

    I can offer a .apk+actual public CCD for support to review.

    The behaviour of BUILD for the Addressables groups on the Editor, has been altered and what it packs and sends to CCD also has altered.


    D
     
  17. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    106
    @darashayda Hi there, if you haven't already please submit a bug report with a simple repro project if you are able. Bug reports with repro projects are the best way for us to fix bugs quickly and effectively - while the forums are a great way for us to give support on small users issues with addressables, ultimately the best method to fix more significant issues like these is through submitting bug reports. I'm happy to hear that you were able to work around at least one part of your issue, and hopefully you will be able to work with QA to solve any other issues you might be having between now and when we are able to fix the issue you're running into now.
     
  18. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    SHANE THANK YOU!

    Please go to ticket number #1142238 which was posted by me and managed by Olivia.

    Not sure what else I need to submit where else. You find the screenshots and the actual CCD buckets.

    FROM THAT TICKET:
    1. We rebuilt the entire CCD Bucket in 2022.1.0a16
    2. Both the Desktop Android and the native Android builds failed. The error for the native Android is exactly the same.
    3. History: On 2021.1.0b15 Desktop Android worked and the native failed. This was not a happy results, WE WANTED BOTH FAIL THE SAME WAY

    Screen Shot 2021-12-06 at 11.08.00 PM.png Screen Shot 2021-12-06 at 11.04.30 PM.png


    Now they both fail. Which is good news in some ways.

    I can ship you the projects, to see what was done wrong?
     
  19. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Shane you are authorize to access all our accounts at Unity, if any issues I will contact a supervisor to clear you on that matter.

    We basically do not wish to waste any of our both times.
     
  20. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Hello Shane I forgot to mention that 2022.1.0a16 crashes on the desktop with Android platform without stack trace of any kind.
     
  21. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Shane the crashes for 2022.1.0a16 Editor occur:


    https://forum.unity.com/threads/cannot-open-project-on-2021-2-0f1-apple-silicon-editor-m1.1188772/

    Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
    QObject: Cannot create children for a parent that is in a different thread.
    (Parent is QObject(0x7f810b42a740), parent's thread is QThread(0x7f812b414cd0), current thread is Thread(0x7f812b7fd560)

    Which is a compression issue that was supposed to be fixed in 2022.1.0a14
     
  22. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Shane I was able to stack dump this application on 2022.1.0a16

    Following functions called:

    string path = "https://93c0b8cb-7da7-472b-b41b-808..._by_badge/latest/entry_by_path/content/?path=";

    //Append the catalog to the badge
    string catalog = "catalog_2021.12.06.07.33.20.json";


    AsyncOperationHandle<IResourceLocator> handle = Addressables.LoadContentCatalogAsync(path + catalog, true, null);


    Then

    Addressables.ClearDependencyCacheAsync(prefabKey);


    AsyncOperationHandle handle = Addressables.DownloadDependenciesAsync(prefabKey);


    All returned handle with success



    Below is the Player.Log excerpt, attached it as well


    Called this code
    public void loadscene()

    {
    string prefabKey = "Assets/search.unity";

    Debug.Log("Scene about to be loaded!");

    Addressables.LoadSceneAsync(prefabKey, LoadSceneMode.Single);
    Debug.Log("LoadSceneAsync called and exit");

    }

    That scene Assets/search.unity is in CCD, which was built in a separate project on
    1) 2022.1.0a16
    2) Build for Addressables was called in that Editor
    3) Android platform was set

    RPG1_Android Bucket called search

    https://93c0b8cb-7da7-472b-b41b-808...26565da6-3973-440c-bbd1-cdb966bcbd8c/content/

    Release
    https://93c0b8cb-7da7-472b-b41b-808..._by_badge/latest/entry_by_path/content/?path=

    0 ERRORS ON CCD, after 99 tries of this!!!

    Stack below complains about ALLOC_TEMP_UnityGfxDeviceWorker, only one ref on the internet:
    https://forum.unity.com/threads/il2cpp-causes-conflict-with-restream-obs.1160531/


    Unloading 6 Unused Serialized files (Serialized files now loaded: 3)
    Scanning for USB devices : 0.641ms
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker
    Calling Deallocate on pointer, that can not be deallocated by allocator ALLOC_TEMP_UnityGfxDeviceWorker

    =================================================================
    Native Crash Reporting
    =================================================================
    Got a bus while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    Native stacktrace:
    =================================================================
    0x16a36a8a2 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_dump_native_crash_info
    0x16a310baa - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_handle_native_crash
    0x16a28cf85 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_sigsegv_signal_handler_debug
    0x7fff204fbd7d - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x6e6e6f432f776f6c - Unknown
    0x7fff6dda40c3 - /System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver : _Z34BronzeGenerateMicroTileAddresses2DPK24BronzeCpuTexInterfaceRecPK21ATIMipmapBufferHeaderjjjjjjjPFvyjjjPvES5_
    0x7fff6dda4a9d - /System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver : _ZL34amdMtlBronzeTextureStdReplaceTilesPK24BronzeCpuTexInterfaceRecPK21ATIMipmapBufferHeaderPK18ati_si_format_infomjmmjjjjj
    0x7fff6dda45a5 - /System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver : _ZL34amdMtlBronzeTextureStdAccessRegionPK24BronzeCpuTexInterfaceRecPFvS1_PK21ATIMipmapBufferHeaderPK18ati_si_format_infomjmmjjjjjES9_S4_S7_mjmmjjjjj
    0x7fff6dda492f - /System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver : _Z35amdMtlBronzeTextureStdReplaceRegionPK24BronzeCpuTexInterfaceRecPK21ATIMipmapBufferHeaderPK18ati_si_format_infoPvjmmjjjjj
    0x7fff6de24b00 - /System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver : -[BronzeMtlTexture replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:]
    Scanning for USB devices : 0.627ms
    0x10eb2e854 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZL17UploadTextureDataR22TextureCreateDataMetal
    0x10c8491f5 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _Z29CopyToTextureMemory2DThreadedP17TextureCreateDataR19TextureUploadMemory
    0x10c7c07ec - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZL20DoCopyTextureDataJobP24TextureUploadInstruction
    0x10c94fa5d - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN8JobQueue4ExecEP7JobInfoxib
    0x10c94fff5 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN8JobQueue5StealEP8JobGroupP7JobInfoxibb
    0x10c9500e5 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN8JobQueue19ExecuteJobFromQueueEb
    0x10c9503ba - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN8JobQueue11ProcessJobsEPNS_10ThreadInfoEPv
    0x10c94edc3 - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN8JobQueue8WorkLoopEPv
    0x10cb8fbcb - /Applications/Unity/Hub/Editor/2022.1.0a16/Unity.app/Contents/MacOS/Unity : _ZN6Thread16RunThreadWrapperEPv
    0x7fff204b68fc - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
    0x7fff204b2443 - /usr/lib/system/libsystem_pthread.dylib : thread_start

    =================================================================
    Telemetry Dumper:
    =================================================================
    Thread 0x70000456d000 may have been prematurely finalized* Assertion at mono-threads.c:702, condition `info' not met, function:mono_thread_info_current,
    Obtained 0 stack frames.
    Launching bug reporter
    AcceleratorClientConnectionCallback - disconnected - :0
    Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
    QObject: Cannot create children for a parent that is in a different thread.
    (Parent is QObject(0x7fd83dc53aa0), parent's thread is QThread(0x7fd83de05640), current thread is Thread(0x7fd83dee15e0)
     

    Attached Files:

  23. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    106
    @darashayda Hi there, me and the team looked at your issue and we have a couple of suggestions.

    1. Would it be possible for you to double check the issue number you provided in your post earlier? The issue number you provided (#1142238) doesn't lead to anything for me.

    2. The 404 error that comes up in this post seems to suggest that the file that you're trying to access doesn't exist within the APK you're using - if you've rebuilt addressables without also rebuilding the APK, this could be the source of your issue. I would recommend taking a look at the specific APK giving you issues and make sure that any local files that are giving you errors actually exist within the APK before going any further. The reason why checking inside the APK is important despite the fact that it says that it's a 404 error is because android will often use web requests and urls for local files, making it seem like a CCD error when it may not necessarily be one.

    3. Another possibility is that if you're building addressables on one project (project A), and building the player on another project (project B), then its possible that the error you're encountering could be because since project B didn't have addressables built with it it has no settings.json file - this is worth looking out for. If this is the case, you have two main options.
    If project B has no Addressables content itself and gets all of it from the addressables project, you should include the entirety of your Library/com.unity.addressables folder from project A in project B so that it can access all of the addressables data needed to run the project.

    if project B also has Addressables data and you're using LoadContentCatalogAsync to use different projects' catalogs, then you should copy the link.xml file from each of the other addressables projects into project B to ensure that the player knows what data to not strip away. Alternatively, you could just disable code stripping all together to avoid this problem.
     
  24. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    on Item 3:

    I built the Addressable , a null group. And this is the correct way and worked well 2020 and 2021.

    We cannot copy any actual files from Project A to Project B i.e. the player, since we are circulating through large number of Addressable scenes which often share nothing between themselves.

    So copy such local files then defeats the purpose of CCD and Addressables all together.

    Before we go forward, I need to make sure we are talking about the same thing, since these local file copying is a huge setback for our entire strategic plan!

    D
     
  25. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    I 100% agree on this one, I noted that the reported error messages are Android messages not Unity.

    I deal with your responses seriously this evening and report back
     
  26. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Project A is a normal Unity project. Except one of its scenes is selected as Addressable.

    Project B is a copy of Project A except all the CONTEN e.g. player geometry or weapons and so on which were in the scene were removed!

    However Project B has all the original directory structure and all the animators and UI and scripts are included.

    This is correct usage of Addressable per documentation and our previous versions.

    For example we have multiple entire scene content loaded into a single scene in Project B, all read by Adrdessables and CCD over the net. And it worked!

    So we could have TB of content in CCD, and have a tiny Android project of less than 100MB! that can serve all the content without local file copying.

    If I copy all the files that were in Project B into Project A, then the entire purpose of CCD and Addressables is defeated.

    Dara
     
  27. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Shane one other fact: The Project B is intermittent! It does not always crash! So the theory that some files are not properly copied might not explain it all, there are other factors.

    I am noticing for a while that LoadSceneAsync () does not fully works as specified. It does not delete the previous scene and does not clean up the residual related variables.

    As a result a race condition or corruption might occur.

    This I know because I place delays in the code and the Project B behaves drastically different in those regards.

    I will try to build a particular project for your perusal to see for yourself.
    Dara
     
  28. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    EXPERIMENTAL WORKAROUND MIGHT NEED MORE TESTING.

    Hello Shane I think I located the problem with an operational workaround:

    See @xwin28 post in this thread.

    1. SOURCE: Choose a game on Android platform in Unity 2022.1.0a16, then select a scene or bunch of assets and turn them into Addressables.

    2. Build group with local build path any directory under Assets directory, and it is called Assets/aa by default.

    3. Go to CCD and make a bucket ONLY FOR ANDROID use, and then copy the Assets/aa to that ccd bucket.You can place the latter anywhere else.

    4. TARGET: Copy the Unity project into a new clone project, call it different name

    WARNING: DO NOT COMBINE SOURCE AND TARGET INTO ONE PROJECT.

    5. Create an empty Asset group, Build it once only. There might be another way of doing this, but it works.

    6. Delete, in TARGET directories, only the corresponding content related to SOURCE Addressables e.g. prefabs for characters or related textures or weapons and so on, MAKE SURE NOT TO DELETE ANY DIRECTORIES and make sure NOT TO DELETE ANY SCRIPTS OR ANIMATORS ...

    This deleting will reduce the size of the binary and reduces confusions at Addressable Groups.

    7. DO NOT RUN THE EDITOR AT ALL, MAKE SURE EDITOR IS FRESHLY STARTED

    8. ONLY BUILD or Build and RUN while connected to an Android box!!!! <--- If you Run the Editor prior to this step, it does not work! And intermittently causes crash, hang on the Editor with the odd /aa error messages on Android box!!!

    9. If need be , exit Editor and start a fresh Editor for TARGET and make the final BUILD.

    As @xwin28 if you play the Editor then THERE IS A CORRUPTION found in BUILD!

    This corruption sporadically occurred in other versions but I always attributed that to being too sleep :) But it is real.

    If the Editor in TARGET ran even once, there will be corruption in Asset Groups.
     
    Last edited: Dec 9, 2021
    joanpescador likes this.
  29. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Hello Shane

    FYI, the above anomaly, maybe not a bug so to say, still requires handling at your ends.

    I was able to find a workaround and reproduce the problem.

    I truly suggest you take @xwin28 comments seriously, we are seeing some strange Unwanted Residual States in Addressables and possibly CCD.

    And the errors we reported in log files are odd! And as you indicated they are not even Unity errors, they are Android errors caused by some unwanted configuration at the Build process. <-- Conjecture.

    We count on your help.

    Dara
     
  30. unity_shane

    unity_shane

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    106
    @darashayda

    I spoke with the team a bit more about recommended ways to set up the project for your use case and one of my team members gave this advice:

    "In Project B (Content project)
    1. Target build location for the Groups outside of the Library folder location for managed internal data from Addressables.
    2. Setup a Remote catalog, in the Addressables settings. With this also set to the groups locations / ccd load and custom build path.
    3. Upload the Bundles and remote catalog (.json and .hash)

    In Project A (Player project)
    1. Ensure all Scripts are included in this project - this is important as otherwise the player will not be able to reference the scripts necessary to run the project
    2. We need the Player to know where to load the content from.
    2a. Initialise Addressables into the project and setup the AddressableAssetSettings the same as Project B
    2b. We now need to make a Addressables build in order to generate settings.json which these settings for the runtime.
    3. Disable code stripping so that none of the scripts are stripped from the Player (as the build sees that they are not used)
    4. Build Player

    Alternative to 2:
    2a. Copy settings.json and link.xml from Project B to Project A. This gives project A the information about where to find data from Project B and what was used.

    These two files need to be included when doing the Player build in order to make sure that the Player can correctly identify where to get information about Assets from Project B:
    settings.json - Contains information about where to get the catalog of from. And what settings are setting from AddressableAssetSettings.
    link.xml - Tells the Player build what scripts not to strip. Because the Player does not include content set in Addressable, it does not know if the code for it should be stripped out or not. "

    This business with entering play mode causing an issue with Android sounds concerning and I believe is worth getting into. If you could please send a bug report to QA with a simple project we can use to reliably recreate the issue we would be more than happy to take a look into it.

    I highly recommend that any further issues you encounter, particularly issues that you believe to be bugs, you send in bug reports to QA as opposed to posting on the forums. While posting on the forums is an excellent way to get fixes to small issues or advice on certain things, the platform is simply not intended for long term, involved debugging conversations such as these. The entire team wants to help, and we take the concerns you've raised very seriously. Hopefully this explanation gives some useful guidance.

    I hope that this correspondence has helped you gain a better understanding of your issue and that the combined insights of all of these posts will help you solve your issue. Once your bug report(s) make it through QA, the team will be sure to take a look at them and fix any issues we're able to identify in future versions. Thank you.
     
  31. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Hello Shane
    Thank you for your professional assessment and aid in this matter.

    I shall work on the bug report, I just do not like to file bogus bugs to clutter your systems. So please be patient with the introductory communications.

    ALTERNATIVE 2 defeats the purposes of Addressables and CCD for our organization.

    The preceding for both A and B are 100% what we already put in place and THEY WORK!

    So this is the plan per your guidance:

    1. Create a simple small enough testbed
    2. File a bug report ON PLAY MODE anomaly

    We will take care of all this in coming 12 hours and thank you.

    Dara
     
    Last edited: Dec 9, 2021
  32. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Hello Shane

    Working on releasing some samples. Demo bug in actual projects + videos for the support. This particular bug is now found all over 2021 and 2022, at least on our mac machines.

    BUT good news is, if we avoid running the games in the Editor and instead do BUILD&RUN ... no issue per LogCat, the minute the game runs once in the Editor horror ensues :)

    Need a bit more time.

    Dara
     
  33. akasabutski

    akasabutski

    Joined:
    Nov 7, 2018
    Posts:
    12

    Thank you, xwin28, I don't use any clouds, but had this issue. Your info helped workaround the issue (restart unity, do not play in the editor, rebuild addressable, build and run on Android).
     
    xwin28 likes this.
  34. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    Shane

    This particular bug occurs, in a very small unrelated to CCD and Addressables with the crash dump:

    QObject: Cannot create children for a parent that is in a different thread.

    (Parent is QObject(0x7fddb867f5c0), parent's thread is QThread(0x7fddb8607500), current thread is Thread(0x7fddb878f870)

    So our CCD and Addressables are aggravating another fundamental bug some totally unrelated place.

    Almost ready to submit the bug with actual collected data and so on.

    D
     
  35. KwahuNashoba

    KwahuNashoba

    Joined:
    Mar 30, 2015
    Posts:
    110
    Just to drop my issue and solution to it, it might help some other addressables wonderer :)

    I also had an issue with loading settings.json file noted in the original post. The reason for it was that we are exporting android project and then performing build from Android Studio (apk + obb) and then deploying manually on the phone. I believe that settings.json ends up in the the .obb (since it gets copied in StreamingAssets during Player build) and that is why it had trouble loading it. In order to make the work, the following steps should be respected:
    1. Connect the phone to PC
    2. Copy .apk
    3. Install .apk and launch the game (not sure if launching is mandatory)
    4. During install the folder will be created in [your phone]\Internal shared storage\Android\obb\[bundle id]. This folder is recreated each time you install the apk so you'll need to copy it each time you reinstall apk
    5. Find your .obb created by Android Studio and rename it to main.[build version].[bundle id].obb
    6. Copy it to the folder from step 4.
    7. Launch the game and it should work
     
    won-gyu and RyanC_Joy like this.
  36. userq

    userq

    Joined:
    Jun 4, 2017
    Posts:
    40
    This error still happens in Unity 2021.3.1f1, Addressables 1.19.19. I am not using Unity Cloud.

    Steps:
    Build addressables (Play Asset Delivery)
    Build Android Project
    Upload to google play console
    Install on device
    Open the game

    Has this issue been already solved? I tried everything that was mentioned above, except the unity cloud solutions and nothing helped. This error still persists. I am about to drop addressables already, it is a big showstopper.

    However, I somehow made it work just for one time, but I am not sure how - I was using the Unity samples (https://github.com/Unity-Technologies/Addressables-Sample) to build my project just for a try if it will work from there and for some reason it worked, the error was gone, but that project uses windows platform. But now after some times again, the error is still there.

     
    stroibot likes this.
  37. stroibot

    stroibot

    Joined:
    Feb 15, 2017
    Posts:
    91
    Last edited: May 16, 2022
    won-gyu and userq like this.
  38. userq

    userq

    Joined:
    Jun 4, 2017
    Posts:
    40
  39. won-gyu

    won-gyu

    Joined:
    Mar 23, 2018
    Posts:
    33
    Thanks, KwahuNashoba.

    For someone who copies .apk and pastes on your connected phone, see KwahuNashoba's post.
    I didn't even know what .obb file was, which caused this error in my case.
    You can try his solution or my workaround which was to uncheck "Split Application Binary" (https://docs.unity3d.com/2018.4/Documentation/Manual/android-OBBsupport.html) under Publishing Settings so that I can install an app without .obb file.

    I hope that it logs in android something like "You better check obb file" to clarify the issue.
     
    Last edited: May 25, 2022
  40. SkiefORG

    SkiefORG

    Joined:
    Dec 20, 2021
    Posts:
    2
    jbabic likes this.
  41. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,588
    Unfortunately it continues to be an issue. We no longer use any remote functionality from Addressables, everything is bundled with the app. However, on Android some players (around 250 each month) continue to get this error and the game doesn't start in this case:
    Code (CSharp):
    1. RemoteProviderException: TextDataProvider :
    2. unable to load from url :
    3. jar:file:///data/app/com.companyname.productname-Ror-4rjfK_TfMis4oZpd1w==/base.apk!/assets/aa/settings.json
    Where "com.companyname.productname" represents the bundle identifier.

    The game is using Addressables 1.19.6 and Unity 2019.4.35f1. The problem seems to occur on Android only. I'm unable to reproduce the issue. All I see is angry players leaving 1 star reviews complaining that the game doesn't start and these errors logged in Unity Cloud Diagnostics.

    Here's a list of a view devices, according to Cloud Diagnostics, where this issue occurred:
    Code (CSharp):
    1. HUAWEI/PPA-LX1/HWPPA-H
    2. HUAWEI/AGRK-W09/HWAGRK
    3. HUAWEI/AGS3K-L09/HWAGS3K
    4. Sony/XQ-AD52/XQ-AD52
    5. Xiaomi/Redmi Note 9S/curtana
    6. HUAWEI/JNY-LX1/HWJNY
    7. HUAWEI/AUM-L41/HWAUM-Q
    8. HUAWEI/PPA-LX2/HWPPA-H
    9. HUAWEI/STK-LX3/HWSTK-HF
    10. samsung/SM-A125F/a12
    11. HUAWEI/ART-L29/HWART-H
    What can I do fix this issue?
     
    Last edited: Aug 22, 2022
  42. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    291
    I can confirm that I also encounter this issue. Only a small portion of Android players encountered this, it doesn't occur on iOS. In this case, no catalog is successfully loaded, no remote catalog nor local catalog. And the players just cannot download anything and print out a lot of InvalidKeyExceptions. Addressables puts the setting.json and catalog.json into a StreamingAssets folder, they have to use UnityWebRequest to load them on Android. Maybe we should try to search whether if anyone has encounters issues related to using UnityWebRequest to load streaming assets on Android.

    I am using Unity 2019.4.22f1 and Addressables 1.16.19.

    I won't wait for the official reply this time. If there is no catalog being successfully loaded, I can obtain this information through Addressables.ResourceLocators, it should have zero elements. I could call Addressables' API again and again. If this doesn't help, I might have to write my own TextDataProvider.
     
    Last edited: Aug 22, 2022
  43. JonBFS

    JonBFS

    Joined:
    Feb 25, 2019
    Posts:
    39
    Stumbled across this same issue. Able to successfully load Addressables if I don't split the build and bundle *everything* into an APK, however this is not realistic.
     
  44. hxgwxy

    hxgwxy

    Joined:
    May 30, 2021
    Posts:
    1
    This problem occurs when you build the bundle, run the editor, and then build apk
     
  45. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    248
    The error message is quite misleading but what it essentially means is: "No addressable content found". This can have many different reasons:
    • The addressable build fails with an exception (see console) - for some unfortunate reason the build still continues without addressables included
    • You chose the wrong profile (iOS instead of android) for addressables - thus the bundles are built for the wrong platform
    • You did not build the addressables at all
    I think the Addressable Team should seriously look into their package and improve all errors and exception messages during runtime and also during build time. Generally at some point in the future (sooner than later) I would hope the Addressable Package to be up-to-bar with the Resources.Load System in terms of build-time and run-time features and feedback to the developers.
     
    Mischief_Cody likes this.
  46. Scarletor

    Scarletor

    Joined:
    Sep 24, 2016
    Posts:
    6
    im dealing with this issue
    how the hell 3 years past but it still occurs?
     
  47. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    440
    @Scarletor you need to rely on latest versions of Unity releases and non-Unity forums and discussion groups. Most of such answers are not found here nor in any official Unity docs.

    Best experiment with newest builds, as in our case were able get rid of a lot these anomalies by relying on their new releases.
    No point to bring it up to Unity management.
     
  48. darker89

    darker89

    Joined:
    Jul 15, 2015
    Posts:
    5
    I think, I found a solution.

    We got this error.
    RemoteProviderException : TextDataProvider : unable to load from url : https://www.****.com/StreamingAssets/aa/settings.json
    UnityWebRequest result : ConnectionError : Unknown Error
    ResponseCode : 500, Method : GET
    url : https://www.***.com/StreamingAssets/aa/settings.json


    The issue is not related to Addressables class. This error is generated by the UnityWebRequest class. If I try to fetch the link of the relevant JSON file myself using the UnityWebRequest class, I still get the 'ConnectionError: Unknown Error' message. When I read through the decompiled version of the UnityWebRequest class, I noticed that it uses unsafe code.

    Therefore, I enabled the 'Allow unsafe Code' option from the Player Settings. And my problem was resolved.
     
    dhanrajsinh24 likes this.
  49. dhanrajsinh24

    dhanrajsinh24

    Joined:
    May 8, 2014
    Posts:
    59
    This worked for me! thanks!
     
  50. RambosRide

    RambosRide

    Joined:
    Nov 8, 2020
    Posts:
    37
    While it may work... 'Allow unsafe Code' is an unacceptable answer imo. Still looking for a reason...