Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Notifications
Clear all

Login bug

34 Posts
3 Users
0 Reactions
32.3 K Views
(@n247s)
Posts: 9
Active Member
Topic starter
 
[#3188]

Hey,

Im currently trying to host Projeqtor on an ftp Server with all the requirements.
But there is an annoying bug? with the login.
Everytime I login, it will add "?lostConnection=true" to the url, and instantly connect/disconnect after login (only when remember password is enabled!)
After some time (not consistent in length!), it will stop, and you will either be logged in, or you'll get a warning that you couldnt login.

Now there are 2 other post I could find which described a simular problem, but no solution has been found yet.
So here is some information if you need.
I added the projecqtor.log file to this post (if its working correctly).
And there are several warnings, and crashes to find in the browser console.
one states, "Cannot find Property "InnerHTML" for item NULL"
and the other states: SyntaxError unexpected token;
": error loading Documents children: " SyntaxError: Unexpected token

dojo.js?version=V5.2.5.0133:15 SyntaxError: Unexpected token <(…)_3c4 @ dojo.js?version=V5.2.5.0133:15(anonymous function) @ dojo.js?version=V5.2.5.0133:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15reject.errback @ dojo.js?version=V5.2.5.0133:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15resolve.callback @ dojo.js?version=V5.2.5.0133:15(anonymous function) @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_31b @ dojo.js?version=V5.2.5.0133:15_327 @ dojo.js?version=V5.2.5.0133:15
projeqtorDojo.js?version=V5.2.5:15 Object {_attachPoints: Array[3], _attachEvents: Array[0], _connects: Array[0], _supportingWidgets: Array[0], id: "documentDirectoryTree"…}_attachEvents: Array[0]_attachPoints: Array[3]_connects: Array[0]_created: true_inherited: Object_itemNodesMap: Object_keyNavCodes: Object_onNodeMouseEnter: ()_onNodeMouseLeave: ()_openedNodes: Object_outstandingPaintOperations: 0_rendered: true_started: true_stateClasses: Array[1]_supportingWidgets: Array[0]_watchCallbacks: (name,_3d5,_3d6,_3d7)containerNode: div.dijitTreeContainercookieName: "documentDirectoryTreeSaveStateCookie"destroy: ()dndController: ObjectdomNode: div#documentDirectoryTree.dijitTree.dojoDndContainerexpandChildrenDeferred: _3e6id: "documentDirectoryTree"indentDetector: div.dijitInline.dijitTreeIndentmodel: ObjectonClick: anonymous(item /**/)onLoadDeferred: TMPopenOnClick: falseownerDocument: documentownerDocumentBody: body#body.tundra.ProjeQtOrparams: ObjectpendingCommandsPromise: PromiserootLoadingIndicator: div.dijitTreeExpando.dijitTreeExpandoLoadingrootNode: ObjectshowRoot: falsetree: Object__proto__: Object ": error loading Documents children: " SyntaxError: Unexpected token <(…)(anonymous function) @ projeqtorDojo.js?version=V5.2.5:15_b50.errorHandler @ projeqtorDojo.js?version=V5.2.5:15(anonymous function) @ dojo.js?version=V5.2.5.0133:15(anonymous function) @ projeqtorDojo.js?version=V5.2.5:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15reject.errback @ dojo.js?version=V5.2.5.0133:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15resolve.callback @ dojo.js?version=V5.2.5.0133:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15reject.errback @ dojo.js?version=V5.2.5.0133:15_189 @ dojo.js?version=V5.2.5.0133:15_187 @ dojo.js?version=V5.2.5.0133:15resolve.callback @ dojo.js?version=V5.2.5.0133:15(anonymous function) @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_3ed @ dojo.js?version=V5.2.5.0133:15_3e7 @ dojo.js?version=V5.2.5.0133:15_3e1 @ dojo.js?version=V5.2.5.0133:15resolve @ dojo.js?version=V5.2.5.0133:15_31b @ dojo.js?version=V5.2.5.0133:15_327 @ dojo.js?version=V5.2.5.0133:15

Edit:
There is some kind of loop going on, which directs right back to the loginpage. (while the startpage is set to something else!)
And it seems like the "?lostConnection=true" part is added in that loop.
I hope this was helpfull information.

Thanks for your time,
I hope this will be fixed a.s.a.p.

N247S


 
Posted : 26 Mar 2016 1H18
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Hi,

Thanks for delaing the issue as you did.
I wish everyone details this way :whistle:

So I had a llok to log file.
Setup of database is complete without error 🙂
Then some PDF generation issue (in TCPDF) : not blocking (if you remember how you generated these issues, it could be a good opporunity to fix it 😉 )
Then some SMTP connections issue : possibly some tests you made, nothing blocking
Then we have loops of connections, that look like successful logins but that are not are they are looping, with about 1 connection for same user every second.
This connection indicated to use the "remember me" function. So it may be a cookie issue.
Try and clean cookies and connect without checking the "remember me" function.
If it works (I hope it will), then try and reconnect, activating the "remember me" function, close browser and reconnect. It is working fine now ?
If issue is not fixed with cleansing of cookies, in the browser console go to network tab and check response for looping request (I guess it is a request for loginCheck.php). Poste content of response here.
NB : the "SyntaxError: Unexpected token <(…) " often appears when json response is expected and a PHP error is displayed instead. So the PHP error will help 😉


 
Posted : 26 Mar 2016 12H59
(@n247s)
Posts: 9
Active Member
Topic starter
 

Thanks for your reply,

Yea, there were some other problems as well (as it turnes out :P)
I haven't setup the system myself, so I am not able to help you with the TCPDF and SMTP problem unfortunatly.
As far as the login problem goes, I have tried to dig into it a litle bit, but I cannot acces every file, but Ill try to describe where I think the looping starts:

first of all, the login is succesfull, and loads the start page etc.
than it calls a bunch of methods from "saveDataToSession.php".
that results in a call to "cronRelaunch.php" and "welcome.php"

after that it loads some stylesheets and documents from an unknown place (no path or Initiator defined), but it seems like a default initializing.
And right after that it loads "main.php?lostConnection=true"

Unfortunatly I cannot acces any files(appart from the last .php file) to give you more detailed information.
But what I can do, is creating a dummy profile so you can debug it by yourself. maybe that helps a bit better.
(its always better to be able to debug problems yourself :))
I'll PM you the login data.

N247S


 
Posted : 26 Mar 2016 15H25
(@n247s)
Posts: 9
Active Member
Topic starter
 

I have send you the login information,
Good luck with testing & debuggin!

N247S


 
Posted : 27 Mar 2016 15H05
(@bosimo)
Posts: 12
Active Member
 

Hello,
I had the same problem and initiated a topic "Lost connection" on this forum one day before yours.
I made a copy of my projeqtor into another environment : from linux/Apache/php5.5 to windows/XAMPP/PHP5.6, the problem is the same.

I tried some investigation and I think I found something which may be useful :
The problem is linked to script "/tool/projeqtor.php" which is called through a "require_once"
It generate an error message "Unexpected termination of execution of PHP script" but as it's not catched and the file is included, this error doesn't appear on the log files
This error can happens after an execution of login, an access to the home page or anytime this file is needed, but not all script executions.

Hope this information can help to resolve this issue.

Thanks & regards


 
Posted : 28 Mar 2016 6H56
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Thnaks for the hint.
It confirms my idea that there is a non reported issue during connection.
The hint that it comes from projeqto.php does not really helps, as this script is called for each request : it is the core or ProjeQtOr.
But as I cannot reproduce, I guess it is linked to either some configuration or some content of database.

1) Which version of PHP are you using ?
2) Which mode is used : FastCGI, mod_apache, ?
3) What is the standard duration of a connection (when it works) ?
4) Do you remeber what change you made (insert activity, rename user, ....) just before the issue first occured ?

Do you have the possibility to do some debugging ?
The idea is to set
$debugLevel=3;
in parameters.php,
then add some lines
debugLog("step01");
...
debugLog("step02");
...
every 10 or 20 lines in projeqtor.php.
I can provide the projeqtor.php with accurate debugging...


 
Posted : 28 Mar 2016 11H03
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Find attached projeqtor.php file with some debugging lines
unzip and copy it in /tool/ directory after renaming existant as projaqtor.php.ol (to be able to revert to non debuggin code)

Then set $debugLevel=3; in paramerters.php.
Run ProjeQtOr and post log files.

Thanks


 
Posted : 28 Mar 2016 11H31
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

I have send you the login information,
Good luck with testing & debuggin!

N247S

I received the login information,
but not the url ... 😉


 
Posted : 28 Mar 2016 12H30
(@n247s)
Posts: 9
Active Member
Topic starter
 

I might be a little bit stupid 😛
I'll send you all the information this time 🙂


 
Posted : 28 Mar 2016 14H04
(@bosimo)
Posts: 12
Active Member
 

Hello,

I made the debug, attached the log file.
To make it easy to follow :

  • First part : old data navigation
  • Second part : first login try after activating debug with no remember me option >> I didn't get logged in, I was back to login page
  • Third part : login after activating no remember me option >> I got an error message

Hope it helps.

Thanks & regards


 
Posted : 28 Mar 2016 15H53
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

OK,
thanks for the log.
So there is nothing weird in the trace, login seems complete.
Only issue is my mistake : line 188 in projeqtor.php should be :

        debugLog("projeqtor.php - Step09 - user found=#".getSessionUser()->id);

But this is an issue only for "remember me" reconnection.

But with login provided by N247S I could find something weird.
On his version, the filed isLoginPage is not submitted, although it exists in the form.
With same browser on my Dev install all is fine and this field is submitted.
Could you try this patch, just to test : in /view/js/projeqtor.js, line 2781, add last line as described here :

function connect(resetPassword) {
	showWait();
    dojo.byId('login').focus();
    dojo.byId('password').focus();
    changePassword=resetPassword;
    var urlCompl='';
    if (resetPassword) {
      urlCompl='?resetPassword=true';
    }
    urlCompl=((urlCompl=="")?'?':'&')+'isLoginPage=true'; // Patch (try) for looping connections

Then clean browser cache as test again.
It connection works, this is a good hint for me.
But it cannot be a workaround as it disables password change.


 
Posted : 28 Mar 2016 16H15
(@bosimo)
Posts: 12
Active Member
 

Hi,
I made the change on JS then tryied to connect : same problem > I can't logged in.
The login is done but the redirection to the home page not, it keeps me on the login page.
I tried login twice, you'll find the trace on the log attached.

The second file is an offline session of Dynatrace Application Monitoring which may help more for diagnostic as you'll find on it all transactions trace I made during last hour with : detailed transaction information data from user browser to database, passing through web server and PHP execution.
You need to download Dynatrace 6.2 client to be able to read this file : https://downloads.dynatrace.com/downloads/download.aspx?p=1&r=89
You may need to register first to get access.
Let me know if you need any help for accessing.

Thanks & regards


 
Posted : 28 Mar 2016 16H39
(@bosimo)
Posts: 12
Active Member
 

Hello,
For information, following other tests results :

1/ I made the update to Projeqtor 5.3 to see if the problem will be solved but no way.
I made a new projeqtor folder with 5.3 and used the same old database (for version 5.2.5).

2/ On my server, I tried running Projeqtor 5.2.5 with other PHP version : 5.5, 5.3 and 5.2
The problem still the same, no way to login.

Thanks & regards


 
Posted : 29 Mar 2016 14H46
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Hi,

Is there a way to get a copy of your database.
(I'm almost sure source of issue is due to some data) and it would help to fix.
Mayby you can anomyse data...


 
Posted : 29 Mar 2016 18H24
(@bosimo)
Posts: 12
Active Member
 

Hi,

I'm sharing with you an SQL export of MySQL database.
It's not big as I didn't get chance to put all data on it.
I already anonimized some data, but however please delete it after you download it.

Thanks


 
Posted : 29 Mar 2016 19H21
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

File downloaded and removed.
Thanks.
NB : when you could have sent files to support at projeqtor.org 😉


 
Posted : 29 Mar 2016 19H44
(@bosimo)
Posts: 12
Active Member
 

Right 🙂
It'll be next time
By the way, I speak french too : pour le cas où ce serait plus simple pour l'échange 🙂
Thanks & regards


 
Posted : 29 Mar 2016 21H48
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

I tested with your database : I had no issue to connect :S
So my idea was wrong.

Do you have something in your network that can interfer with requests ? Proxy or Reverse-proxy ?

Other idea : could you please check Apache Error log : maybed there is a log that can help...


 
Posted : 29 Mar 2016 22H15
(@n247s)
Posts: 9
Active Member
Topic starter
 

@Bosimo
Just out of curiousity, what host are you using?

I know that we use 'lima-city.de' atm because it is free hosting.
But it has a limits (no SSH acces for example), maybe the problem lays within one of the hosts restrictions

N247S


 
Posted : 29 Mar 2016 23H09
(@bosimo)
Posts: 12
Active Member
 

@N247S
I tested deployment on 2 different environment :

  • A hosted server online running under linux
  • A local web server under Windows with XAMPP

I faced the same problem on both environment and with different Projeqtor version since 5.x
Thanks & regards


 
Posted : 30 Mar 2016 0H19
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

@bosimo : did you try V5.1.5 ?
I am sure there is no applicative connection issue on this version, largely used.
Issue may be due to missing php module, for instance open_ssl.
Do you also have connection issue for every user ? (I tried admin on your database, but maybe issue occurs only for other users)

@N247S : you are right, some free hosters have some restrictions that may lead to issues.
I once met hosting services changing pages to add advertisings...
But I am not sur issue is on that side now.


 
Posted : 30 Mar 2016 0H39
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

@bosimo : did the issue occured for you after changing your password ?
Because I noticed that all users have password encrypted in MD5 (which is the old way projeqtor crypted password) and you have password encrypted in SHA256, which is the new way, applied when changing password...
So you may have encryption issue...


 
Posted : 30 Mar 2016 0H55
(@bosimo)
Posts: 12
Active Member
 

I never exclude configuration issue.
I've a suggestion :
Can you share with me the ideal configuration of php modules, version of apache/php/mysql... to make projeqtor run.
I'll make sure to get this configuration up and give it a try.

Thanks & regards


 
Posted : 30 Mar 2016 1H07
(@n247s)
Posts: 9
Active Member
Topic starter
 

@babynus
The test account I send information off had the default password. So if there is an decription issue, it shouldnt only occur with new passwords. Besides, Im wondering how I am able to login?(since after a lot of loops, it most certainly stopss o my end, enabling me to get to work with some patient)


 
Posted : 30 Mar 2016 1H14
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Attached is phpinfo() for my local (dev) config.
Working fine...


 
Posted : 30 Mar 2016 1H14
Page 1 / 2
Share:

Scroll to Top