401 Unauthorized when using Unity CCD (and addressables)

Using Unity 2022.3.36f1
Addressables 1.21.21
CCD Management 2.2.2 (Services Core 1.12.5)

When trying to update addressables to ccd or even when opening the project settings and navigating to the ccd panel I get the following 401 error.

This has happened before, when I had my profile set to automatic, settings it to a bucket by hand fixed it. But now this issue all of a sudden happens again.
At this point the Editor doesn’t even see my buckets any more, and trying to set the CCD config through setting just produces the error below.

HttpException: (401) HTTP/1.1 401 Unauthorized
Unity.Services.Ccd.Management.WrappedCcdManagementService.InternalGetOrgData (System.String projectId, Unity.Services.Ccd.Management.Configuration config) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:554)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request, System.Boolean doEnvironmentLookup) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:910)
Rethrow as CcdManagementException: (401) HTTP/1.1 401 Unauthorized
Unity.Services.Ccd.Management.WrappedCcdManagementService.ResolveErrorWrapping (System.Int32 reason, System.Exception exception) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:1008)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request, System.Boolean doEnvironmentLookup) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:922)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:884)
Unity.Services.Ccd.Management.WrappedCcdManagementService.GetOrgAsync () (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:513)
Unity.Services.Ccd.Management.CcdManagementSettingsProvider.RefreshDetailUI () (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Settings/CcdManagementSettingsProvider.cs:79)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <51fded79cd284d4d911c5949aff4cb21>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <f1e29a71158e46cdb750140a667aea01>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <f1e29a71158e46cdb750140a667aea01>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <f1e29a71158e46cdb750140a667aea01>:0)

Are there any know workarounds to this? Or is this a known bug?

Having the same issue with Unity 2021.3.36f, and Addressables 1.20.3
Before upgrading the software it actually worked.

I seem to be able to reliably mitigate the issue by doing these 1 or 2 things.

On both Windows and OSX on starting the editor, go to project settings and click the ccd tab, so it actually initializes and logs you in. Do this before touching anything addressable related.

On OSX (tested this on a Mac Mini M1), make sure you are on a wired network, it seems the wifi adapter in the Mini M1 is either too weak or too flaky to upload in time to get the job done as compared to the wifi adapter on my Omen 15 laptop. But this could be just my situation, seeing the sample size is basically 1.

I also make sure the profile is actually loaded correctly, as it seems to sometimes have quite a bit of lag or doesn’t seem to have been initialized. Sometimes I just have to re-pick the correct ‘latest’ bucket for it to recognize the proper platform and bucket.

1 Like

OK, was not totally accurate. I’m having this issue in WebGL private bucket, where I need an access token. I’m not using CCD Management.

It’s actually working now for me. It was a different mistake. There was a mismatch between the bucket and the token.