-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Assertion at..., condition '<disabled>' not met. #42628
Comments
Thanks for contacting us. |
Yep, same issue here. Only in the published version, everything works fine locally. Using RC1, worked fine with Preview 8. |
Same issue here with RC1 |
After messing with this for awhile today, I was able to fix it on my end using the following workaround, and I hope it can help someone else. The culprit was the HttpClient.GetStringAsync method. I replaced for example:
with
|
It works. You saved my day. Thanks. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. See our Issue Management Policies for more information. |
Okay, seems like that already did it. |
Sorry for being so slow to get back in. I installed .Net 5.0 RC1. I verified that I am using VS 16.8, but am not sure if there is some other verification required to confirm other 5.0 RC1 things installed. Anyway, assuming I have done what was necessary, after I re-published, the app still fails to start-up because of the same exception, while still running successfully under the debugger in VS. I don't have the situation lertoo mentioned. |
Ugh. I just started to run into this exception in the VS debugger, in both v16.7.4 and v16.8.0 Preview 3.0 (.Net 5.0 RC1). That means I am dead in the water until I can either find the cause or a workaround. I could sure use some help. |
I have a couple other small Blazor apps that are not running into this exception. So there is something about my one app that's triggering it. I have tried, without success:
|
Thanks for sharing details, everyone. |
@eerhardt this seems to be caused by Linker |
Tagging subscribers to this area: @BrzVlad |
Looks like this assert is failing: runtime/src/mono/mono/metadata/threads.c Line 354 in dbc2d36
cc @lewing |
@CincySteve do you have a test case we can use to reproduce this? |
Does this still fail if you add
To your project file? The two biggest differences between release and debug are linked assemblies and interpreter optimizations and disabling linking is eliminates one of them. @BrzVlad have you had a chance to look at this? |
Unfortunately, the only app I have that experiences the problem is a fairly big one: 40+ components, 40+ significant c# classes, etc. |
@lewing I'm afraid I don't know what adding PublishTrimmed to my "project file" means. I tried to add it in several places, but it was not a recognizable component. Which specific project file do you mean? |
@CincySteve in the blazor wasm specific csproj inside a property group. |
@lertoo @modulardev2 if either of you have a reproduction you can share it would be very helpful. |
@CincySteve While there is always the chance that something goes unexpectedly wrong somewhere, based on the stacktrace that you provided this is not a bug but rather a current limitation of the interpreter. The interpreter will fail to compile methods that are extremely large (it requires more than 32kb of local space) and this is the first situation where I hear of this happening. Fixing this is quite a bit of effort, so it wouldn't make it to 5.0. If you are over on the DotNetEvolution discord server, we can discuss it there in private and I can guide you to find which method fails to compile and confirm if this limitation is actually hit. |
@SamMonoRT mono/linker doesn't have the labels, I'm not sure how it is usually handled? This is blocking on dotnet/linker#1507 |
@eerhardt - Leaving this open as a Blocked issue - Not an interpreter issue, update area label to area-Meta |
After a lot of digging and help from @BrzVlad , I have found that he was correct in diagnosing my problem (not necessarily the others) as a method that is too large. I load some data lists in Program.cs via calls to static class methods, one of which is very large. These classes are generated by a custom utility I wrote using external data sources. I'm not sure why this started to fail only recently (this code has been running for at least 2 months, which is why I didn't think about it). And of course, the Assertion exception is a mysterious symptom. Anyway, thanks once again to @BrzVlad. |
…rying to transform a method with too many locals. dotnet/runtime#42628.
…rying to transform a method with too many locals. dotnet#42628.
…rying to transform a method with too many locals. (#20436) dotnet/runtime#42628.
Update - the underlying linker issue has been fixed and is being backported to 5.0. Once that is merged we should be able to close this issue. |
@eerhardt is there any work required on the runtime side for this issue for rc2 or GA ? |
I don't believe so. To fix this we will need:
|
The changes were backported to 5.0 GA branch and merged to dotnet/sdk |
See dotnet/runtime#42628 for more information.
Hi, I have updated to RC2 today but the error still is present. The problem seems to be this line from a Nuget Package I'm using: Is this Bug not fixed unit now? The strange thing is that if I ran my application with VisualStudio and Debugging everything is working. |
@truthz03 RC2 was frozen before the fix went in. The fix will be part of 5.0 final. |
Ok. Thanks. Than I will wait for it |
* Word document (docx) conversion to html. Update to .Net 5 Preview 8. * Searchable word document. * Update to .NET 5 RC1. * Convert Word documents using WordLib. * Rewrite Word document URLs * Update to Net 5.0 RC2 * Fix to bypass an issue with publishing blazor applications. See dotnet/runtime#42628 for more information. * Update WordLib to 1.0.0-preview2. * Update to WordLib 1.0.0-preview3. Word multi-document message.
This issue is NOT fixed. I upgrade to the latest 5 net 5 sdk. Works locally, error appears when deploying to azure on windows hosted app service. |
Just for others coming here, "false " works for me to get rid of the exception |
@joer33304 can you please open a new issue with the details of the problem you are encountering? |
I just published to Azure a Blazor Wasm SPA I am developing with VS Community 2019. The app starts up successfully in Chrome via the VS debugger, but the published version triggers the exception below (also in Chrome). The exception message, _ gives me no clue as to the problem_. This looks similar to this previous issue dotnet/aspnetcore#16818 that has been fixed. I published 2-3 months ago a much simpler early version of the app, which functionally did what's described below, and it worked at that time.
Curiously, after I first published a few minutes ago, my console log messages indicated the app got through almost all of my main layout's OnInitializedAsync code, including a JSRuntime.InvokeAsync to my JavaScipt initialization code that opens an IndexedDB and returns its Index of keys. But when I tried re-publishing and got the same exception, none of my initialization code ran according to the console log. I can post my OnInitializedAsync code, but since the exception is now happening before any of this code executes, I'm not sure it will be helpful. Any idea what's going on?
Thanks. Steve
The text was updated successfully, but these errors were encountered: