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

Blazor Wasm: published app broken #1408

Closed
pranavkm opened this issue Aug 4, 2020 · 13 comments
Closed

Blazor Wasm: published app broken #1408

pranavkm opened this issue Aug 4, 2020 · 13 comments

Comments

@pranavkm
Copy link

pranavkm commented Aug 4, 2020


Issue moved from dotnet/aspnetcore#24565


From @MarkStega on Tuesday, August 4, 2020 4:50:57 PM

Describe the bug

A Blazor wasm application that is published fails with an exception in a page that works when the application is run locally.

To Reproduce

The repository for this project is located at https://github.com/BlazorMdc/BlazorMdcWebsite

The broken published site is at https://blazormdc.com/ (navigate to "text field - special" in the menu

Exceptions (if any)

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Method overrides a class or interface that is not extended or implemented by this type
System.TypeLoadException: Method overrides a class or interface that is not extended or implemented by this type
   at System.Text.RegularExpressions.RegexRunner.InitializeForGo()
   at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen, Boolean quick, TimeSpan timeout)
   at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
   at System.Text.RegularExpressions.MatchCollection.GetMatch(Int32 i)
   at System.Text.RegularExpressions.MatchCollection.EnsureInitialized()
   at System.Text.RegularExpressions.MatchCollection.get_Count()
   at BlazorMdc.MTAutocomplete.<>c__DisplayClass83_0.<BuildSelectList>b__0(SelectionItem f)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2[[BlazorMdc.MTAutocomplete.SelectionItem, BlazorMdc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[String](IEnumerable`1 source)
   at BlazorMdc.MTAutocomplete.BuildSelectList(String fieldText)
   at BlazorMdc.MTAutocomplete.SetParameters()
   at BlazorMdc.MTAutocomplete.OnParametersSet()
   at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at BlazorMdc.Internal.InputComponentFoundation`1.<SetParametersAsync>d__62[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() 3 blazor.webassembly.js:1:38193

Further technical details

The example shows an application published on github pages. The same issue exists if I publish the app locally and host it in a static IIS website.

The offending error is occurring in a .Net Standard 2.1 library.

C:\Solutions\OHI\BlazorMdcWebsite>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100-preview.7.20366.6
 Commit:    0684df3a5b

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19041
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.100-preview.7.20366.6\

Host (useful for support):
  Version: 5.0.0-preview.7.20364.11
  Commit:  53976d38b1

.NET SDKs installed:
  3.1.302 [C:\Program Files\dotnet\sdk]
  3.1.400-preview-015203 [C:\Program Files\dotnet\sdk]
  5.0.100-preview.7.20366.6 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-preview.7.20365.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-preview.7.20364.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-preview.7.20366.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
@pranavkm
Copy link
Author

pranavkm commented Aug 4, 2020


Issue moved from dotnet/aspnetcore#24565


From @simonziegler on Tuesday, August 4, 2020 5:12:39 PM

I'm also experiencing this (on the same project)

@simonziegler
Copy link

We have created a demo repo for you here, with a published GitHub Pages site here(https://simonziegler.github.io/MonoLinkerDemo/). This test site demonstrates the error on the main page (Index.razor).

We may change https://blazormdc.com so that it stops crashing. Please therefore refer to the test repo provided here.

@simonziegler
Copy link

This is another issue that needs attention for Blazor - and urgently - responding to @danroth27's invitation to highlight issues that need attention. Cheers, Simon

@eerhardt
Copy link
Member

@MichalStrehovsky @vitek-karas - This looks like it may be related to:

dotnet/runtime#40582
#1421

@MichalStrehovsky
Copy link
Member

Yes, this will be the same bug. The stack is the same. The exception message has less detail (can't see the problematic type/method) but that's just because this stack trace is from Mono and the previous one from CoreCLR.

Would the latest drop already have the fix so that we can validate? I don't know how the flow from this repo works.

@eerhardt
Copy link
Member

Would the latest drop already have the fix so that we can validate?

I believe there are some "bit flow" problems occurring right now. dotnet/installer hasn't been updated in about a week. dotnet/installer#8129.

The flow goes like this:

  • mono/linker =>
  • dotnet/sdk =>
  • dotnet/installer

And dotnet/installer produces the end "SDK" package.

If necessary, we could hack up a build environment to get the latest ILLinker to verify. But we could just wait until the latest linker bits are in an official nightly SDK.

@simonziegler
Copy link

Thanks for picking this up

@simonziegler
Copy link

Hi, is there any update here please?

@eerhardt
Copy link
Member

is there any update here please?

The "bit flow" problem was fixed last week. The latest builds of the 5.0 RC1 branch should have the fix:

https://github.com/dotnet/installer#installers-and-binaries

@marek-safar
Copy link
Contributor

@simonziegler could you let us know if the latest build resolves the issue for you?

@MarkStega
Copy link

@marek-safar Since this only happens when we are hosted on Github pages we are stuck waiting for RC1 to be available in the build chain (The nightly release bits are not typically deployed to Github Actions).

@marek-safar
Copy link
Contributor

Please reopen the issue if the problem still persists

@MarkStega
Copy link

@marek-safar This was resolved. Sorry, we forgot to circle back and add our success.

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

No branches or pull requests

6 participants