DotNetObjectReference

I receive this error during FormSubmit in a form that is not touched for months.
Uncaught (in promise) Error: System.ArgumentException: There is no tracked object with id '6'. Perhaps the DotNetObjectReference instance was already disposed. (Parameter 'dotNetObjectId')

at Microsoft.JSInterop.JSRuntime.GetObjectReference(Int64 dotNetObjectId)

at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson)
endInvokeDotNetFromJS https://localhost:5001/_framework/blazor.web.js:1
_invokeClientMethod https://localhost:5001/_framework/blazor.web.js:1
_processIncomingData https://localhost:5001/_framework/blazor.web.js:1
onreceive https://localhost:5001/_framework/blazor.web.js:1
onmessage https://localhost:5001/_framework/blazor.web.js:1
Fortunately, on the local server I have the same application that used Radzen Components 8, and during the execution of the same operation on the same database, the browser console does not have any errors. It is true that the changes are written to the database without error, the only thing that is disturbing is to see an error where there was none before.

Most probably it’s caused by recent possible memory leaks fixes:

We will add additional checks to try to avoid such exceptions.

1 Like

Recently receive same error when launch Dialog: System.ArgumentException: There is no tracked object with id '5'. Perhaps the DotNetObjectReference instance was already disposed. (Parameter 'dotNetObjectId') at Microsoft.JSInterop.JSRuntime.GetObjectReference(Int64 dotNetObjectId) at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson) , I have a production version and the error doesn't appear. Why is this happening?

See my previous reply.

1 Like