security.login fails on New Workspace

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

security.login fails on New Workspace

Postby john1598360627 » Tue Nov 29, 2022 2:33 am

viewtopic.php?f=69&t=23656

PROBLEM
I have figured out an issue with security.login when creating a new workspace.

For version control, I create a new workspace for every new version of the project I'm working on. That way, if an issue occurs in between versions it's easier to rollback or catch the problem that manifested.

Recently, I implemented a login screen. However, creating a new workspace and importing this version with a login screen resulted in not being able to login. This is strange, because I was able to login just fine in the original workspace.


I tried;

* Stepping through the debugger
* Doublechecking the login credentials within the SQL Database
* Spamming login to see if it'll magically fix itself
* Waiting a long time to see if it'll magically fix itself


... None of these worked.

SOLUTION

However, opening up the 'User and group security' page that showcases the defined user groups DID FIX IT.

WHY?
I'm... not sure why exactly. What I'm assuming is going on is that despite security.login getting correct user credentials, since the User Group isn't getting initialized it's internally failing. Opening up that 'User and group security' page seems to wake up the projects initialization to see that the User groups are infact defined.


Despite me finding this soft-fix, I'd say it's worth it to fix this officially as this could be a catastrophic bug if there wasn't a way around it. Since not being able to login would make the project unusable.
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: security.login fails on New Workspace

Postby sean » Mon Dec 05, 2022 7:15 pm

Hi John,

1. Why not use a revision control system, like a git repository?

2. Regarding the failed login, can you provide more info? Did you get an error? By default, the users/groups are stored in the resources project folder in the workspace. It could be that when you made a new workspace, you didn't create or copy your resources project? A user must have at least one group to login.
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: security.login fails on New Workspace

Postby john1598360627 » Tue Dec 06, 2022 2:42 am

sean wrote:Hi John,

1. Why not use a revision control system, like a git repository?

2. Regarding the failed login, can you provide more info? Did you get an error? By default, the users/groups are stored in the resources project folder in the workspace. It could be that when you made a new workspace, you didn't create or copy your resources project? A user must have at least one group to login.


1. WHY NO GIT?
Was just way too finicky to setup. Creating a fresh workspace is basically just an offline git anyways, and honestly is better than using Git due to how Servoy updates. By making a fresh workspace for each new edition of the project we can confirm where problems are manifesting. Case in point with this login problem.

Like if there's a problem with creating a new workspace and importing projects... that seems like a very fatal issue.


2. ERROR?
No error appears. Well, only that security.login returns 'false' initially.

Again, it's an easy 'fix' all I do is open up the 'User and group security' page. I don't do anything else, just opening up that page fixes the login. It's quite odd.

From what you are describing, for some reason new workspaces are having an issue reading the resource files. And that me opening up the 'User and group security' refreshes the project reading the resource files.


DEMO?
I'm going to assume that a demo will be required to showcase this problem. Once I have time open I will create a demo project to showcase the problem.

I'll report any findings after doing that too. As perhaps somehow my specific project got corrupted in an update.
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: Google [Bot] and 7 guests