Here is a stack trace during a scalar clone operation:
Authenticating...Succeeded
Querying remote for config...Failed
Cannot clone @ E:\o3: System.NullReferenceException: Object reference not set to an instance of an object.
at Scalar.Common.Http.CacheServerResolver.TryResolveUrlFromRemote(String cacheServerName, ServerScalarConfig serverScalarConfig, CacheServerInfo& cacheServer, String& error) in E:\A\_work\14\s\Scalar.Common\Http\CacheServerResolver.cs:line 55
at Scalar.CommandLine.ScalarVerb.ResolveCacheServer(ITracer tracer, CacheServerInfo cacheServer, CacheServerResolver cacheServerResolver, ServerScalarConfig serverScalarConfig) in E:\A\_work\14\s\Scalar\CommandLine\ScalarVerb.cs:line 383
at Scalar.CommandLine.CloneVerb.DoClone(String fullEnlistmentRootPathParameter, String normalizedEnlistmentRootPath) in E:\A\_work\14\s\Scalar\CommandLine\CloneVerb.cs:line 237
at Scalar.CommandLine.CloneVerb.Execute() in E:\A\_work\14\s\Scalar\CommandLine\CloneVerb.cs:line 133
Here is a stack trace during a
scalar clone
operation:The
NullReferenceException
is thrown probably due to a nullserverScalarConfig
here, which is provided fromCloneVerb.DoClone()
by way ofScalarVerb.QueryScalarConfig()
. Somehow we are returningnull
there, and we should catch it duringDoClone()
instead of where we throw.