When i load several sprite assets from folder on Addressables 1.4.0 i have InvalidKeyException error. There is no error on Addressables 1.3.8 or with text assets.
definitely sounds like a bug, weāll look into it.
I just updated to 1.4.0 from 1.1.10 today and ran into this.
I was about to report it in the bug reporting tool but the tool showed this thread as possibly the same issue, so Iāll comment here instead.
I think it is the same issue, but I will provide some additional explanation and findings.
For an example project, here is my Addressables Groups.
Here is my scene:

My āSpriteā GameObject has this script attached to it:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
public class Test : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
LoadSprite();
}
async void LoadSprite()
{
var sprite = await Addressables.LoadAssetAsync<Sprite>("Assets/MyAssets/Textures/UnityLogo.png").Task;
this.GetComponent<SpriteRenderer>().sprite = sprite;
}
}
Results when run:
- For Simulate Groups (advanced): Works fine.
- For Use Existing Build (requires built groups): After building it works fine.
- For Use Asset Database (faster):
Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.Sprite], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Assets/MyAssets/Textures/UnityLogo.png
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:<.ctor>b__27_0(AsyncOperationHandle)
DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.4.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.AddressableAssets.Initialization.<>c__DisplayClass13_0:<LoadContentCatalogInternal>b__0(AsyncOperationHandle`1)
DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.4.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.ChainOperation`2:OnWrappedCompleted(AsyncOperationHandle`1)
DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.4.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.ResourceManager:Update(Single)
MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.4.0/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)
Current workaround is to use Simulate Groups for development for now ⦠which makes development slower because the āCalculate Asset Dependenciesā step.
I also confirmed that version 1.3.8 doesnāt have this issue.
hmm⦠interesting. Thanks for the info. Iām going to try and track down what might have changed between 1.3.8 and 1.4.0
Has this been fixed in 1.5.0??
This should be high priority as for anyone who adds folders as Addressables will not be able to work with Fast play mode!
I guess this is the same issue I just posted here Folder in addressables not working?
It was definitely not fixed in 1.6.0 either ![]()
it still happens on 1.7.4
took me a lot of time to understand the problem after updating addressables from an older version.
as it wasnāt fixed for so long, can we assume itās not a bug and we are not supposed to use folders with sprite assets as addressables?
does any one recommend another method? I donāt want to create a sprite atlas for my current case as none of the sprites will show up together and I donāt want to load the whole sprite atlas into the memory
It is very much a bug, and the Unity guys themselves have admitted to it. They just havenāt fixed itā¦
But hopefully very soon.
Fast Play Mode with addressable folders is practically a core feature required for quick development if you use addressable folders.
And I believe making folders addressable rather than adding assets one by one is a best practice too cause with Addressable bugs, sometimes some Addressables will vanish and it will be hard to detect if you have too many Addressable entries. Also it allows you to easily use file path as Addressable key.
I think the main reason Unity are so slow at fixing somewhat critical bugs like this is they donāt actually use Unity to develop games, so they donāt really understand developerās pain. And I assume most of us are paying customers, so it is somewhat aggravating to see a bug like this being unfixed for almost 4 months now.
You can go back to 1.3.8 or:
KB73 recommended this workaround:
https://forum.unity.com/threads/addressables-1-4-0-bug.791342/#post-5611261
You have to fix Addressables code yourself here (from rg_johnokane):
https://forum.unity.com/threads/addressables-1-4-0-bug.791342/#post-5421225
ie. someone fixed Addressableās code for them since 2 months ago but they still havenāt put it in a release ⦠and yeah it might be a āhackā but Fast Play Mode is just for development so put in temporary fix is better than nothing.
I havenāt done that yet and still using 1.3.8 as it is still working ok for me and I donāt want to pollute my git history with the whole addressables source code.
Nearer my gameās release if it is still not fixed then I will have to do it.
Hey all, we actually fixed an issue with location generation (that was manifesting in folders) in Fast Mode/Use Asset Database mode in 1.7.4 (but use 1.7.5 as 1.7.4 introduced a bug with unknown types in a Resources folder). @cemleme youāre saying you still saw the same invalid key issue in 1.7.4?
hello @davidla_unity
yes I confirm i had the invalid key in 1.7.4. then I got back to 1.3.8 and it is working great
now just for testing, I updated it to 1.7.5
and this is the error I receive:
Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.Sprite], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=DetailedIcons/Nozzle.png, Type=UnityEngine.Sprite
UnityEngine.AddressableAssets.Addressables:LoadAssetAsync(Object)
as I said this is after simply upgrading the addressables, without changing anything else
also tried rebuilding the addressables and the result is same
Iām running into the same issue at the moment.
Iāve got a AssetReferenceSprite which its asset is under a folder that is in a bundle group.
Loading it will cause it to throw an invalid key exception.
Using 1.7.5 on Unity 2019.3.7
These sprites that youāre trying to load, are they part of a SpriteAtlas?
no they are not. when we load the spriteatlas it works (I have both of the cases in my project)
David, this problem is easily reproducible using the project files I attached in the post above (4 months ago):
https://discussions.unity.com/t/767646/3
No need to ask us for more details. Just download that and run it using Play Mode Script āUse Asset Database (faster)ā.
Using Addressables 1.3.8 it runs fine. Using Addressables 1.7.5 it gives an InvalidKeyException.
Thus we are stuck with 1.3.8 for months now.
Still getting InvalidKeyException from 1.16 and above. 1.15 works fine
The only way to solve this problem for me was to enable āForce Unique Providerā for all of my groups and enable āSimulate addressables groupsā. Use Asset Database mode is completely broken for me.
