Skip to content

i.default.find(...) is undefined when trying to delete table or link in ERD #8318

@KaylaSolace

Description

@KaylaSolace

Please note that security bugs or issues should be reported to security@pgadmin.org.

Describe the bug

While using the erd tool, occasionally tables or links will become impossible to delete, triggering a "i.default.find(...) is undefined" error in the console

To Reproduce

Steps to reproduce the behavior:

  1. Create ERD
  2. Make some tables and links
  3. Rename tables and columns a few times
  4. Some links and tables cannot be deleted anymore

Expected behavior

To be able to delete links and tables

Error message

Uncaught TypeError: i.default.find(...) is undefined removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onOkClick http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 Oe http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 He http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Nr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 cc http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Me http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Qt http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Ut http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 erd_tool.js:1:814489 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 forEach self-hosted:157 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 forEach self-hosted:157 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onOkClick http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 Oe http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 He http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Nr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 cc http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Me http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Qt http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Ut http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2

error in chromium:

Uncaught TypeError: Cannot read properties of undefined (reading 'attnum') at erd_tool.js?ver=81400:1:814537 at Array.forEach (<anonymous>) at t.default.removeOneToManyLink (erd_tool.js?ver=81400:1:814445) at erd_tool.js?ver=81400:1:810413 at Array.forEach (<anonymous>) at erd_tool.js?ver=81400:1:810398 at Array.forEach (<anonymous>) at t.default.removeNode (erd_tool.js?ver=81400:1:810357) at erd_tool.js?ver=81400:1:835931 at Array.forEach (<anonymous>)

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version: 8.14
  • Mode: Server
  • Browser (if running in server mode): Firefox @ ver 133.0.3
  • Package type: Python, installed via uv tool install

Additional context

Of note, this is an ERD for tables that do not actually exist in the database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions