Login to panel issue


#1

Sometimes when I try to login to the panel on localhost or even on a live server, I get this problem.

I write username and password and click “Log in”. The fields will be cleared but that’s it. Nothing more happends.

  • It does not always happen. It appears to be random. Sometimes it just happends. It usually happends every two days.
  • It seems to have something to do with sessions, because when I try again it still does not work. In another browser where the session is not yet set it works.

Is it a known issue? Anyone else seen this?

I tried to find a Google Chrome extension that cleared the session of the current tab, but I could not find any.


#2

Does it only happen in one browser? Have you tried disabling all Chrome extensions? If you do so, does the problem persist?


#3

There are definitely some glitches in the very recent versions of Webkit. Ive had some frustrating problems lately that go away if I use Firefox. This is annoying because I like Opera as my main browser. Does your issue only happen in webkit based browsers (Safari, Opera, Chrome)?

My current major issue is that about a week ago, I cant view any website on my local system served with Valet and launched via command line (Laraval Mix) through a browser sync proxy. (The proxy works but hitting the site directly does not work). I think theres a hideous bug in Webkit to do with Javascript. Everything works great with Firefox. Vivaldi works too.


#4

@texnixe

To test it I need to use Firefox, or Chrome without extensions for like 2 days. I have not done that.

@jimbobrjames

I did not put 2 days of effort to test it out. But if you have some problems as well it’s at least a possibility that it has something to do with Webkit.


#5

For me, it doesn’t sound if the two issues here are related.

I’d like to ask you, @jenstornell, to test if it works in another - preferably fresh - browser. I have never had issues logging in to the Kirby Panel in any of my browsers on Mac, and therefore can’t reproduce this.

Would be interesting to know if you only have this issue with the Panel - or with logging into other accounts as well.

Maybe if others have the same issue when trying to log in, we can collect more information.


#6

It works well in all fresh browsers, even Chrome. I don’t have this issue on any other login like Github, Gmail, Stackoverflow, Kirby Forum, Slack etc.

One thing I can say is that this problem always seems to appear after being logged out. The panel throws me out after a few hours. Then when I try to login it works most of the times but sometimes this happends and then I’m “locked out” for the rest of the day in Chrome at least.


#7

Maybe related to this issue? Bug or not on session_destroy?


#8

Maybe. Sessions is clearly not my strongsuit. When I get this problem I will just run Firefox for the Panel for now. Hopefully me or someone else can provide more info about it in the future, or it will solve itself by Webkit Xampp or something else.


#9

Maybe you can provide some more information about your environment. You say it happens both remote and local, right? Your local environment is Xampp on a Windows machine, Chrome Browser Version/extensions? I currently don’t have a Windows machine but should get a new one next week or so.


#10

Your local environment is Xampp on a Windows machine, Chrome Browser Version/extensions?

Yes.

Right now I have these extensions:

  • Awesome Screenshot App 1.0.7
  • Dokument 0.10
  • Google Dokument Offline 1.4
  • Google Hangouts 2017.420.419.1
  • Google Inbox Checker (Inbox by Gmail) 1.0.16
  • JavaScript Errors Notifier 3.1.2
  • JSON Formatter 0.6.0
  • Kalkylark 1.2
  • LastPass: Free Password Manager 4.5.0
  • List Layouts for Trello 3.1
  • Minimalist Markdown Editor 3.4.1
  • Postman 5.4.0
  • Presentationer 0.10
  • r3fresh 0.0.7.0

My girlfriend also have had this problem, but that was on a live Linux server/website. So it’s not bound to a local environment and not bound to my computer. She also uses Windows. We often work together like this, that I code and she write the content text.


#11

Does last pass try to fill in your Kirby password? What happens with another user account that Last pass knows nothing about?

Hint (nothing to do with your issue): I use a neat little desktop app for Hangouts, so you can at least get rid of one extension :slight_smile:


#12

What about antivirus / anti malware stuff? Have you got anything that might interfere? Some firewall and anti virus tools have browser extensions to warn you about malicious sites. Perhaps thats interfering?

Is your internet connection clean? No VPN’s, gateways, proxies or anything?

Just a wild idea, but the developers i used to work with used Fiddler to see the data back and forth between browser and server. Maybe that will help? Might show whats getting in between you and the server and preventing login. Don’t ask me how to use it :slight_smile:


#13

I dont know if my problem is related to yours - but i fixed ‚my‘ problem with a ssl certificate on my local mamp installation. I‘d the same problemes and no error messages like you. But with a self signed ssl certificate it works right know in all Browsers.


#14

I’ve been having the same problem on a live site and I’m trying now to sort out the cause. When I sign in with (correct) username/password, the page just reloads /panel/login but if I sign in with incorrect credentials, I do get a red error message on the page. That leads me to think it’s a redirect issue or something with a session not being set properly.

I’ve tried removing custom htaccess rewrites, tried other browsers, tried with/without SSL in the URL, with/without SSL being forced in the config, and gone so far as to (finally) add a LetsEncrypt SSL cert to the live site to be sure it wasn’t a bad cert.


#15

Ok, I think I got it.

I think existing user account files (/sites/accounts/*.php) need the line role: admin added to them.

Here’s what I did to figure that out:

1.) Made a new folder x in /site/accounts and moved all *.php files into it
2.) added c::set('panel.install', true); to /site/config/config.php
3.) went to https://[SITENAME]/panel and created a new account.
4.) compared the new [NAME].php to the existing /site/accounts/x/[NAME].php

The newly created account file had an additional line: role: admin which was absent from the existing one.
So, I went through all the *.php files in /site/accounts/x/ and added role: admin

Then, I deleted the new [NAME].php file and moved the existing account files in /site/accounts/x/ to /site/accounts/

When I signed in again, it worked as expected.


#16

While your users have to have a role, it doesn’t have to be the admin role. The default roles are admin and editor, but you can define your own roles as well.

How did you create your users so that the role was missing?


#17

The site has been running for a couple years, so I think the role: * probably got added to the config system later. (I don’t see anything about it in the docs.)

Maybe a test could/should be added to check if that’s missing and throw a display error or assume a specific role. Maybe that’s already in there. It could have been something else of the panel install process that fixed the issue, but that was the only change I could spot.


#18

@maxfenton Ok, I can reproduce your issue with the missing roles. However, the problem with missing roles is not related to the problem described by @jenstornell, where the issue of not being able to log in to the Panel only happens intermittently. But it’s good to know, anyway.

The role is added when a user is created via the Panel. If the role is missing, the user was probably created some other way, manually or programmatically. Or maybe roles didn’t exist prior to Kirby 2, can’t remember.


#19

I really like all the research that does into this issue, but I’ve checked my user role and it’s set to admin in the user file. So in my case it’s the same cause.

I can also confirm that the redirect problem only appear when the username and password is correct. Else an error is thrown.


split this topic #20

A post was split to a new topic: Error when trying to log in to Panel