Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Addressables - UnityWebRequest ConnectionError : Malformed URL (IOS) - Unity 2022.1.0f1

Discussion in 'Addressables' started by Sologamer, May 24, 2022.

  1. Sologamer

    Sologamer

    Joined:
    Feb 15, 2013
    Posts:
    12
    Hi, I'm getting an error loading the local addressable assets, possibly remote addressables too, but the game doesn't even start.

    I'm just doing an Addressables.InitializeAsync (which succeeds), and then
    Addressables.LoadAssetAsync or assetReference.LoadAssetAsync

    This only happens on iOS platform. After inspecting the payloads content of the .ipa file, the file DOES exists.
    On the Android platform it is working as expected.
    In the Editor it works fine too, even with the Play Mode Script set to Simulate Groups or Use Exististing Build

    I'm using UCB for our automated builds, haven't tried building myself yet.

    This occurred after upgrading from Unity 2021.3.2f1 to 2022.1.0f1
    Tried the following things, but didn't work
    - Upgrading from Addressables 1.19.19 to 1.20.0. (1.19.19 worked fine on 2021.3.X builds)
    - Enable/Disable "Asset Bundle CRC"
    - Enable/Disable "Use UnityWebRequest for Local Asset Bundles"
    - Allow downloads over HTTP "Always Allowed / Not Allowed"


    The exception:
    Code (CSharp):
    1.  System.Exception: Dependency Exception ---> UnityEngine.ResourceManagement.Exceptions.OperationException: GroupOperation failed because one of its dependencies failed ---> UnityEngine.ResourceManagement.Exceptions.RemoteProviderException: RemoteProviderException : Unable to load asset bundle from : file:////var/containers/Bundle/Application/163FBCFA-C5DD-4615-8C94-7F5AF1EB5868/*App Game Name*.app/Data/Raw/aa/iOS/92b65e9b8b2492b47a63bb3444987431_unitybuiltinshaders_46dc4b9d65476455d9d3e76704368b23.bundle
    2. UnityWebRequest result : ConnectionError : Malformed URL
    3. url : file:////var/containers/Bundle/Application/163FBCFA-C5DD-4615-8C94-7F5AF1EB5868/*App Game Name*.app/Data/Raw/aa/iOS/92b65e9b8b2492b47a63bb3444987431_unitybuiltinshaders_46dc4b9d65476455d9d3e76704368b23.bundle
    I suspect that something is changed in 2022.1.X with handling URL for iOS platform, the 'malformed' url looks perfectly fine.
    Any clues on how to fix this issue?
     
  2. Sologamer

    Sologamer

    Joined:
    Feb 15, 2013
    Posts:
    12
    Just tested with 2022.1.1f1, same error still occurs only on iOS.
     
  3. Sologamer

    Sologamer

    Joined:
    Feb 15, 2013
    Posts:
    12
    Also tested on 2022.1.2f1, same error...
     
  4. Bunny23Rabbit

    Bunny23Rabbit

    Joined:
    Apr 18, 2017
    Posts:
    1
    Same at 2022.1.10f1.... And no mention about this in known issues! The problem have been there for a couple of months and you even didn't mention it in known issues? How so?
     
  5. egorovsa2

    egorovsa2

    Joined:
    Apr 14, 2019
    Posts:
    6
    Same at 2022.1.10f1 .
    I've just fixed this in Editor at least
    Just "file:///....." -> "file://..."

    so remove one "/"
    Did not check it on the real diveces
     
    Last edited: Jul 28, 2022
  6. Sologamer

    Sologamer

    Joined:
    Feb 15, 2013
    Posts:
    12
    Odd it may be another bug you're encountering,
    The case, what I had only happened to me on the iOS platform.
    Editor, Android, Windows platform seems to work fine.

    I've submitted a bug report, and the issue is confirmed by the Unity Team, so we just have to wait for a fix.
    It apparently happens if you (Player Settings->Player->Product Name) contains any space(s).

    So a temporary fix is to remove any spaces in your product name, which is kinda unacceptable if your product contains spaces.
     
  7. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
  8. sztaszov1

    sztaszov1

    Joined:
    Jun 19, 2018
    Posts:
    1
    Had the same issue as OP with the extra / in file:////

    for us on
    Unity: 2021.3.1f1
    Addressables: 1.19.19
    Target Platform: Linux & OSX.

    The same did not occur if the target platform was Windows or Android.

    The WebRequest override 'fix' suggested by @pillakirsten with a simple [request.url = request.url.Replace("file:////", "file:///");] worked.

    Still, no clue about why the //// for those platforms.o_O
     
    elaine_unity694 likes this.
  9. elaine_unity694

    elaine_unity694

    Joined:
    Oct 12, 2020
    Posts:
    26
  10. knall_frosch

    knall_frosch

    Joined:
    Feb 24, 2018
    Posts:
    5
    Hi,

    I was asking about a similar topic here:
    https://forum.unity.com/threads/addressables-not-loading-on-ios-device.805824/#post-9120865

    In the meantime I updated to Addressables 1.21.1. Also I have a Product Name without spaces.
    But I keep having the problem because the WebRequestOveride function is not even called and the addresses from the catalog are pointing to a non existent URI in my case. I need to read local files where the folder structure is determined at runtime. That is why I am dependent on the override function. On Android it works just fine. Any ideas?
    Thanks