Login page shows a Thank You message

Get help from the community here.

Moderator: Developers

sumeetgrover
Posts: 8
Joined: Sat Jan 25, 2020 11:54 pm

Login page shows a Thank You message

Postby sumeetgrover » Sun Jan 26, 2020 12:03 am

We have an installation of Group Office (GO) Community Edition as one of our 'demo' applications. We have done a lot of configuration on this instance, which functions without issues. Now, I can access our GO website URL on Linux/Chrome, and Windows/Chrome/Edge. But when I tried to access that GO URL on iPhone 10 Safari web browser, it shows the following message:

"Thank you for installing Group-Office groupware. After reading and accepting the license click "Continue".

We get this message every now and then, and then the website starts working back again. Can someone please help with this? I would be much grateful.

Thanks.
mschering
Site Admin
Site Admin
Posts: 8357
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Login page shows a Thank You message

Postby mschering » Thu Jan 30, 2020 4:37 pm

Can you send a screenshot? I'm not familiar with that. Perhaps it opens the install page?
Best regards,

Merijn Schering
Intermesh
sumeetgrover1
Posts: 2
Joined: Thu Feb 06, 2020 1:08 pm

Re: Login page shows a Thank You message

Postby sumeetgrover1 » Thu Feb 06, 2020 1:12 pm

I have attached the image - The landing page says "Thank you!". Now when I click continue, it opens another page - see the second screenshot attached. And the strange thing is that we were able to access our application here until few days ago. I'd hugely appreciate your help on this.
Attachments
Second page
Second page
screenshot2.png (70.38 KiB) Viewed 3396 times
Page 1 - This is what shows as the landing page
Page 1 - This is what shows as the landing page
screenshot.png (50.82 KiB) Viewed 3396 times
sumeetgrover1
Posts: 2
Joined: Thu Feb 06, 2020 1:08 pm

Re: Login page shows a Thank You message

Postby sumeetgrover1 » Thu Feb 06, 2020 1:24 pm

mschering wrote: Thu Jan 30, 2020 4:37 pm Can you send a screenshot? I'm not familiar with that. Perhaps it opens the install page?
Yes - it does seem to open the install page. The strange thing is that today - it shows the install page on Edge browser. On Chrome and Safari we can still access our application and do the work. But the fact that Group Office switches to installation page every now and then surprises us. Could we be missing something?
mschering
Site Admin
Site Admin
Posts: 8357
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Login page shows a Thank You message

Postby mschering » Tue Feb 11, 2020 3:15 pm

Please check your PHP error log for errors. There should be errors logged when this happens.

You can also try to enable debug mode and then replicate the problem. It should not redirect but output the error.
Best regards,

Merijn Schering
Intermesh
sumeetgrover
Posts: 8
Joined: Sat Jan 25, 2020 11:54 pm

Re: Login page shows a Thank You message

Postby sumeetgrover » Wed Feb 12, 2020 1:49 pm

mschering wrote: Tue Feb 11, 2020 3:15 pm Please check your PHP error log for errors. There should be errors logged when this happens.

You can also try to enable debug mode and then replicate the problem. It should not redirect but output the error.
Thanks for this suggestion - I will give it a try next time this problem happens. Interestingly, when I deleted all the cookies of our G-O (GroupOffice) website from my Edge browser, and re-accessed our local G-O URL, the install message disappeared and the normal G-O application opened up. But next time it happens - I will look at the log files. It'll be interesting to know why does G-O redirect to install page when it does do in the future. I'll post any findings here by looking at the log files as you suggest.
sumeetgrover
Posts: 8
Joined: Sat Jan 25, 2020 11:54 pm

Re: Login page shows a Thank You message

Postby sumeetgrover » Wed Mar 11, 2020 9:27 pm

Goedeavond Merijn,

We are having this error again. This time, I am not clearing the cookies in my web browser, which takes away this error. RECAP - Accessing our GO homepage takes us to the GO installation page. Now after clicking next, it takes me to the database upgrade page. See the screenshot below.
database upgrade page shows on front-end instead of the GO homepage.
database upgrade page shows on front-end instead of the GO homepage.
upgrade-page.png (53.48 KiB) Viewed 3215 times
Now as I click next, it shows me that the DB upgrade is done. But it takes me back again to the installation page when I type in our GO homepage URL.

I tried running the cli command on the command line, and that shows an error. See below. Can you help? It looks like neither the front-end DB upgrade works nor the back-end cli command works.

Code: Select all

$ ./cli.php core/System/upgrade 
Status: 500 Internal Server Error
X-Powered-By: PHP/7.2.28
Set-Cookie: groupoffice=fb3e2b721414cd7324e32ad947bd727d; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-type: text/plain;charset=UTF-8


ErrorException in /home/groupoffice/go/base/Config.php at line 1391: Undefined index: SCRIPT_NAME at 2020-03-11T21:15:38+00:00
Can you please help?

Dank je wel!
sumeetgrover
Posts: 8
Joined: Sat Jan 25, 2020 11:54 pm

Re: Login page shows a Thank You message

Postby sumeetgrover » Wed Mar 11, 2020 9:54 pm

@mschering - Upon further investigation, I can see that the real problem is happening in /index.php (the primary entry point to the GO installation) at line 27 inside

Code: Select all

function errorHander($e){
And what's happening in this function is that the first if-condition passes as true and therefore, GO redirects to the install/index.php page. When I comment out the redirection code, this function prints out the following error message.

Code: Select all

<h1>Fatal error</h1> <prev>Too few arguments to function go\core\orm\Entity::delete(), 0 passed in /home/groupoffice/go/core/jmap/State.php on line 71 and exactly 1 expected </pre>
ArgumentCountError in
/home/groupoffice/go/core/orm/Entity.php at line 303: Too few arguments to function go\core\orm\Entity::delete(), 0 passed in /home/groupoffice/go/core/jmap/State.php on line 71 and exactly 1 expected at 2020-03-11T21:40:34+00:00
So it looks like it is a run-time error in the GroupOffice code. I say that it is a run-time error because when I visit our GO installation on my Safari web browser on my iPhone, I see this error. But when I visit our GO installation on Chrome, the GO installation works perfect. So there is some run-time error that is being masked by the code, which redirects the end-user to the installation page.

Kunt u mij helpen? (PS I hope you don't mind me practising my Dutch here...) :)
Dank je wel
sumeetgrover
Posts: 8
Joined: Sat Jan 25, 2020 11:54 pm

Re: Login page shows a Thank You message -- FOUND THE BUG!

Postby sumeetgrover » Thu Mar 19, 2020 5:12 pm

Hallo Merijn,

I have now digged into the PHP code, and I can see that it is something you have written. I don't program in PHP, so I did my best to find the centre of this problem. Here's what I have found to be happening:

On my mobile phone's browser:
  • The cookie set by GO during the first login (last month) expired on 7th March.
  • As a result, the index.php page, must call some libraries, especially the following one:

Code: Select all

go/core/jmap/State.php
  • Now, around Line 70, we have the following code:

Code: Select all

                        if($this->token->isExpired()) {
                        $this->token->delete();  <----- HERE IS THE PROBLEM;
                        
                                $this->token = false;
                        }
                }
When your code calls the 'delete()' method, what is happening is that the 'delete' method - is not receiving the input parameter called '$query'. I found this delete method in:

Code: Select all

go/core/orm/Events.php
Without much detailed knowledge of PHP I can assume that this 'delete' method tries to delete the 'accessToken' record from the core_auth_token table. Now since it didn't receive the input parameter '$query', this function fails. As a result, in the index.php of GO installation, when an exception occurs, you redirect a user to the install page that says "Thank you for installing Group Office".

The real problem is that the following delete call fails in State.php:
// $this->token->delete();
If I comment this statement out, the code tries to start a new session, without deleting the expired 'accessToken' from the database. And this solves the problem. What we will have to do is, on our server, comment out this statement in State.php, and write a separate script that runs every half an hour and deletes the expired accessToken entries from core_auth_token table in the database.

But this is a bug, which you may want to fix in your future release.

Who is online

Users browsing this forum: No registered users and 4 guests

cron