Smartedit stays gray instead of showing login screen

514 Views Asked by At

Our Smartedit stays gray for a long time before login. The Browserconsole shows an error:

ERROR Error: PromiseUtils: condition for promise resolution was never met

The error was from the "configuration" Request that result in a 401 Unauthorized (which should be normal, since the login was not yet done.

After multiple Full Reloads sometimes the login box appears. Sometimes also after a very long waiting, but we found no pattern yet. How can we prevent this?

2

There are 2 best solutions below

0
On BEST ANSWER

The 401 Error really seems not to be the problem, this is just a normal behavior if not user is logged in.

We got rid of the error using a workaround in our Apache2 reverse proxy. We add the following caching headers to the translation requests to make them better cachable:

    <Location /smarteditwebservices/v1/i18n/translations>
        ExpiresActive On
        ExpiresDefault "access plus 1 hour"
        Header set Cache-Control "max-age=1800, public"
    </Location>

This makes our situation much better. The translation json takes very long to load (see answer of Johannes) and causes a race condition with the Smartedit Javascript code.

1
On

Same problem here. I feel like the 401 is not related to your problem. It also occures if the login screen works. In our case the problem seems to be a JS timeout because /smarteditwebservices/v1/i18n/translations/{locale} takes way to long to load. Dynatrace tells me that the time is used at 97% CPU for de.hybris.platform.util.GZIPServletFilter.doFilter . So I assume there is some super bad algorithm in place to zip the http response.

We have not solve the issue yet. But this seems like a good starting point for an analyis.