Search Unity

Unable to load addressable assets per HTTPS

Discussion in 'Addressables' started by MNNoxMortem, Jan 22, 2019.

  1. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Any ideas what this exactly means and how to solve it. The path is valid and I am able to download it manually.
    ```
    Laden von gemischten aktiven Inhalten "<path>/catalog_2019.01.21.19.30.02.hash" wurde blockiert.[Weitere Informationen]
    ```
     
  2. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Update: Reason was likely a request via http when it the WebGL player was served via https. Protocol relative url // or https:// should both work.
     
  3. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Updated the title to reflect the issue. It looks like unity is unable to request the resources per https. We are able to download the file via browser by entering the url with http as well as https but from a webgl build or unity3d playmode packed it fails.

    Loading with a local project from the file system also works.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Could you paste the actual URL you are downloading and the URL you are currently on? On WebGL there are limitations to what URLs apps are allowed to download.
     
  5. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @Aurimas-Cernius Thank you for pointing it out. After double and triple checking I've found the difference.

    While on our test-server everything worked in production it suddenly failed. The difference was minor: https://www.<hostname> vs https://<hostname>. This was no problem during both unit tests (StandaloneWindows64 UnityTest with UnityWebRequest) and our test server (WebGL) but failed horribly on production. I assume it is because the request was blocked by CORS and settings of both servers might have differed.
     
    Last edited: Jan 24, 2019