Building addressables fails when scenes aren't in the default group

Weird one! Our project has a few addressable groups. We have a scene loaded as part of one of those groups. If the scene is in any group other than the default group, we get this error on building addressables:

Object reference not set to an instance of an object
at UnityEditor.AddressableAssets.Build.BuildPipelineTasks.GenerateLocationListsTask.GetBundleProviderName (UnityEditor.AddressableAssets.Settings.AddressableAssetGroup group) [0x00000] in```
followed by
```SBP ErrorException
UnityEditor.GenericMenu:CatchMenu(Object, String[ ], Int32) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:119)```

Has anyone else seen this?

EDIT:
I had it slightly wrong. It's actually if the group contains the Content Packing and Loading schema. Which it needs, so it's still a critical bug!

Anybody? This seems quite a critical bug, I’m surprised nobody else has posted it!

I haven’t seen this issue in my project, but I’m still using Addressables 1.10.

Thanks for letting me know! I tried 1.10 and found the same thing.

I’ve “fixed” it: the error occurred if my scene contained a mesh renderer with any material (including built in ones). I started testing by removing all the other gameobjects from my scene, and stripping all the assets/addressable groups from addressables (except an empty “default” group which I thought could do no harm, which in the end seemed to be related to the issue).

By fiddling around I found some “fixes”:

  • Fixed by marking the group containing the dodgy scene as “default”
  • Fixed by adding Content Packing & Loading to my default group, which didn’t have any Schemas attached (note that adding/removing other assets to this group made no difference).

I’ve “fixed” this by adding Content Packing & Loading to my default group. I can’t imagine what the connection between scenes containing materials (this may have been any referenced asset, but I’ve not tested further) and a group without a schema is, but if anybody else stumbles upon this issue, there it is.

Anyone from Unity able to chip in?

1 Like

I’ll flag this for the team to have a look!

So after discussing this with the team, they believe this issue was because you didn’t have that Content Packing and Loading schema on your group. What you did to fix it was just the thing to do. :slight_smile:

1 Like

Ran into this same issue and it looks like the Content packing and Loading schema is the fix. Would be nice to have a clearer error message on this to say what the issue was. Not sure why my default lost this schema in the first place and took me a while to figure out the fault

4 Likes

My problen is for default Content packing is corrugated for change version Adrrresable, solvet selection other how “set default”.

Hey, if that’s the case, could we maybe have like an actual, usable error log?

“SBP ErrorError” is no way to log an error, not for a public API, and certainly not for something as crucial as the build system.

3 Likes

I just ran into this on Unity 2022.3. The reason was that a setting changed somehow and my Build & Load Paths got misconfigured.

The fix was: Window -> Asset Management -> Addressables -> Groups. Then click on Packed Assets to bring up the settings in the inspector. Under the Content Packing & Loading, change Build Load & Paths to “Local” or whatever suits you.

Good grief…

2 Likes

For me it was to set the groups to Cannot change post release