Skip to content

Assertion at..., condition '<disabled>' not met. #42628

Closed

Description

@CincySteve

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

App Startup Exception

Activity

  1. mkArtakMSFT commented on Sep 16, 2020

    @mkArtakMSFT

    Thanks for contacting us.
    Can you try out .NET 5.0 RC1 SDK and see whether you will meet the same error or not?

  2. dantronik-bugreporting commented on Sep 17, 2020

    @dantronik-bugreporting

    I am getting the same error with .NET 5.0 RC1. Here's the error message:
    2020-09-17 10_16_30-Entwicklerwerkzeuge - IKON_2_0 - http___192 168 1 53_84_

  3. modulardev2 commented on Sep 17, 2020

    @modulardev2

    Yep, same issue here. Only in the published version, everything works fine locally. Using RC1, worked fine with Preview 8.

  4. Bob-HL commented on Sep 17, 2020

    @Bob-HL

    Same issue here with RC1

  5. modulardev2 commented on Sep 18, 2020

    @modulardev2

    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:

    await HttpClient.GetStringAsync(page)

    with

    await (await HttpClient.GetAsync(page)).Content.ReadAsStringAsync();

  6. Bob-HL commented on Sep 18, 2020

    @Bob-HL

    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:

    await HttpClient.GetStringAsync(page)

    with

    await (await HttpClient.GetAsync(page)).Content.ReadAsStringAsync();

    It works. You saved my day. Thanks.

  7. dantronik-bugreporting commented on Sep 22, 2020

    @dantronik-bugreporting

    @mkArtakMSFT Can auto-close on this issue be prevented? It's a valid issue and the original reporter not responding does not mean that no one else of us will.

    Okay, seems like that already did it.

  8. CincySteve commented on Sep 22, 2020

    @CincySteve
    Author

    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.

  9. CincySteve commented on Sep 22, 2020

    @CincySteve
    Author

    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.

  10. added a commit that references this issue on Sep 22, 2020
  11. CincySteve commented on Sep 23, 2020

    @CincySteve
    Author

    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:

    1. Shutting down VS (both the v16.7 and v16.8 versions) and restarting.
    2. Rebooting my computer.
    3. Removing all the markup from my Layout that's invoked by App.razor
    4. Removing all the startup logic in my javascript.
    5. Removing all the code in my Layout's OnInitializedAsync and OnAfterRender overrides.
    6. Doing 3-5 together (i.e. the app would do nothing)
    7. Removing both the Found and NotFound component references in App.razor
  12. mkArtakMSFT commented on Sep 23, 2020

    @mkArtakMSFT

    Thanks for sharing details, everyone.
    Can somebody please share a minimalistic repro project so we can root cause and address this? Thanks!

  13. 41 remaining items

  14. eerhardt commented on Sep 28, 2020

    @eerhardt
    Member

    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.

  15. Anipik commented on Sep 28, 2020

    @Anipik
    Contributor

    @eerhardt is there any work required on the runtime side for this issue for rc2 or GA ?

  16. eerhardt commented on Sep 28, 2020

    @eerhardt
    Member

    I don't believe so. To fix this we will need:

    1. The above linker change to be ported to the 5.0 branch.
    2. The new 5.0 linker to be merged into the dotnet/sdk 5.0 branch.
  17. marek-safar commented on Oct 1, 2020

    @marek-safar
    Contributor

    The changes were backported to 5.0 GA branch and merged to dotnet/sdk

  18. truthz03 commented on Oct 14, 2020

    @truthz03

    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:
    await Http.GetJsonAsync(ApiUrl + SearchTermParam(SearchTerm));

    Is this Bug not fixed unit now?

    The strange thing is that if I ran my application with VisualStudio and Debugging everything is working.
    If I make a dotnet pusblish with "--configuration Debug" and create a docker container from the output to deploy it on my server this error occures.

  19. lewing commented on Oct 14, 2020

    @lewing
    Member

    @truthz03 RC2 was frozen before the fix went in. The fix will be part of 5.0 final.

  20. truthz03 commented on Oct 14, 2020

    @truthz03

    Ok. Thanks. Than I will wait for it

  21. added a commit that references this issue on Oct 21, 2020
  22. joer33304 commented on Dec 6, 2020

    @joer33304

    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.

  23. joer33304 commented on Dec 6, 2020

    @joer33304

    Just for others coming here, "false " works for me to get rid of the exception

  24. lewing commented on Dec 7, 2020

    @lewing
    Member

    @joer33304 can you please open a new issue with the details of the problem you are encountering?

  25. ghost locked as resolved and limited conversation to collaborators on Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Metablockedblocking-releaselinkable-framework

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions