Skip to content

Mapping between .Net objects and JSReference should not allow to match objects of different types. #197

Mapping between .Net objects and JSReference should not allow to match objects of different types.

Mapping between .Net objects and JSReference should not allow to match objects of different types. #197

GitHub Actions / test results (ubuntu-latest, node18.x, Release) failed Oct 6, 2023 in 0s

test results (ubuntu-latest, node18.x, Release) ❌

Tests failed

Report Passed Failed Skipped Time
test/dotnet6-node18.x-Release/_fv-az562-28_2023-10-06_20_55_54.trx 40✅ 1❌ 3⚪ 98s
test/dotnet8-node18.x-Release/_fv-az562-28_2023-10-06_20_57_21.trx 65✅ 1❌ 3⚪ 131s

❌ test/dotnet6-node18.x-Release/_fv-az562-28_2023-10-06_20_55_54.trx

44 tests were completed in 98s with 40 passed, 1 failed and 3 skipped.

Test suite Passed Failed Skipped Time
Microsoft.JavaScript.NodeApi.Test.HostedClrTests 27✅ 1❌ 33s
Microsoft.JavaScript.NodeApi.Test.JSProjectTests 4✅ 61s
Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests 3⚪ 3ms
Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests 9✅ 32ms

❌ Microsoft.JavaScript.NodeApi.Test.HostedClrTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/dynamic_generics")
❌ Test(id: "napi-dotnet/dynamic_invoke")
	Assert.Fail(): node:assert:125
	  throw new AssertionError(obj);
	  ^
	
	AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
	
	Version {}
	
	    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
	    at Module._compile (node:internal/modules/cjs/loader:1256:14)
	    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
	    at Module.load (node:internal/modules/cjs/loader:1119:32)
	    at Module._load (node:internal/modules/cjs/loader:960:12)
	    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
	    at node:internal/main/run_main_module:23:47 {
	  generatedMessage: true,
	  code: 'ERR_ASSERTION',
	  actual: Version {},
	  expected: Version {},
	  operator: 'strictEqual'
	}
	
	Node.js v18.18.0
	
	Node process exited with code: 1. 
	node:assert:125
	  throw new AssertionError(obj);
	  ^
	
	AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
	
	Version {}
	
	    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
	    at Module._compile (node:internal/modules/cjs/loader:1256:14)
	    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
	    at Module.load (node:internal/modules/cjs/loader:1119:32)
	    at Module._load (node:internal/modules/cjs/loader:960:12)
	    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
	    at node:internal/main/run_main_module:23:47 {
	  generatedMessage: true,
	  code: 'ERR_ASSERTION',
	  actual: Version {},
	  expected: Version {},
	  operator: 'strictEqual'
	}
	
	Node.js v18.18.0
	
	Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net6.0/hosted-dynamic_invoke.log
✅ Test(id: "napi-dotnet/dynamic_optional_params")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.JSProjectTests

✅ Test(id: "projects/js-cjs/test")
✅ Test(id: "projects/js-esm/test")
✅ Test(id: "projects/ts-cjs/test")
✅ Test(id: "projects/ts-esm/test")

✅ Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests

⚪ NodejsErrorPropagation
⚪ NodejsStart
⚪ NodejsUnhandledRejection

✅ Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests

✅ GenerateEnum
✅ GenerateGenericClass
✅ GenerateGenericDelegate
✅ GenerateGenericInterface
✅ GenerateSimpleClass
✅ GenerateSimpleDelegate
✅ GenerateSimpleInterface
✅ GenerateSimpleMethod
✅ GenerateSimpleProperty

❌ test/dotnet8-node18.x-Release/_fv-az562-28_2023-10-06_20_57_21.trx

69 tests were completed in 131s with 65 passed, 1 failed and 3 skipped.

Test suite Passed Failed Skipped Time
Microsoft.JavaScript.NodeApi.Test.HostedClrTests 27✅ 1❌ 32s
Microsoft.JavaScript.NodeApi.Test.JSProjectTests 4✅ 61s
Microsoft.JavaScript.NodeApi.Test.NativeAotTests 25✅ 37s
Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests 3⚪ 3ms
Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests 9✅ 24ms

❌ Microsoft.JavaScript.NodeApi.Test.HostedClrTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/dynamic_generics")
❌ Test(id: "napi-dotnet/dynamic_invoke")
	Assert.Fail(): node:assert:125
	  throw new AssertionError(obj);
	  ^
	
	AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
	
	Version {}
	
	    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
	    at Module._compile (node:internal/modules/cjs/loader:1256:14)
	    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
	    at Module.load (node:internal/modules/cjs/loader:1119:32)
	    at Module._load (node:internal/modules/cjs/loader:960:12)
	    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
	    at node:internal/main/run_main_module:23:47 {
	  generatedMessage: true,
	  code: 'ERR_ASSERTION',
	  actual: Version {},
	  expected: Version {},
	  operator: 'strictEqual'
	}
	
	Node.js v18.18.0
	
	Node process exited with code: 1. 
	node:assert:125
	  throw new AssertionError(obj);
	  ^
	
	AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
	
	Version {}
	
	    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
	    at Module._compile (node:internal/modules/cjs/loader:1256:14)
	    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
	    at Module.load (node:internal/modules/cjs/loader:1119:32)
	    at Module._load (node:internal/modules/cjs/loader:960:12)
	    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
	    at node:internal/main/run_main_module:23:47 {
	  generatedMessage: true,
	  code: 'ERR_ASSERTION',
	  actual: Version {},
	  expected: Version {},
	  operator: 'strictEqual'
	}
	
	Node.js v18.18.0
	
	Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net8.0/hosted-dynamic_invoke.log
✅ Test(id: "napi-dotnet/dynamic_optional_params")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.JSProjectTests

✅ Test(id: "projects/js-cjs/test")
✅ Test(id: "projects/js-esm/test")
✅ Test(id: "projects/ts-cjs/test")
✅ Test(id: "projects/ts-esm/test")

✅ Microsoft.JavaScript.NodeApi.Test.NativeAotTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests

⚪ NodejsErrorPropagation
⚪ NodejsStart
⚪ NodejsUnhandledRejection

✅ Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests

✅ GenerateEnum
✅ GenerateGenericClass
✅ GenerateGenericDelegate
✅ GenerateGenericInterface
✅ GenerateSimpleClass
✅ GenerateSimpleDelegate
✅ GenerateSimpleInterface
✅ GenerateSimpleMethod
✅ GenerateSimpleProperty

Annotations

Check failure on line 274 in test/TestBuilder.cs

See this annotation in the file changed.

@github-actions github-actions / test results (ubuntu-latest, node18.x, Release)

Microsoft.JavaScript.NodeApi.Test.HostedClrTests ► Test(id: "napi-dotnet/dynamic_invoke")

Failed test found in:
  test/dotnet6-node18.x-Release/_fv-az562-28_2023-10-06_20_55_54.trx
Error:
  Assert.Fail(): node:assert:125
    throw new AssertionError(obj);
    ^
  
  AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
  
  Version {}
  
      at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
      at node:internal/main/run_main_module:23:47 {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: Version {},
    expected: Version {},
    operator: 'strictEqual'
  }
  
  Node.js v18.18.0
  
  Node process exited with code: 1. 
  node:assert:125
    throw new AssertionError(obj);
    ^
  
  AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
  
  Version {}
  
      at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
      at node:internal/main/run_main_module:23:47 {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: Version {},
    expected: Version {},
    operator: 'strictEqual'
  }
  
  Node.js v18.18.0
  
  Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net6.0/hosted-dynamic_invoke.log
Raw output
Assert.Fail(): node:assert:125
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:

Version {}

    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Version {},
  expected: Version {},
  operator: 'strictEqual'
}

Node.js v18.18.0

Node process exited with code: 1. 
node:assert:125
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:

Version {}

    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Version {},
  expected: Version {},
  operator: 'strictEqual'
}

Node.js v18.18.0

Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net6.0/hosted-dynamic_invoke.log
   at Microsoft.JavaScript.NodeApi.Test.TestBuilder.RunNodeTestCase(String jsFilePath, String logFilePath, IDictionary`2 testEnvironmentVariables) in /home/runner/work/node-api-dotnet/node-api-dotnet/test/TestBuilder.cs:line 274
   at Microsoft.JavaScript.NodeApi.Test.HostedClrTests.Test(String id) in /home/runner/work/node-api-dotnet/node-api-dotnet/test/HostedClrTests.cs:line 95

Check failure on line 274 in test/TestBuilder.cs

See this annotation in the file changed.

@github-actions github-actions / test results (ubuntu-latest, node18.x, Release)

Microsoft.JavaScript.NodeApi.Test.HostedClrTests ► Test(id: "napi-dotnet/dynamic_invoke")

Failed test found in:
  test/dotnet8-node18.x-Release/_fv-az562-28_2023-10-06_20_57_21.trx
Error:
  Assert.Fail(): node:assert:125
    throw new AssertionError(obj);
    ^
  
  AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
  
  Version {}
  
      at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
      at node:internal/main/run_main_module:23:47 {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: Version {},
    expected: Version {},
    operator: 'strictEqual'
  }
  
  Node.js v18.18.0
  
  Node process exited with code: 1. 
  node:assert:125
    throw new AssertionError(obj);
    ^
  
  AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
  
  Version {}
  
      at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
      at node:internal/main/run_main_module:23:47 {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: Version {},
    expected: Version {},
    operator: 'strictEqual'
  }
  
  Node.js v18.18.0
  
  Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net8.0/hosted-dynamic_invoke.log
Raw output
Assert.Fail(): node:assert:125
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:

Version {}

    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Version {},
  expected: Version {},
  operator: 'strictEqual'
}

Node.js v18.18.0

Node process exited with code: 1. 
node:assert:125
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:

Version {}

    at Object.<anonymous> (/home/runner/work/node-api-dotnet/node-api-dotnet/test/TestCases/napi-dotnet/dynamic_invoke.js:22:8)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Version {},
  expected: Version {},
  operator: 'strictEqual'
}

Node.js v18.18.0

Full output: /home/runner/work/node-api-dotnet/node-api-dotnet/out/obj/Release/TestCases/napi-dotnet/net8.0/hosted-dynamic_invoke.log
   at Microsoft.JavaScript.NodeApi.Test.TestBuilder.RunNodeTestCase(String jsFilePath, String logFilePath, IDictionary`2 testEnvironmentVariables) in /home/runner/work/node-api-dotnet/node-api-dotnet/test/TestBuilder.cs:line 274
   at Microsoft.JavaScript.NodeApi.Test.HostedClrTests.Test(String id) in /home/runner/work/node-api-dotnet/node-api-dotnet/test/HostedClrTests.cs:line 95
   at InvokeStub_HostedClrTests.Test(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)