Subject: Persistent app.initialized() Loading Issue

Dear Freshworks Community,

We are currently facing a unique and persistent issue with our React application, especially when utilizing React 18. the application consistently fails to advance beyond the app.initialized() stage. This erratic behavior results in the application occasionally loading, but more often than not, it remains stuck.

In an effort to resolve this issue, we have experimented with several solutions, including the implementation of both useEffect and useLayoutEffect hooks, as suggested by recommendations we encountered on a forum. Regrettably, these attempts have not remedied the loading problem.

When we downgrade React to version 17.0.1, the application works as expected. However, we encounter the issue of stuck loading at the app.initialized() stage when using React 18.
but, we need react 18.

Furthermore, we have officially submitted a ticket to the Freshworks support team concerning this issue and have included all relevant details in our communication.

Hi @rahul_mayan

I have utilized a React 17 starter project and updated the packages to version 18. I have verified whether the client loaded(app.activated) after the app initialization.

I would like to request you to try it out.

  • React has been updated to version 18.2.0.
  • The rendering part in index.js has been updated as follows:
    React.zip (930.0 KB)
ReactDOM.createRoot(document.getElementById('root')).render(
 <React.StrictMode>
   <App />
 </React.StrictMode>
);

Other than that, everything is similar. Let me know if any specific use-case is failing for you.

Hello @vangakirankumarreddy ,

I have attempted to use the code you suggested for React 18.2.0. However, we are still experiencing an issue with the application getting stuck during the app.initialize() process.

Hi @rahul_mayan

Could you please provide a sample use-case or a demo video link demonstrating the issue you’re experiencing?

Hello @vangakirankumarreddy

we found that our app is still loading at app.initialized , and it doesn’t show any errors. I’ve attached a screen recording link below for your reference.

https://drive.google.com/file/d/111lxxQX66WdxgMAzckUGLq7CRnvNJjGJ/view?usp=drive_link

@rahul_mayan

Is it possible to share the app zip file with the code related to your functionality removed, while retaining the issue-related code?

Hello @vangakirankumarreddy

This is the file we used. You can replicate the issue using this file
React.zip (360.3 KB)

@rahul_mayan

I have noticed few files missing as part of the zip. I have included and verified.


React-Testing.zip (931.2 KB)

Note : Please install node-modules and verify if it’s works or not

Hello @vangakirankumarreddy ,

We’ve installed and run the app again, but it still isn’t functioning, and we’re experiencing the same error.

Screenshot from 2024-04-12 17-19-36

Hi Rahul,

We couldn’t replicate this issue to troubleshoot it from our end. Can we have a call to troubleshoot the issue in your system at your environment and have a live debugging session?

If it works for you, please check the private message where I have shared our office hours link to block a time on our calendar to have this live debugging session. Thanks.

@Raviraj Were you able to fix this issue?