appsmith: TypeError: Cannot read properties of undefined (reading 'properties')

Sentry Issue: APPSMITH-36T

TypeError: Cannot read properties of undefined (reading 'properties')
  at c (pages/Editor/WidgetsEditor/CanvasContainer.tsx:70:50)
  at next (RouteParamsMiddleware.ts:125:10)
...
(45 additional frame(s) were not displayed)

Discord user query: https://discord.com/channels/725602949748752515/1013630823410434070/1013950513018048644

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

@somangshu so here is the context of the solution:

  • Whenever we get no response from the server for the API that fetches the selected theme
  • Then we fetch all the system themes and apply the default/Modern theme to the application

@keyurparalkar kindly drop in context on the solution we are building right now

@somangshu : I have added a migration in the following PR : https://github.com/appsmithorg/appsmith/pull/16496

This will fix the existing applications and get them to a sane working state. But this would NOT stop from applications from reaching this state.

Hey @somangshu, the error we notice above happens in code related to theming, and the root cause is that selectedTheme was not available.

We have noticed this happening only for apps that are git connected. cc: @AnaghHegde could add more info on in what scenarios selectedTheme is not available.

Also, maybe we should handle the selectedTheme fetch error case on the frontend too. It shouldn’t result in crash for a user instead it could show error message “Unable to fetch selected theme” and use a default theme to display UI.

cc: @somangshu @jsartisan let us know your thoughts.