While working with the Cosmos React UI in App Studio we came across an interesting issue. The issue is that if a attribute (property) used in a view is deleted/updated then the view gets corrupted.
The view no longer opens up from the App studio for the developer to fix the error there's only a cryptic error message "Something went wrong." in the app studio
The browser console points is a little more help indicates the following error
TypeError: Cannot read properties of undefined (reading 'embeddedTypeKey')
at Mi (19008.d56ae9e2.js:1:151444)
at Array.map (<anonymous>)
at Object.useMemo (react_root.23f82a81.js:2:244213)
at t.useMemo (react_root.23f82a81.js:2:322423)
at Zi (19008.d56ae9e2.js:1:153016)
at Ki (react_root.23f82a81.js:2:239361)
at kl (react_root.23f82a81.js:2:285411)
at gs (react_root.23f82a81.js:2:278153)
Has anyone come across a way to fix this issue ?
***Edited by Moderator: Pooja Gadige to add capability tag***
Whenever we configure anything related to UI from app studio in cosmos react, pega creates a view and renders all the configured elements in that view. View is an instance of class Rule-UI-View. In the view pega stores element's related configurations in JSON format.
Please review the view from the dev studio by opening the instance of Rule-UI-View.