Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0] [wasm][debugger] Support create, debugging and running wasmbrowser template from VS #76113

Merged
merged 10 commits into from
Sep 28, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 24, 2022

Backport of #75986 to release/7.0

/cc @lewing @thaystg

Customer Impact

On 7.0, we created a new template to create a wasm browser app without using blazor, and it was not possible to run and debug it from VS, this backport fixes it.

Testing

Manually tested.

Risk

Low risk, only changing the way to start up the new template.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@carlossanlop
Copy link
Member

@thaystg please fill out the template, add the servicing-consider label, and send the email to Tactics requesting approval.

@thaystg thaystg added this to the 7.0.0 milestone Sep 26, 2022
@thaystg thaystg added the Servicing-consider Issue for next servicing release review label Sep 26, 2022
@carlossanlop
Copy link
Member

This was approved by Tactics via email.

@thaystg can you please resolve the merge conflict?

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 26, 2022
@carlossanlop
Copy link
Member

@radical
Copy link
Member

radical commented Sep 27, 2022

Looking at the failures now.

@radical
Copy link
Member

radical commented Sep 27, 2022

The json is malformed. I'll fix.

      [] Error: Failed to load template from /datadisks/disk1/work/C9390AE6/w/AAE00933/e/dotnet-net7/template-packs/microsoft.net.runtime.webassembly.templates.7.0.0-ci.nupkg(/content/templates/browser/.template.config/template.json).
      [] Details: Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: ". Path 'symbols.kestrelHttpsPortGenerated.replaces', line 36, position 4.
      []    at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
      []    at Newtonsoft.Json.JsonTextReader.Read()
      []    at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
      []    at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
      []    at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
      []    at Microsoft.TemplateEngine.JExtensions.ReadJObjectFromIFile(IFile file)
      []    at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectConfig..ctor(IEngineEnvironmentSettings settings, IGenerator generator, IFile templateFile, IFile hostConfigFile, IFile localeConfigFile, String baselineName)
      []    at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectGenerator.Microsoft.TemplateEngine.Abstractions.IGenerator.GetTemplatesAndLangpacksFromDir(IMountPoint source, IList`1& localizations)
      [] No templates or subcommands found matching: 'wasmbrowser'.

.. template.json . Fixes:
```
     [] Error: Failed to load template from /datadisks/disk1/work/C9390AE6/w/AAE00933/e/dotnet-net7/template-packs/microsoft.net.runtime.webassembly.templates.7.0.0-ci.nupkg(/content/templates/browser/.template.config/template.json).
      [] Details: Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: ". Path 'symbols.kestrelHttpsPortGenerated.replaces', line 36, position 4.
      []    at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
      []    at Newtonsoft.Json.JsonTextReader.Read()
      []    at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
      []    at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
      []    at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
      []    at Microsoft.TemplateEngine.JExtensions.ReadJObjectFromIFile(IFile file)
      []    at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectConfig..ctor(IEngineEnvironmentSettings settings, IGenerator generator, IFile templateFile, IFile hostConfigFile, IFile localeConfigFile, String baselineName)
      []    at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectGenerator.Microsoft.TemplateEngine.Abstractions.IGenerator.GetTemplatesAndLangpacksFromDir(IMountPoint source, IList`1& localizations)
```
@radical
Copy link
Member

radical commented Sep 27, 2022

It was a bad merge. Hopefully, it should be good now.

```
WasmAppHost --runtime-config /datadisks/disk1/work/99FC08A1/w/B6B509D6/e/browser_Debug_crvdkcbp.f3f/bin/Debug/net7.0/browser-wasm/AppBundle/browser_Debug_crvdkcbp.f3f.runtimeconfig.json --forward-console
Unhandled exception. System.InvalidOperationException: Dynamic port binding is not supported when binding to localhost. You must either bind to 127.0.0.1:0 or [::1]:0, or both.
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions..ctor(Int32 port)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.ParseAddress(String address, Boolean& https)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken)
   at Microsoft.WebAssembly.AppHost.WebServer.StartAsync(WebServerOptions options, ILogger logger, CancellationToken token)
   at Microsoft.WebAssembly.AppHost.BrowserHost.StartWebServerAsync(String appPath, Boolean forwardConsole, String[] urls, CancellationToken token)
   at Microsoft.WebAssembly.AppHost.BrowserHost.RunAsync(ILoggerFactory loggerFactory, CancellationToken token)
   at Microsoft.WebAssembly.AppHost.BrowserHost.InvokeAsync(CommonConfiguration commonArgs, ILoggerFactory loggerFactory, ILogger logger, CancellationToken token)
   at Microsoft.WebAssembly.AppHost.WasmAppHost.Main(String[] args)
   at Microsoft.WebAssembly.AppHost.WasmAppHost.<Main>(String[] args)
```
@radical
Copy link
Member

radical commented Sep 28, 2022

@carlossanlop good to go

@thaystg
Copy link
Member

thaystg commented Sep 28, 2022

Tested and it's working.

@lewing
Copy link
Member

lewing commented Sep 28, 2022

whoops 😬

Thanks for fixing up

@carlossanlop
Copy link
Member

Thanks for the fix @radical.
Approved by Tactics, signed off, and new CI run hit again the unrelated firefox known failure: #75018

Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 228edfc into release/7.0 Sep 28, 2022
@carlossanlop carlossanlop deleted the backport/pr-75986-to-release/7.0 branch September 28, 2022 20:12
@ghost ghost locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants