You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[WASM] When AOT is used it throws Arg_InvalidCastException #100527
After reviewing our code I haven't found anything suspicious and I believe this is AOT bug. The code is trivial and we are using Blazor API.
We are not doing any explicit cast, the only thing where cast is happening behind the roof is ParameterView.TryGetValue<T>(string, out T) which casts object to T but this is part of the Blazor API.
The code do work when you only enable trimming but AOT disabled, which makes me believe even more that it's AOT bug.
This is a regression introduced by #97850 which made changes to the AOT runtime but did not make corresponding changes to the AOT comppiler. The compiler changes are in #101491 - for the 8.0 servicing. They are already in net9.0 main - in #94787
Having the same issue with the latest .NET 8 SDK available for download (.NET 8.0.301). How did you solve this @mgubis ? Just set the RuntimeFrameworkVersion in the csproj? Is it safe to set that only for the Blazor Client project (and not Server project) or could there be mismatches then between server and client? We will have .NET 8.0.6 installed on the server.
I published project as self-contained and deployed to local server (not Azure) - so I was not able to check for any incompatibilities (although I think there should be none).
Anyway, I believe, that it should be sufficient to switch RuntimeFrameworkVersion only for client project - published version of the WASM framework depends on the client project.
@lambdageek When will it be fixed? I'm guessing it won't be in version 8.0.302 according to your last comment ?
So for 8.0.7, will it be fixed? If so, does that mean not before mid-August at the earliest?
Thanks in advance for any answer. This is an issue in our production environment.
Activity
lambdageek commentedon Apr 2, 2024
Doesn't repro with 8.0.2 on a mac, serving with dotnet-serve, browsing with Chrome v123. Trying on Windows...
ScarletKuro commentedon Apr 2, 2024
Here is the published files that were generated by the VS studio 2022 (17.9.4) "Publish"
publish.zip
that's how i run it:
lambdageek commentedon Apr 2, 2024
Thanks. Can repro using these published files.
Also it repro'd building from source after I upgraded my SDK, runtime and workload to 8.0.3 / 8.0.203
@lewing looks like a recent regression
mgubis commentedon Apr 22, 2024
Is there any news about the topic? I see current milestone 9.0.0 - this would render AOT not usable for us for quite some time ...
lewing commentedon Apr 22, 2024
8.0.2 -> 8.0.3 is roughtly 31691ff...13d578b correct?
mgubis commentedon Apr 22, 2024
Maybe this information helps: I tried to built with RuntimeFrameworkVersion = 8.0.2 with 8.0.4 SDK tools and it has resolved the problem:
lambdageek commentedon Apr 24, 2024
This is a regression introduced by #97850 which made changes to the AOT runtime but did not make corresponding changes to the AOT comppiler. The compiler changes are in #101491 - for the 8.0 servicing. They are already in net9.0
main- in #94787e808080 commentedon Jun 4, 2024
Having the same issue with the latest .NET 8 SDK available for download (.NET 8.0.301). How did you solve this @mgubis ? Just set the RuntimeFrameworkVersion in the csproj? Is it safe to set that only for the Blazor Client project (and not Server project) or could there be mismatches then between server and client? We will have .NET 8.0.6 installed on the server.
mgubis commentedon Jun 4, 2024
@garcia252 - I have installed .NET 8.0.2 SDK to the development machine. I have changed both server and client to use new runtime:
<RuntimeFrameworkVersion>8.0.2</RuntimeFrameworkVersion>I published project as self-contained and deployed to local server (not Azure) - so I was not able to check for any incompatibilities (although I think there should be none).
Anyway, I believe, that it should be sufficient to switch RuntimeFrameworkVersion only for client project - published version of the WASM framework depends on the client project.
ScarletKuro commentedon Jun 7, 2024
Can confirm that the problem still exist in the latest SDK 8.0.301
e808080 commentedon Jun 12, 2024
Verified that this issue still exists in the version released yesterday SDK 8.0.302 ...
lambdageek commentedon Jun 12, 2024
Thanks, we'll take another look. /cc @steveisok
lambdageek commentedon Jun 17, 2024
Looks like 8.0.6 / .NET SDK 8.0.302 didn't take any changes from after April 16th , #101491 was merged on April 30th. So the fix is not in yet.
(I verified that 8.0.302 still repros the issue for me, while building a runtime and AOT compiler from the tip of https://github.com/dotnet/runtime/tree/release/8.0 apparently fixes it.)
boukenka commentedon Jul 4, 2024
@lambdageek When will it be fixed? I'm guessing it won't be in version 8.0.302 according to your last comment ?
So for 8.0.7, will it be fixed? If so, does that mean not before mid-August at the earliest?
Thanks in advance for any answer. This is an issue in our production environment.
lambdageek commentedon Jul 9, 2024
.NET 8.0.7 is out today. I verified that the crash is fixed in this release. (.NET 9 Preview 6 also works)