Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

[BUDI-7620] The web interface hangs when the Relationships tab should be opened. TypeError: Cannot read properties of undefined (reading 'tableName') #12044

Closed oboehlk closed 9 months ago

oboehlk commented 1 year ago

Hosting The error occurred with my app both in the self-hosted environment and in the cloud.

Describe the bug The web interface hangs when the Relationships tab should be opened. Chrome DevTools: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tableName')

To Reproduce Steps to reproduce the behavior:

  1. Go to Apps -> MyApp -> Edit -> Data -> DataSource (MySQL) -> Relationships-Tab
  2. web interface hangs -> Chrome DevTools:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tableName') at index.318f92fa.js:1645:18928 at Array.map () at l1 (index.318f92fa.js:1645:18879) at n1.$$.update (index.318f92fa.js:1645:19829) at init$2 (index.318f92fa.js:4:11078) at new Relationships (index.318f92fa.js:1645:19935) at Array.create_if_block_2$10 (index.318f92fa.js:1648:12295) at Object.p (index.318f92fa.js:1648:15296) at update_slot_base (index.318f92fa.js:1:1002672) at Object.p (index.318f92fa.js:34:20043)

App Export I don't want to make my application public here because it also contains the credentials for my data sources.

Desktop

BUDI-7620

PClmnt commented 1 year ago

Hi @oboehlk Can you remember what sort of relationships you had in place? one to many, many to many? Mix of both?

oboehlk commented 1 year ago

I think a mix of both... I'm doing some digging around here and noticed that "h1" is undefined at this point. Bildschirmfoto 2023-10-12 um 12 33 57

PClmnt commented 1 year ago

@oboehlk yea interesting that table name is undefined - Had you created any new relationships recently? As in since the latest release?

oboehlk commented 1 year ago

No, I had only created a new internal DB and deleted it again and created two MySQL tables and deleted them again. I imported older backups of my app, everything works there. Maybe a defect in the export file? Maybe some "garbage" was created?

PClmnt commented 1 year ago

@oboehlk https://docs.budibase.com/docs/troubleshooting-sql

Do you think you'd be able to share your schema? Even privately as mentioned in the documentation link. I'm unable to reproduce this on my own setup.

oboehlk commented 1 year ago

@PClmnt Ok.

oboehlk commented 1 year ago

Just sent it to support@budibase.com. I could also provide the entire export file privately. There are names of people in a data table which should not be shared. Furthermore it would be important to me that my MySQL data sources are not changed.

oboehlk commented 1 year ago

The problem is solved for me now. But it may be dangerous if corrupt export/import files can be generated. Maybe it would be useful to check them for possible errors during import to avoid similar problems.

PClmnt commented 1 year ago

The problem is solved for me now. But it may be dangerous if corrupt export/import files can be generated. Maybe it would be useful to check them for possible errors during import to avoid similar problems.

I understand and thank you for providing the schema, I will try and replicate with that same import flow you mentioned before! Glad it's solved for you right now.