Can't log into backend in Chrome, Firefox, etc


#1

Hello,

I can only log into the backend in the internet explorer.
But Chrome, Firefox, etc … does not work.

Could that be related to the fact that I do not use an https certificate for my development system.


Login admin page Refreshing
#2

Hi,

any error message? Have a look at chrome debug tools.

Regards


#3

No,
nothing that I would relate to the problem.

only This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m

Error log is clear as far as I can tell.


#4

Hi,
I have the same problem with a fresh installed version (with the twig example).


#5

Hi,

can you check if any login request gets send when clicking the Login Button?

Regards
Dominik


#6

Ok, this seems weird.
When I try to login then a POST is sent with the right username and the right password.
Then I get redirected to something like:
“Domain.local/admin/?dc=1502892957” (which is like the adress appearing in the internet explorer, when using the backend).
But in Firefox I get further redirected to:
“Domain.localhost/admin/login”

That would explain why I always get the login page, instead of the admin interface.

So why is it redirecting me to the login page, instead of the admin interface?


#7

I also have trouble accessing Pimcore Admin (developing on Windows 10 with a valid SSL certificate).

Initially I was running out of memory (PHP 2GB limit) until I turned off some debugging. Now it’s a bit hit-or-miss. Sometime it loads, others it partially loads but some XHR requests fail and I’m prompted to reload the admin interface. e.g.

/admin/object/tree-get-childs-by-id?_dc=1502953662901&limit=30&view=&node=1

The XHR problems have been around since the move to ExtJS 6.

I’d suggest trying to disable some of the debugging to see if that allows it to load. I commented out a couple of linesin pimcore/config/kernel.php which enable debug mode if environment is ‘test’


#8

Hi,

I now deactivated all dev and debug modes and I setup the maintenance (and waited a run).

But I still have the same problem.

The request is certainly proccessed. When I try to login with a wrong password, I get a error message about it.

Very weird.


#9

Hi,

I digged a little into this problem.
Pimcore is not getting a user via token in Pimcore\Bundle\AdminBundle\Security\User\TokenStorageUserResolver called from Pimcore\Bundle\AdminBundle\Controller\AdminController at function “protected function getUser()”

In the internet explorer I get a Pimcore\Model\User Object and in Chrome I get a “/Pimcore/Bundle/AdminBundle/Security/User/TokenStorageUserResolver.php:64:string ‘anon.’”

Maybe this helps??

I will keep looking into this as soon as I can. But would be thankful for ideas :slight_smile:


#10

It now works,
I had to reset my chrome browser completely and then it worked.
So I guess there is some privacy option preventing the login.

I still got the problem in firefox.

greets axe


JS/CSS files for backend UI plugin
#11

Ok,
after encountering the problem again and again I finally solved it by putting my developer site on the chrome whitelist.
It seems that chrome and firefox handle local domains differently (my dev system is on a .local domain).
Since I added the URLs to the whitelist everything works fine.

Thread closed I guess, maybe the info helps someone with similiar issues


#12

I’ve been having similar problems so will give this a go.

Looking at Firefox’s profiler I can see some XHR requests often time out as Pimcore admin loads but when tried individually return a response almost instantly so it looks like there is some sort of race condition or bottleneck.

One thing I tried that seems to be helping was to set PHP’s session handler to use redis instead of files (in php.ini):

session.save_handler = redis

Aparenly using the default value “files” can cause a bottleneck when there are multiple concurrent XHR requests in the same session. One request can fail to get the session file as it is locked by another request.


#13

In case anyone else comes across this looking to improve Pimcore’s Admin section on a Windows PC, the solution that seems to work best so far was to create a Redis session handler as described here:

In case link breaks, this involves setting up a Custom Symfony SessionHandler something like:

namespace AppBundle\Session;

use \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;

/**
 * NativeRedisSessionStorage.
 *
 * Driver for the redis session
 *
 * @see https://github.com/nicolasff/phpredis
 *
 * @author Andrej Hudec <pulzarraider@gmail.com>
 * @author Piotr Pelczar <me@athlan.pl>
 */
class RedisSessionHandler extends NativeSessionHandler
{
    /**
     * Constructor.
     *
     * @param string $savePath Path of redis server.
     */
    public function __construct($savePath = "")
    {
        if (!extension_loaded('redis')) {
            throw new \RuntimeException('PHP does not have "redis" session module registered');
        }
        
        if ("" === $savePath) {
            $savePath = ini_get('session.save_path');
        }
        
        if ("" === $savePath) {
            $savePath = "tcp://localhost:6379"; // guess path
        }
        
        ini_set('session.save_handler', 'redis');
        ini_set('session.save_path', $savePath);
    }
}

I then used Docker to set up a redis server which seemed the easiest way to do it.

I now get a lot fewer “Server threw exception - could not perform action. Please reload the admin interface and try again.” messages


#14

I had the same problems. As you advised - I reset my chrome browser completely and then it worked. I want to say a big thanks for your useful site. Moreover, I wrote my medicine topic essay and everything disappeared. I found a valuable answer here. Please keep it good posting!


#15

I just had this same issue. It wasn’t working in any browser. After spending quite a while debugging it I found out it was a session issue.

I initially copied all my files over to a remote server and that included the var folder as well. there was already a session in there from my localhost which was causing it.

So the fix is to ignore the sessions folder when copying your files to the server. If you do the empty the contents of var/session and you should be good.