Login error - An Error Was Encountered (v1.6.1)

Hello!
I have the same problem.
Version 1.6.1

Logs (/public_html/application/logs):
DEBUG - 2024-03-10 19:00:50 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2024-03-10 19:00:50 --> Sessions MX_Controller Initialized
DEBUG - 2024-03-10 19:00:50 --> Config file loaded: /*/*/public_html/application/config/invoice_plane.php
DEBUG - 2024-03-10 19:00:50 --> Encryption: Auto-configured driver 'openssl'.
DEBUG - 2024-03-10 19:00:50 --> File loaded: /*/*/public_html/application/modules/settings/models/Mdl_settings.php
DEBUG - 2024-03-10 19:00:50 --> File loaded: /*/*/public_html/application/modules/settings/models/Mdl_versions.php
DEBUG - 2024-03-10 19:00:50 --> File loaded: /*/*/public_html/application/controllers/../modules/layout/controllers/Layout.php
DEBUG - 2024-03-10 19:00:50 --> Layout MX_Controller Initialized
DEBUG - 2024-03-10 19:00:50 --> File loaded: /*/*/public_html/application/modules/layout/views/alerts.php
DEBUG - 2024-03-10 19:00:50 --> File loaded: /*/*/public_html/application/modules/sessions/views/session_login.php
DEBUG - 2024-03-10 19:00:50 --> Total execution time: 0.0425
DEBUG - 2024-03-10 19:00:52 --> UTF-8 Support Enabled
DEBUG - 2024-03-10 19:00:52 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2024-03-10 19:00:52 --> Sessions MX_Controller Initialized
DEBUG - 2024-03-10 19:00:52 --> Config file loaded: /*/*/public_html/application/config/invoice_plane.php
DEBUG - 2024-03-10 19:00:52 --> Encryption: Auto-configured driver 'openssl'.
DEBUG - 2024-03-10 19:00:52 --> File loaded: /*/*/public_html/application/modules/settings/models/Mdl_settings.php
DEBUG - 2024-03-10 19:00:52 --> File loaded: /*/*/public_html/application/modules/settings/models/Mdl_versions.php
DEBUG - 2024-03-10 19:00:52 --> File loaded: /*/*/public_html/application/controllers/../modules/layout/controllers/Layout.php
DEBUG - 2024-03-10 19:00:52 --> Layout MX_Controller Initialized
DEBUG - 2024-03-10 19:00:52 --> File loaded: /*/*/public_html/application/modules/layout/views/alerts.php
DEBUG - 2024-03-10 19:00:52 --> File loaded: /*/*/public_html/application/modules/sessions/views/session_login.php
DEBUG - 2024-03-10 19:00:52 --> Total execution time: 0.0414
DEBUG - 2024-03-10 19:00:57 --> UTF-8 Support Enabled
DEBUG - 2024-03-10 19:00:57 --> Global POST, GET and COOKIE data sanitized

@SebastianG I don’t see any error in the log you posted.
Can you tell:

  • PHP version of your server
  • Check your nginx or Apache error logs flr that moment the error occurred, maybe there’s extra information there

Go to your ipconfig.php, check the environment variable.
Temporarily set it to development
Empty the log, there’s not much information in there anyway
Regenerate the problem

Which errors are shown?

It’s very strange

access.log

213.134.0.0 - - [11/Mar/2024:19:03:49 +0100] "GET / HTTP/1.1" 307 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" *.*.pl "PL"
213.134.0.0 - - [11/Mar/2024:19:03:49 +0100] "GET /index.php/sessions/login HTTP/1.1" 200 966 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" *.*.pl "PL"
213.134.0.0 - - [11/Mar/2024:19:03:51 +0100] "POST /index.php/sessions/login HTTP/1.1" 403 420 "http://*.*.pl/index.php/sessions/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" *.*.pl "PL"

PHP VERSION: 8.1.26
ENABLE_DEBUG=true

Go to your ipconfig.php, check the environment variable.

which parameter?

1 Like

I changed my mind.

  • open index.php
  • find define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
  • replace with: define('ENVIRONMENT', 'development');

Also: you’ve found your access log, but how about the error.log?

It is strange and very interesting.
Hope something useful is in the error.log

Are you comfortable with running a special branch?

It might never make it to production, but you can then be my guinea pig :wink:

See the public_html in your path?
We’ll end up moving some files 1 directory higher, if that makes sense.

vendor, application in the future can be moved.
ipconfig.php can be moved
resources can be moved

package.json and Gulpfile.js can be moved as well

It will leave index.php and the assets directory.
They’re both in public_html which is perfect.

The point of v1.7-next is to prepare for V2.
It also helps with debugging interesting problems.

I might not have a lot of time for this, so if you’re not comfortable with running v1.7-next, that’s ok.

I have set development.
error.log is empty.

If I log in via HTTP, it works; HTTPS does not.
Unfortunately, I cannot run v1.7-next.

Last information: “POST /index.php/sessions/login HTTP/1.1” 403 420

8.8.8.8 - - [19/Mar/2024:18:01:31 +0100] "GET / HTTP/2" 307 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:01:31 +0100] "GET /index.php/sessions/login HTTP/2" 200 805 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:03:55 +0100] "GET /index.php/sessions/login HTTP/1.1" 200 805 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:16:54 +0100] "GET / HTTP/2" 307 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:16:54 +0100] "GET /index.php/sessions/login HTTP/1.1" 200 964 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:16:54 +0100] "GET /assets/core/img/favicon.png HTTP/1.1" 200 4125 "http://****.pl/index.php/sessions/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:16:54 +0100] "GET /assets/core/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1" 200 77160 "http://****.pl/assets/invoiceplane/css/style.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:16:59 +0100] "POST /index.php/sessions/login HTTP/1.1" 403 420 "http://****.pl/index.php/sessions/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:23:35 +0100] "GET /index.php/sessions/login HTTP/1.1" 200 965 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"
8.8.8.8 - - [19/Mar/2024:18:23:38 +0100] "POST /index.php/sessions/login HTTP/1.1" 403 420 "http://****.pl/index.php/sessions/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" ****.pl "PL"

I have found a solution to my problem. I forgot to change the parameter: IP_URL=http to IP_URL=https.

1 Like

Great job!
With windows keep in mind that it cannot handle the /, so for example, see if you can switch themes.

The .zip file had 2 dark themes delivered in the .zip file.
If you can switch themes, then the mission is complete and you can happily use tour InvoicePlane on Windows.

Everything is fine. Thank you for your help.