C# SDK build 1.81.200914
This occurs in `/Client/LoginWithCustomId` at the very least.
public static async Task<PlayFabResult<LoginResult>> LoginWithCustomIDAsync(...) { ... PlayFabApiSettings staticSettings = PlayFabSettings.staticSettings; if (request != null) request.TitleId = request?.TitleId ?? staticSettings.TitleId; if (request.TitleId == null) throw new PlayFabException(PlayFabExceptionCode.TitleNotSet, "TitleId must be set in your local or global settings to call this method"); object obj = await PlayFabHttp.DoPost("/Client/LoginWithCustomID", (PlayFabRequestCommon) request, (string) null, (string) null, extraHeaders, (PlayFabApiSettings) null); ... }
I've omitted a bunch of code, but this is in `PlayFabClientAPI.cs` around line 2655.
The function check if the TitleId is set in the request or in the static settings. So far so good.
However the `instanceSettings parameter is set to null in the `DoPost` call (last param). This make the actual `DoPost` crash because the function can't extract the titleId from the instanceSettings (it's null!) or the global `PlayFabSettings.staticSettings` (because I'm not, and (don't want to) setting it there).
In effect, setting the TitleId in the request is totally useless since it will never be used.
`DoPost()` only extract the full url before calling the internal `_DoPost` with the same params, so I will omit to include it. Here's the internal `_DoPost()` code where it's crashing
private static async Task<object> _DoPost( string fullPath, PlayFabRequestCommon request, string authType, string authKey, Dictionary<string, string> extraHeaders, PlayFabApiSettings instanceSettings = null) { if ((instanceSettings ?? PlayFabSettings.staticSettings).TitleId == null) throw new PlayFabException(PlayFabExceptionCode.TitleNotSet, "You must set your titleId before making an api call"); ITransportPlugin plugin = PluginManager.GetPlugin<ITransportPlugin>(PluginContract.PlayFab_Transport, ""); Dictionary<string, string> headers = new Dictionary<string, string>(); if (authType != null && authKey != null) headers[authType] = authKey; if (extraHeaders != null) { foreach (KeyValuePair<string, string> extraHeader in extraHeaders) headers.Add(extraHeader.Key, extraHeader.Value); } return await plugin.DoPost(fullPath, (object) request, headers); }
Instance setting is always null here, so it's throwing with a `TitleNoSet` exception.
I can provide more details if needed.
Thank you,