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

blazor: Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374 #54446

Closed
weibaohui opened this issue Jun 19, 2021 · 8 comments
Closed

blazor: Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374 #54446

weibaohui opened this issue Jun 19, 2021 · 8 comments
Assignees
Labels
Milestone

Comments

@weibaohui
Copy link

weibaohui commented Jun 19, 2021

Web Browse:
Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374, condition `' not met 6.0.0-preview.5.21301.17

C# Code

public partial class FetchData:ComponentBase
    {
         WeatherForecast[] forecasts;
        [Inject]
        private HttpClient Http  { get; set; }

        protected override async Task  OnInitializedAsync()
        {
            forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("https://localhost:4001/WeatherForecast");
        }
}

using netcore 6.0.0-preview.5.21301.17

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Jun 19, 2021
@ghost
Copy link

ghost commented Jun 19, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Web Browse:
Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374, condition `' not met

C# Code
public partial class FetchData:ComponentBase
{
WeatherForecast[] forecasts;
[Inject]
private HttpClient Http { get; set; }

    protected override async Task  OnInitializedAsync()
    {
        forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("https://localhost:4001/WeatherForecast");
    }

}

Author: weibaohui
Assignees: -
Labels:

area-System.Net.Http, untriaged

Milestone: -

@ManickaP ManickaP added the arch-wasm WebAssembly architecture label Jun 21, 2021
@ghost
Copy link

ghost commented Jun 21, 2021

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

Issue Details

Web Browse:
Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374, condition `' not met 6.0.0-preview.5.21301.17

C# Code
public partial class FetchData:ComponentBase
{
WeatherForecast[] forecasts;
[Inject]
private HttpClient Http { get; set; }

    protected override async Task  OnInitializedAsync()
    {
        forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("https://localhost:4001/WeatherForecast");
    }

}

using netcore 6.0.0-preview.5.21301.17

Author: weibaohui
Assignees: -
Labels:

arch-wasm, area-System.Net.Http, untriaged

Milestone: -

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Jun 21, 2021
@lewing lewing added this to the 6.0.0 milestone Jun 21, 2021
@pavelsavara
Copy link
Member

pavelsavara commented Jun 22, 2021

I was not able to reproduce it with simple unit test

It seems to me that it's trying to load some assembly and the callback/hook failed. See

mono_error_assert_ok (hook_error); /* FIXME: proper error handling */

This is not network related issue in my opinion.

@weibaohui, could you please share more complete stack trace ?
Also information on what callback or what library was loaded if you could get it. Thanks!

@radical radical changed the title blazor wasm condition disabled not met blazor: Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374 Jun 22, 2021
@pavelsavara
Copy link
Member

@steveisok @akoeplinger what would be proper error handling for the assembly load hook failure ? Should we throw exception to user code ?
What would be the WASM scenario under which this could happen ?
Since we don't have the stack trace, my guess is corrupt/incomplete/missing assembly download. Or maybe corrupt preview AOT image ?
But I don't understand the workflow here yet. Does assembly download happen in the hook ? Or it was already in memory and valid when the hooks are triggered ?

@ghost
Copy link

ghost commented Jul 16, 2021

Tagging subscribers to this area:
See info in area-owners.md if you want to be subscribed.

Issue Details

Web Browse:
Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374, condition `' not met 6.0.0-preview.5.21301.17

C# Code

public partial class FetchData:ComponentBase
    {
         WeatherForecast[] forecasts;
        [Inject]
        private HttpClient Http  { get; set; }

        protected override async Task  OnInitializedAsync()
        {
            forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("https://localhost:4001/WeatherForecast");
        }
}

using netcore 6.0.0-preview.5.21301.17

Author: weibaohui
Assignees: pavelsavara
Labels:

arch-wasm, area-VM-meta-mono

Milestone: 6.0.0

@lambdageek
Copy link
Member

I'm assuming this is using dotnet watch. If so, this is a duplicate of dotnet/aspnetcore#33152. The workaround was in dotnet/aspnetcore#33263 in .net 6 preview 6. A fix of the underlying issue in Mono is in #55202 and will be in .net 6 preview 7

@ghost
Copy link

ghost commented Jul 16, 2021

Tagging subscribers to this area:
See info in area-owners.md if you want to be subscribed.

Issue Details

Web Browse:
Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1374, condition `' not met 6.0.0-preview.5.21301.17

C# Code

public partial class FetchData:ComponentBase
    {
         WeatherForecast[] forecasts;
        [Inject]
        private HttpClient Http  { get; set; }

        protected override async Task  OnInitializedAsync()
        {
            forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("https://localhost:4001/WeatherForecast");
        }
}

using netcore 6.0.0-preview.5.21301.17

Author: weibaohui
Assignees: pavelsavara
Labels:

arch-wasm, area-AssemblyLoader-mono

Milestone: 6.0.0

@pavelsavara
Copy link
Member

@lambdageek could this be closed now ?

@ghost ghost locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants