Display problem

Hello !

I have a problem with the display of my ionic app.

When i run my app in my browser, I have this display, which looks outdated :

And when i refresh the page, I have the good display:

How can I do to not have to refresh to have the good display ? Because we can’t refresh on real device ahah
Thank’s in advance.


I suspect you have a race condition. Carefully audit all your code that relies on asynchronous tasks to make sure you are not relying on results before they are ready.

Thank’s i’m gonna look for it

Okay after few tests I know that it’s not a race condition. Actually, when the project is running, it’s only when i toggle the device toolbar on (Google Chrome) that when i refresh it have the good display. When i refresh the page without the device toolbar, the display is still the wrong one. And also still the wrong display on real device.

Every single time I have encountered the symptoms you describe, the proximate cause has been an uncaught exception that short-circuited the ordinary rendering cycle. So the first thing I would do is to inspect the JavaScript console and look for those.

Furthermore, whenever I’ve encountered intermittency with errors like this (“works in browser, not on device”, “fixes itself after pressing refresh button”), the ultimate cause has been a situation where I failed to properly initialize something, relying instead that some asynchronous task had resolved fast enough to save me from myself.

So, if your situation turns out to be different, it would be great if you could take the time to come back and summarize what was going on, so that I can recalibrate my instincts about such problems.

Okay thanks, i’m gonna look carefully and i’ll tell you when i find