-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[regression/8.0.0-preview.7.8842] .NET Maui Blazor App throws "No interop methods are registered for renderer" javascript exception #16609
Comments
Alright we think we know what caused this and have a solution we're testing. We'll also test out a workaround so that anyone running into this in .NET 8 Preview 7 can get their Blazor Hybrid apps working. |
Note: .NET 8 RC1 is available and does not require any workaround.NET 8 RC1 blog post is here with download details: https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-rc1/ But if you're still on .NET 8 Preview 7, continue reading for the workaround... Workaround for .NET 8 Preview 7For anyone encountering this issue in .NET 8 Preview 7 (released August 8th, 2023), here's how you can work around it in your apps. BackgroundA change was made to Blazor in .NET 8 Preview 7 to enable new Blazor Server and WebAssembly rendering scenarios. Unfortunately there is a bug that affects all Blazor Hybrid scenarios (the BlazorWebView control in .NET MAUI, WPF, and WinForms). The bug causes events such as button clicks in the BlazorWebView control to fail. Workaround steps
This is already fixed for the next pre-release of .NET 8. When you update to the next pre-release of .NET 8, you will need to delete the file that you added and also change back the If anyone here tries out this workaround and is successful (or not), please let us know. Thanks! |
The workaround was successful for me! Thanks for that! 🎉 |
@Eilon I tried the workaround in #16609 (comment), but it didn't solve my issue(#2270). Detailed reproduction steps refer to issue #2270. |
@MackinnonBuck - any idea about this one? In the macOS screenshot it's showing |
I'll need a full repro to know what's going on there. @v-Lily, does your project use preview7 nugets? Could you please upload a repro project as a public GitHub repository? |
Thank u |
@MackinnonBuck |
I'll take a look. |
I cloned the repro and ran it on Windows and it seemed to work fine: But I'll look some more. |
Here's the SDK version I'm using:
@v-Lily - can you run |
And in the repro app from @v-Lily if I switch back to the regular In
|
@v-Lily - I wonder if maybe the app wasn't fully re-built? Can you try doing a "Clean" and then build/run again? |
@Eilon Thanks for your comment.
I have fully rebuilt the app. The issue still reproduces after I try to do a "clean" and build/run again. This is my repro machine: etvmaamy001 - 10.214.92.132. You have been added as an administrator, hope this helps you. |
This issue only happens on Visual Studio 17.8.0 Preview 1.0. Any Idea? |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
@PeymanDinani - this issues affects .NET 8 Preview 7, which I believe came with Visual Studio 17.8 Preview 1. You can either use the workaround listed above, or go back to using an earlier preview of .NET 8 (such as Preview 6). The full fix will be available in the next pre-release of .NET 8. |
Oh ok. I guess I am experiencing a different issue with the same side effect. They closed my post on Microsoft visual studio forums and pointed me here. My issue for reference: https://developercommunity.visualstudio.com/t/Net-Maui-Blazor-hybrid-app-Events-are-n/10445068 |
Hi @PeymanDinani , I was the one who closed that issue because it appears to be the same thing (clicks not responding in Blazor Hybrid apps with .NET 8 Preview 7). If you want to use .NET 8 Preview 7, please refer to the workaround listed above (it should only take 2 minutes to do the workaround). |
So if .NET preview becomes stable how do I upgrade my application to it, do I have to create a new project in the newest .NET stable or I can simply update my visual studio + remove the 'temporary changes' we applied using your zip |
@Xyncgas - for anyone using specifically .NET 8 Preview 7, you can use the workaround posted above. All other versions are fine (.NET 6, .NET 7, .NET 8 Preview 1-6, and any .NET 8 pre-release after Preview 7). |
Hi everyone, you should be able to download .NET 8 RC1 that was released this week and has the official fix. If you previously used the workaround posted above, you'll need to undo that change (delete the JS file and change the .NET 8 RC1 blog post is here with download details: https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-rc1/ |
Description
When creating a new .NET Maui Blazor App in
8.0.100-preview.7.23376.3
and running it results in the following javascript exception when navigating or clicking on the counter button.Open the dev tools to see the exception:
Steps to Reproduce
8.0.100-preview.7.23376.3
)Windows Machine
Counter
page and clicking theClick Me
buttonLink to public reproduction project repository
No response
Version with bug
8.0.100-preview.7.23376.3
Last version that worked well
8.0.0-preview.6.8686
Affected platforms
Windows, and others
Affected platform versions
net8.0-windows10.0.19041.0
Did you find any workaround?
#16609 (comment)
Relevant log output
The text was updated successfully, but these errors were encountered: