ContextMenu throws exception after opening and trying to change page. #432

Closed
opened 2026-01-29 17:37:12 +00:00 by claunia · 1 comment
Owner

Originally created by @victorgutmann on GitHub (Jun 13, 2022).

Describe the bug
Unexpected error after opening ContextMenu and then trying to navigate to another page on the site.
This error occurs even on the demo component site.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://blazor.radzen.com/contextmenu'
  2. Right Click on button "Right Click Me" (can be any of the 3)
  3. Click any other link that leaves the page, e.g., "Overview"
  4. See error on the browser's developer console. The connection to the server is closed, so you must reload the page.

Expected behavior
No error and to be able to navigate through the site without reloading it.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version 102.0.5005.115

Additional context
Error:
[2022-06-12T23:09:46.191Z] Error: There was an error applying batch 15.
blazor.server.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'removeChild')
at j (blazor.server.js:1:17100)
at j (blazor.server.js:1:17070)
at j (blazor.server.js:1:17070)
at ae.applyEdits (blazor.server.js:1:21274)
at ae.updateComponent (blazor.server.js:1:20504)
at blazor.server.js:1:114506
at Dn.processBatch (blazor.server.js:1:114878)
at Tt. (blazor.server.js:1:129060)
at blazor.server.js:1:71783
at Array.forEach ()
[2022-06-12T23:09:46.329Z] Error: System.AggregateException: One or more errors occurred. (TypeError: Cannot read properties of null (reading 'removeChild'))
---> System.InvalidOperationException: TypeError: Cannot read properties of null (reading 'removeChild')
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
--- End of inner exception stack trace ---

Originally created by @victorgutmann on GitHub (Jun 13, 2022). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** Unexpected error after opening ContextMenu and then trying to navigate to another page on the site. This error occurs even on the demo component site. **To Reproduce** Steps to reproduce the behavior: 1. Go to 'https://blazor.radzen.com/contextmenu' 2. Right Click on button "Right Click Me" (can be any of the 3) 3. Click any other link that leaves the page, e.g., "Overview" 4. See error on the browser's developer console. The connection to the server is closed, so you must reload the page. **Expected behavior** No error and to be able to navigate through the site without reloading it. **Screenshots** ![image](https://user-images.githubusercontent.com/39846541/173257222-c59125bd-66b4-484c-b945-6beeba6c3c8c.png) **Desktop (please complete the following information):** - OS: Windows 10 - Browser: Chrome - Version 102.0.5005.115 **Additional context** Error: [2022-06-12T23:09:46.191Z] Error: There was an error applying batch 15. blazor.server.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'removeChild') at j (blazor.server.js:1:17100) at j (blazor.server.js:1:17070) at j (blazor.server.js:1:17070) at ae.applyEdits (blazor.server.js:1:21274) at ae.updateComponent (blazor.server.js:1:20504) at blazor.server.js:1:114506 at Dn.processBatch (blazor.server.js:1:114878) at Tt.<anonymous> (blazor.server.js:1:129060) at blazor.server.js:1:71783 at Array.forEach (<anonymous>) [2022-06-12T23:09:46.329Z] Error: System.AggregateException: One or more errors occurred. (TypeError: Cannot read properties of null (reading 'removeChild')) ---> System.InvalidOperationException: TypeError: Cannot read properties of null (reading 'removeChild') at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents) --- End of inner exception stack trace ---
Author
Owner

@enchev commented on GitHub (Jun 13, 2022):

Thanks for the report! It seems however that the problem can be reproduced only with Overview link:
context-menu

@enchev commented on GitHub (Jun 13, 2022): Thanks for the report! It seems however that the problem can be reproduced only with Overview link: ![context-menu](https://user-images.githubusercontent.com/5804953/173291390-387ca53c-2113-498b-9ab9-6d85c6391db3.gif)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#432