Hello!
I just updated CCD from 2.1.0 to 2.2.1 (using Unity 2020.3.44f1) and the update appears to have broken the call to GetOrgAsync()
I call this on service ‘initialisation’ (in dev builds) to list the organisation like so…
CcdOrg organisation = await CcdManagement.Instance.GetOrgAsync();
But the call blocks execution and neither times out (even if using the new CcdManagement.SetTimeout() method) or returns.
I also call GetUserInfoAsync() like so…
CcdUser user = await CcdManagement.Instance.GetUserInfoAsync();
And this appears to work without issue.
Rolling back to 2.1.0 fixes the issue, so it’s definitely a change in 2.2.1
Ok, spent a few minutes debugging this and found the following in the WrappedCcdManagementService class…
GetOrgAsync makes this call…
var proj = (await TryCatchRequest(InternalGetOrgData, CcdManagement.projectid)).Result;
Which in-turn calls InternalGetOrgData which fails on this call…
var clientResponse = await _HttpClient.MakeRequestAsync(UnityWebRequest.kHttpVerbGET, url, null, headers, config.RequestTimeout.Value);
Url = https://services.unity.com/api/unity/v1/projects/
Headers = [Authorization, Bearer ]
RequestTimeout = 10
With an Http error (415)…
“HTTP/1.1 415 Unsupported Media Type”
The error is thrown then handled in TryCatchRequest here…
catch (HttpException he)
{
ResolveErrorWrapping((int)he.Response.StatusCode, he);
}
Then re-thrown here…
//Other general exception message handling
throw new CcdManagementException(code, exception.Message, exception);
And is then unhandled.
Further to that, Unity does not report this unhandled exception in the console as an error.
Hi @PeachyPixels
Thank you for reporting this issue, a fix is on the way in the version 2.2.2 that should be release soon.
1 Like
So it looks like the header (generated in SetConfigurationAuthHeader) is different between the two versions.
Not sure if this is the issue, but thought it worth reporting.
The json access token generated looks identical between the two versions though.
Thanks for resolving so promptly
Out of curiosity, was the issue as reported above or something else?
Yes the issue was like you pointed out
var clientResponse = await _HttpClient.MakeRequestAsync(UnityWebRequest.kHttpVerbGET, url, null, headers, config.RequestTimeout.Value);
MakeRequestAsync implementation changed to default to non multipart request which cause the issue with CCD.
1 Like
Hi @llunity3d
Just installed 2.2.2 and can confirm that the fix works.
Thanks for resolving this so promptly