ampscript-core icon indicating copy to clipboard operation
ampscript-core copied to clipboard

If another AMPScript extension is installed, an error is received on run and debug.

Open ehrmanSFDC opened this issue 2 years ago • 1 comments

:red_circle:When running in Visual Studio Code, extensions causing this error may include but are not limited to:

  1. MCFS [AMPScript] by Agadzhanov Sergey

:green_circle:The error did not appear when using:

  1. AMPscript code snippet by MarketingThibs
  2. ampscript-language by xnerd
  3. AMPscript Beautifier by FiB

ampscriptcore_1

:information_source:Current workaround is to disable the extension, which is causing the issue.

ehrmanSFDC avatar Oct 06 '23 20:10 ehrmanSFDC

Hello,

I installed and ran the debug process, I got this instead of a website:

image

NullReferenceException: Object reference not set to an instance of an object. Sage.Engine.Runtime.RuntimeContext..ctor(IServiceProvider provider, CompilationOptions rootCompileOptions, SubscriberContext subscriberContext) in d:\dev\code\ampscript-core\src\Sage.Engine\Runtime\RuntimeContext.cs Sage.Engine.Renderer.Render(CompilationOptions compOptions, SubscriberContext context) in d:\dev\code\ampscript-core\src\Sage.Engine\Renderer.cs Sage.Engine.WebRequestRenderer.RenderContent(CompilationOptions inputOption) in d:\dev\code\ampscript-core\src\Sage.Webhost\WebRequestRenderer.cs Program+<>c__DisplayClass0_0.<<Main>$>b__0() in d:\dev\code\ampscript-core\src\Sage.Webhost\Program.cs lambda_method1(Closure , object , HttpContext ) Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Show raw exception details System.NullReferenceException: Object reference not set to an instance of an object. at Sage.Engine.Runtime.RuntimeContext..ctor(IServiceProvider provider, CompilationOptions rootCompileOptions, SubscriberContext subscriberContext) in d:\dev\code\ampscript-core\src\Sage.Engine\Runtime\RuntimeContext.cs:line 53 at Sage.Engine.Renderer.Render(CompilationOptions compOptions, SubscriberContext context) in d:\dev\code\ampscript-core\src\Sage.Engine\Renderer.cs:line 28 at Sage.Engine.WebRequestRenderer.RenderContent(CompilationOptions inputOption) in d:\dev\code\ampscript-core\src\Sage.Webhost\WebRequestRenderer.cs:line 36 at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in d:\dev\code\ampscript-core\src\Sage.Webhost\Program.cs:line 32 at lambda_method1(Closure, Object, HttpContext) at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

What are my next steps?

Cheers,

whouse04 avatar Oct 20 '23 10:10 whouse04