microsoft / scalar

Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
MIT License
1.39k stars 63 forks source link

"Querying remote for config....Failed" with exception thrown #423

Closed derrickstolee closed 3 years ago

derrickstolee commented 4 years ago

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

The NullReferenceException is thrown probably due to a null serverScalarConfig here, which is provided from CloneVerb.DoClone() by way of ScalarVerb.QueryScalarConfig(). Somehow we are returning null there, and we should catch it during DoClone() instead of where we throw.

github-actions[bot] commented 3 years ago

Labeling this issue as stale. There has been no activity for 30 days. Remove stale label or comment or this issue will be closed in 7 days.