Error500 when opening unsupported content

Found in

EPiServer.GoogleAnalytics 2.0.1

Fixed in

EPiServer.GoogleAnalytics 2.1.1

Created

Mar 22, 2018

Updated

Apr 09, 2018

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Install GA on a site.
2. Add a GA gadget in Edit View.
3. Sign in with a GA account.
4. Collapse the gadget.
5. Log out then log in to the site.
6. Select unsupported content.

Actual: GA gadget is blank and Error500
Server Error in '/' Application.
Value cannot be null.
Parameter name: uriString
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: uriString

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: uriString]
System.Uri..ctor(String uriString, UriKind uriKind) +6863961
EPiServer.GoogleAnalytics.Controllers.Controllers.ControllerBase.ApplySegment(Limit range, IStatisticsSettings settings, ContentReference contentLink, Boolean includeSegment) +116
EPiServer.GoogleAnalytics.Controllers.Controllers.ControllerBase.PageSummaryView(AnalyticsRequestContext requestContext) +254
lambda_method(Closure , ControllerBase , Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.<>c_DisplayClass15.<InvokeActionMethodWithFilters>b_12() +55
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
System.Web.Mvc.<>c_DisplayClass17.<InvokeActionMethodWithFilters>b_14() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
System.Web.Mvc.<>c_DisplayClass17.<InvokeActionMethodWithFilters>b_14() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
System.Web.Mvc.<>c_DisplayClass17.<InvokeActionMethodWithFilters>b_14() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +189
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +521
System.Web.Mvc.Controller.ExecuteCore() +95
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +180
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller) +40
EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +24
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0