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

Cannot use Blazor 8 RC1 wasm on GitHub pages #93017

Closed
1 task done
AceHack opened this issue Oct 2, 2023 · 16 comments
Closed
1 task done

Cannot use Blazor 8 RC1 wasm on GitHub pages #93017

AceHack opened this issue Oct 2, 2023 · 16 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono needs-author-action An issue or pull request that requires more info or actions from the author.
Milestone

Comments

@AceHack
Copy link

AceHack commented Oct 2, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I get the following errors when hosting on GitHub pages a blazor app
dotnet/AspNetCore.Docs#30535

Expected Behavior

Blazor app to work on GitHub pages

Steps To Reproduce

Create a new blazor app
Try to host it on GitHub pages

Exceptions (if any)

See dotnet/AspNetCore.Docs#30535

.NET Version

8 RC1

Anything else?

No response

@AceHack
Copy link
Author

AceHack commented Oct 2, 2023

It was this line in the csproj that caused the issue, removing it fixed it.
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>

@guardrex
Copy link

guardrex commented Oct 2, 2023

I've called this out in the article on dotnet/AspNetCore.Docs#30542. I'll keep an 👂 open here to learn if we're just going to dissuade devs from enabling it for GH Pages or if I need to address it some other way.

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Oct 2, 2023

@lewing is this a known issue that you plan to address?

@guardrex it sounds from your comment that this is expected behavior in GitHub pages. It doesn't look to be the case, so please remove the doc comment.

@guardrex
Copy link

guardrex commented Oct 2, 2023

Ok ... it didn't go live ... I'll quick shoot a PR up to just comment it out for now and remain with a 👂 open here.

UPDATE: Per DR, I'm removing it. I'll 👂 here if it turns out that anything needs to be said later.

@lewing
Copy link
Member

lewing commented Oct 2, 2023

WasmStripILAfterAOT should be off by default, it can definitely cause issues if applications use reflection

cc @fanyang-mono

@fanyang-mono
Copy link
Member

I have a PR which might fix this issue. #90436

@AceHack
Copy link
Author

AceHack commented Oct 3, 2023

My application for the test was just the default Blazor WASM template.
I personally was not using reflection, but I'm guessing Blazor does a lot.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 4, 2023
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/aspnetcore Oct 4, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 4, 2023
@radical radical added the arch-wasm WebAssembly architecture label Oct 4, 2023
@ghost
Copy link

ghost commented Oct 4, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I get the following errors when hosting on GitHub pages a blazor app
dotnet/AspNetCore.Docs#30535

Expected Behavior

Blazor app to work on GitHub pages

Steps To Reproduce

Create a new blazor app
Try to host it on GitHub pages

Exceptions (if any)

See dotnet/AspNetCore.Docs#30535

.NET Version

8 RC1

Anything else?

No response

Author: AceHack
Assignees: -
Labels:

arch-wasm, untriaged, needs-area-label

Milestone: -

@radical
Copy link
Member

radical commented Oct 4, 2023

dotnet/AspNetCore.Docs#30542 - adds a section saying that the property is not supported for github pages.
I don't think property is ready for use in 8.0 at all. So, we should not be suggesting using it at all. Feel free to correct me.
cc @lewing @fanyang-mono @mkArtakMSFT

@guardrex
Copy link

guardrex commented Oct 4, 2023

That PR was reverted at Dan's request. He thinks this is a bug.

Actually, hold on ... that might still be on my To Do list. Let me check.

Yes! It was reverted (section). I'm keeping an 👂 open to learn if we need to cover anything or if it's a bug that will be fixed.

@fanyang-mono
Copy link
Member

dotnet/AspNetCore.Docs#30542 - adds a section saying that the property is not supported for github pages. I don't think property is ready for use in 8.0 at all. So, we should not be suggesting using it at all. Feel free to correct me. cc @lewing @fanyang-mono @mkArtakMSFT

It should be advertised as an opt-in feature for people to try out. Before shipping it to .NET8 RC1, I did test it with Blazor WASM template app and it worked. I am curious what might have caused the issue. I will look into it.

@fanyang-mono
Copy link
Member

@guardrex WasmStripILAfterAOT is a complete new feature that I introduced in .NET8 RC1. It was tested on limited scenarios before shipping. Thus, we shipped it as an opt-in feature. Those two links that you listed are not related to this feature.

@guardrex
Copy link

guardrex commented Oct 5, 2023

My apologies ... I'm buried in work here at the moment 😅. The correct link is ...

https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-8.0#trim-net-il-after-ahead-of-time-aot-compilation

... and it is opt-in.

It seems that we need to make some remarks about enabling it. I'll be back, but it's tough to reach this at the moment. I'll get to it as soon as I can.

If you have a suggestion for remarks, you can place them here, and I'll get them into that section.

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 6, 2023
@fanyang-mono fanyang-mono self-assigned this Oct 9, 2023
@fanyang-mono fanyang-mono removed the untriaged New issue has not been triaged by the area owner label Oct 9, 2023
@fanyang-mono fanyang-mono added this to the 9.0.0 milestone Oct 9, 2023
@fanyang-mono
Copy link
Member

This issue should have been fixed in .NET9. @AceHack Could you try .NET9 to see if this issue still exit?

@lewing lewing added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jul 30, 2024
Copy link
Contributor

This issue has been marked needs-author-action and may be missing some important information.

@lewing
Copy link
Member

lewing commented Jul 30, 2024

I believe this is fixed, please reopen if not

@lewing lewing closed this as completed Jul 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono needs-author-action An issue or pull request that requires more info or actions from the author.
Projects
None yet
Development

No branches or pull requests

8 participants