Page refresh needed after installing an ticket sidebar app in Freshservice


We have built the app clone ticket for Freshservice. This app clones the ticket in Freshservice. When we install the app, in the sidebar we are facing an issue. In the sidebar it displays all the error messages and the app doesn’t work. Once the whole page is refreshed the app works fine. We face this issue only during the first time after the installation. This issue occurs 5 out of 10 times. We have analyzed this issue from our side. When we inspected we received an error message. The Screenshots are attached for your reference.

Can anyone help me out on resolving the issue I am facing. Happy to share more information if needed.

Thanks in Advance.