Issue
I am experiencing an issue in my self-hosted Appsmith app where a query that should return an empty table is causing the app to crash and display an error message. The query runs successfully in MYSQL Workbench, but when I try to run it in Appsmith, I get a TypeError in the browser console. The problem still persists even when limiting the dataset to only 5 rows and occurs with both MYSQL and Postgres databases. The Appsmith version I am using is 1.7.2. I had a zoom call with Appsmith support, and they are investigating the issue and have created a bug report on GitHub.
Resolution
There is currently a bug in Appsmith where running a query that returns zero rows can cause the app to crash, resulting in an error screen. This issue has been reported by multiple users on both self-hosted and cloud instances, and has been identified as a bug in version 1.7.2 of Appsmith.
To work around this issue, users can try adding a limit to their query or manually adding a row to the table that meets the query’s requirements. Alternatively, users can try creating an app on the cloud instance and inviting support@appsmith.com to their app for debugging.
The Appsmith team is actively working to address this bug and has created an issue (#14584) on their GitHub page where updates and solutions will be posted.