aws/aws-lambda-dotnet

LambdaTestTool-v2 not working

Opened this issue · 5 comments

Describe the bug

Execution of dotnet lambda-test-tool start --lambda-emulator-port 5050 ends up with error:

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit '5GpH_LatpUk5Z0mssx_YTQgAyGMk3gf8yXzKBYPXu9E'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'wBGE7VD2jjZ-XNJde67LyJD3XtSbJcVnMuFf2A4NW6c'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'QEuQx30VY7IGHf5TTnoZ6TIbHqK8IbEFAxssU1SEv_8'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'gPz0gHjQZV_t4afAUl0zTXTlZzXGp6r8dDnz_flBEKQ'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'qFg-OB7_MajSMsqWn5OtNOovfs_jhp7arlaQlzd2bZo'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit '8MkiA7Qn5g8VPCLufdVJNIA5XpAH4vAVr6pTE042gT8'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'q2969htMiMhuONtn74v5IzN_Im64r7HUW9TeDZunPO0'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'sWil3vLMg_-8iZXizabndsLW5gw3NwVCOXFKKG77Ri0'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'CMLF7Pcrh5agIWlhKUQaCeNQ7fmKwFom2F74uoo2WB8'.
      Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
    at http://localhost:5050/_framework/blazor.web.js:1:537
    at Array.forEach (<anonymous>)
    at l.findFunction (http://localhost:5050/_framework/blazor.web.js:1:505)
    at b (http://localhost:5050/_framework/blazor.web.js:1:5248)
    at http://localhost:5050/_framework/blazor.web.js:1:3041
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (http://localhost:5050/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (http://localhost:5050/_framework/blazor.web.js:1:62730)
    at gn._processIncomingData (http://localhost:5050/_framework/blazor.web.js:1:60119)
    at connection.onreceive (http://localhost:5050/_framework/blazor.web.js:1:53760)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
         at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Image Image

Version: 0.11.0
Image

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

blazor page loads successfully

Current Behavior

assets of blazor page seem to be lost

Reproduction Steps

execution of dotnet lambda-test-tool start --lambda-emulator-port 5050

Possible Solution

No response

Additional Information/Context

Execution from source code works fine

AWS .NET SDK and/or Package version used

amazon.lambda.testtool 0.11.0

Targeted .NET Platform

net8.0

Operating System and version

win 11

@lkurzyniec I'm wondering if something has corrupted the install of the BlazorMonaco component we are using.

Can you navigate to the folder C:\Users\<user-id>\.dotnet\tools\.store\amazon.lambda.testtool\0.11.0\amazon.lambda.testtool\0.11.0\tools\net8.0\any\wwwroot\_content\BlazorMonaco and confirm it exists. Assuming it does right click on the lib folder and select properties. What I'm seeing is there should be 107 files totaling about 38 MB.

@normj I have even more - 247 files.

Image

My mistake I said the folder count instead of file count in my last post. I think I also had a dev version installed causing the discrepancy of 2 folders. I just uninstalled and installed and now I have the same as you. And I'm not having any issues running the tool after reinstalling the tool.

Image

In your browser can you open the developer tools and then refresh the page. I'm curious if any other files are showing a 404 and maybe for some reason the content root is getting set correctly in your environment.

This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@normj should I provide you anything more?

At the beginning, I thought it could a problem of browser and/or its extensions, but I see errors within console, so I assume it's something else.

As I mentioned above, when executed from source code after git clone, it works fine.