Application opens in dark mode

From time to time when we open the application, the application opens in dark mode and we can’t get it back to normal mode unless we close the app and open it again. Unfortunatly, it seems like this is happening at random as we are not able to recreate it, but multiple users have experienced it. Have anyone else experienced this? We do not want it to open in dark mode, and if so, it should be an easy way to get it back to normal instead of closing and reopen the application.

Hi, and welcome to the Community!

What do the themes look like in the app? Is there a dark theme available there which randomly comes up, or is there just one theme?

As for a possible way to fix it, without a refresh:
In DevTools, there is a built-in App Variable called Active Theme which shows the theme which is currently in use. There is an action node called “Set Theme” which can control the current theme. This can be connected to a Switch component for instance, to toggle easily between light and dark mode. Some users may prefer dark mode, so this can also be stored as a property of type Theme on a Person/Employee object, for instance.

An example of a similar setup is available in the Appfarm Showroom.

Rhys

Hi, and thank you!

There is no a dark mode available as far as I know. Normally it looks like this:

Regards, Celine

Hi,

I have heard internally from another solution where something similar happened a few weeks ago, shortly after a deploy to Production. The problem solved itself after a few minutes, pointing towards some model changes during a Production deploy. Can you confirm if the timing lines up with some deploys to Production in this solution? Does this happen in other environments, or just Production?

Rhys

Hi,

Our last deploy was 2 weeks ago, and the first time we experienced this was after that deploy. The last time this happened was last Friday as far as I know, so it has lasted moe then a few minutes after deploy. Do you think it can be solved by depolying again? It only happens in production.

Celine

Hi,
It is difficult to say with certainty that a new deploy will solve it, without knowing what the cause is. Especially when it is not recreatable in other environments.

Another deploy can certainly be attempted, to see if this helps. What would be most helpful is a screen recording of it happening, with an insight into the state of App Variables such as “Active Theme” and other data, to see if it is a bug related to these data. Anything that can help us narrow down the cause is very helpful, but it is of course most preferred if it does not happen again.

Rhys

Thank you. It’s difficult to record it when we don’t know how to recreate it and don’t know what’s causing it. It will be possible to record after it has happened, if it happens again. I will leave it for now and hope that it does not happen again. If it does happen again, I will try to reccord it and post it here.

Celine

1 Like