Skip to content

Microsoft.Extensions.Logging.Tests fail on WASM with an assertion in mono_exception_new_by_name_domain #38337

@akoeplinger

Description

@akoeplinger

Some tests in Microsoft.Extensions.Logging.Tests fail with an assertion:

Microsoft.Extensions.Logging.Test.ConsoleLoggerTest.ConsoleLoggerOptions_IncludeScopes_IsReadFromLoggingConfiguration

        Stacktrace:
        Error
            at 194359 (dotnet.js:1858:32)
            at _emscripten_asm_const_iii (dotnet.js:1863:27)
            at wasm_logger (<anonymous>:wasm-function[7792]:0x1ef32e)
            at eglib_log_adapter (<anonymous>:wasm-function[6304]:0x1a71bf)
            at monoeg_g_logstr (<anonymous>:wasm-function[7226]:0x1ca2fc)
            at monoeg_g_logv_nofree (<anonymous>:wasm-function[7224]:0x1ca223)
            at monoeg_assertion_message (<anonymous>:wasm-function[7228]:0x1ca3af)
            at mono_exception_new_by_name_domain (<anonymous>:wasm-function[2195]:0xb3b8f)
            at mono_exception_new_by_name (<anonymous>:wasm-function[2205]:0xb4790)
            at mono_exception_new_by_name_msg (<anonymous>:wasm-function[2204]:0xb450f)

        WASM-ERR: * Assertion at /Users/alexander/dev/runtime/src/mono/mono/metadata/exception.c:109, condition `is_ok (error)' not met, function:mono_exception_new_by_name_domain, (null) assembly:System.Private.CoreLib.dll type:PlatformNotSupportedException member:(null)
        WASM-ERR:
        ABORT: undefined
        Stacktrace:
        Error
            at Object.onAbort (runtime.js:160:13)
            at abort (dotnet.js:1643:22)
            at _abort (dotnet.js:6101:7)
            at wasm_logger (<anonymous>:wasm-function[7792]:0x1ef350)
            at eglib_log_adapter (<anonymous>:wasm-function[6304]:0x1a71bf)
            at monoeg_g_logstr (<anonymous>:wasm-function[7226]:0x1ca2fc)
            at monoeg_g_logv_nofree (<anonymous>:wasm-function[7224]:0x1ca223)
            at monoeg_assertion_message (<anonymous>:wasm-function[7228]:0x1ca3af)
            at mono_exception_new_by_name_domain (<anonymous>:wasm-function[2195]:0xb3b8f)
            at mono_exception_new_by_name (<anonymous>:wasm-function[2205]:0xb4790)

The problematic tests were disabled so to reproduce it you need to remove

[ActiveIssue("https://github.com/dotnet/runtime/issues/38337", TestPlatforms.Browser)]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions