Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

MVC unit tests fail #87

Closed
upendras opened this issue Jun 1, 2015 · 2 comments
Closed

MVC unit tests fail #87

upendras opened this issue Jun 1, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@upendras
Copy link
Member

upendras commented Jun 1, 2015

We seem to be getting two exceptions from the ASP.Net pipeline with following stack:

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.Framework.Runtime.Common.DependencyInjection.ActivatorUtilities.<>c__DisplayClass4_0.b__0(IServiceProvider services)
at Microsoft.Framework.Runtime.Common.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider services, Type type)
at Microsoft.Framework.Runtime.CompilerServices.CreateService[T](IServiceProvider sp, IAssemblyLoadContext loadContext, TypeInformation typeInfo)
at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.b__5_1(TypeInformation typeInfo)
at System.Collections.Generic.DictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func2 factory)
at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.<>c__DisplayClass5_0.b__0(CacheContext ctx)
at Microsoft.Framework.Runtime.Caching.CacheExtensions.<>c__DisplayClass0_01.<Get>b__0(CacheContext ctx) at Microsoft.Framework.Runtime.Caching.Cache.CreateEntry(Object k, Func2 acquire)
at Microsoft.Framework.Runtime.Caching.Cache.<>c__DisplayClass5_0.b__0()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.Framework.Runtime.Caching.Cache.Get(Object key, Func2 factory)
at Microsoft.Framework.Runtime.Caching.CacheExtensions.Get[T](ICache cache, Object key, Func2 factory) at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.GetLibraryExport(ILibraryKey target) at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.<>c__DisplayClass2_0.<GetLibraryExport>b__0(ILibraryExportProvider r) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.GetLibraryExport(ILibraryKey target)
at Microsoft.Framework.Runtime.LibraryManager.GetLibraryExport(String name, String aspect)
at Microsoft.Framework.Runtime.LibraryManager.GetLibraryExport(String name)
at Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.GetApplicationReferences()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(RelativeFileInfo fileInfo, String compilationContent) at Microsoft.AspNet.Mvc.Razor.Compilation.RazorCompilationService.Compile(RelativeFileInfo file) at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.OnCacheMiss(RelativeFileInfo file, String normalizedPath, Func2 compile)
at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.GetOrAddCore(String relativePath, Func2 compile) at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.GetOrAdd(String relativePath, Func2 compile)
at Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String relativePath)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext context, String pageName, Boolean isPartial)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.GetRazorPageResult(ActionContext context, String pageName, Boolean isPartial)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName)
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean partial)
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName)
at Microsoft.AspNet.Mvc.ViewResult.d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__50.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.MvcRouteHandler.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.MvcRouteHandler.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Routing.Template.TemplateRoute.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.ApplicationInsights.AspNet.ExceptionTrackingMiddleware.d__4.MoveNext() in C:\GitHub-microsoft\ApplicationInsights-aspnet5\src\Microsoft.ApplicationInsights.AspNet\ExceptionTrackingMiddleware.cs:line 30

@upendras upendras self-assigned this Jun 1, 2015
@upendras upendras added the bug label Jun 1, 2015
@upendras
Copy link
Member Author

upendras commented Jun 3, 2015

Only happens from within VS, was tracked by aspnet/Hosting#287 , now moved to aspnet/Testing#117

@upendras upendras added this to the beta6 milestone Jun 15, 2015
@upendras
Copy link
Member Author

This has been fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant