[GH-ISSUE #2530] Can't connect via new-admin login page #1626

Closed
opened 2026-02-27 11:18:11 +03:00 by kerem · 12 comments
Owner

Originally created by @SimonVanacco on GitHub (Jun 1, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2530

Impacted versions

  • OS Type: Ubuntu
  • OS Version: 20.04.4 LTS
  • Database Type: MySQL
  • Database version: X.y
  • Modoboa: 2.0.1
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

  • Log out of old admin
  • Go to new admin login page
  • Enter username & password
  • Submit form

Current behavior

The login form on the new admin login page is not working on my install. This is not a fresh install i upgraded today.

The form submit process sends a POST to /token and then loops between two requests : one GET to /account/me that fails, and one POST to /token/refresh.

image

I don't see where the issue lies as the first POST to /token returns correct JSON object with refresh and access tokens.

Workaround

Logging-in from the old interface and then going to the new one works.

Originally created by @SimonVanacco on GitHub (Jun 1, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2530 # Impacted versions * OS Type: Ubuntu * OS Version: 20.04.4 LTS * Database Type: MySQL * Database version: X.y * Modoboa: 2.0.1 * installer used: Yes * Webserver: Nginx # Steps to reproduce * Log out of old admin * Go to new admin login page * Enter username & password * Submit form # Current behavior The login form on the new admin login page is not working on my install. This is not a fresh install i upgraded today. The form submit process sends a POST to /token and then loops between two requests : one GET to /account/me that fails, and one POST to /token/refresh. ![image](https://user-images.githubusercontent.com/5305627/171400926-532580f9-28cf-461b-9446-d97014edb92a.png) I don't see where the issue lies as the first POST to /token returns correct JSON object with refresh and access tokens. # Workaround Logging-in from the old interface and then going to the new one works.
kerem 2026-02-27 11:18:11 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@tonioo commented on GitHub (Jun 1, 2022):

@SimonVanacco Do you see anything interesting in the console tab?

<!-- gh-comment-id:1143758213 --> @tonioo commented on GitHub (Jun 1, 2022): @SimonVanacco Do you see anything interesting in the console tab?
Author
Owner

@SimonVanacco commented on GitHub (Jun 3, 2022):

image

Yes @tonioo i have a JSON.Parse exception right after the downloading of the config.json file, don't know if it's linked but i don't see any errors with my config.json :/

<!-- gh-comment-id:1145804759 --> @SimonVanacco commented on GitHub (Jun 3, 2022): ![image](https://user-images.githubusercontent.com/5305627/171833488-08b5f216-abf4-4166-8927-2656737f3688.png) Yes @tonioo i have a JSON.Parse exception right after the downloading of the config.json file, don't know if it's linked but i don't see any errors with my config.json :/
Author
Owner

@tonioo commented on GitHub (Jun 3, 2022):

@SimonVanacco Indeed it looks fine, unless there is special characters in your hostname?

<!-- gh-comment-id:1145808101 --> @tonioo commented on GitHub (Jun 3, 2022): @SimonVanacco Indeed it looks fine, unless there is special characters in your hostname?
Author
Owner

@SimonVanacco commented on GitHub (Jun 8, 2022):

@tonioo, No, it's a perfectly normal hostname. If i find the time in the next few days i'll fiddle with the JS a bit to find what could cause this.

<!-- gh-comment-id:1149536910 --> @SimonVanacco commented on GitHub (Jun 8, 2022): @tonioo, No, it's a perfectly normal hostname. If i find the time in the next few days i'll fiddle with the JS a bit to find what could cause this.
Author
Owner

@ksaadDE commented on GitHub (Jun 27, 2022):

@tonioo, No, it's a perfectly normal hostname. If i find the time in the next few days i'll fiddle with the JS a bit to find what could cause this.

Any update?

<!-- gh-comment-id:1167963588 --> @ksaadDE commented on GitHub (Jun 27, 2022): > @tonioo, No, it's a perfectly normal hostname. If i find the time in the next few days i'll fiddle with the JS a bit to find what could cause this. Any update?
Author
Owner

@jahlives commented on GitHub (Aug 2, 2022):

not sure if our issue is related to the same but I updated modoboa today to latest (2.0.1). admin GUI shows me that the version ins updated. I did the steps described in manual for upgrading and I restarted the whole server just to be sure. Modoboa is installed in a venv. After rebooting the admin GUI shows me a button to use Modoboa v2 on top ("Want to check the new admin interface? Go to Modoboa v2"). This leads to URL page "new-admin". But this one cannot be found and yields to a 404 page does not exist error. We use a nginx server in front of the modoboa-uwsgi. Any idea why the new admin interface cannot be used?

<!-- gh-comment-id:1202200336 --> @jahlives commented on GitHub (Aug 2, 2022): not sure if our issue is related to the same but I updated modoboa today to latest (2.0.1). admin GUI shows me that the version ins updated. I did the steps described in manual for upgrading and I restarted the whole server just to be sure. Modoboa is installed in a venv. After rebooting the admin GUI shows me a button to use Modoboa v2 on top ("Want to check the new admin interface? Go to Modoboa v2"). This leads to URL page "new-admin". But this one cannot be found and yields to a 404 page does not exist error. We use a nginx server in front of the modoboa-uwsgi. Any idea why the new admin interface cannot be used?
Author
Owner

@tonioo commented on GitHub (Aug 3, 2022):

@jahlives Have you updated your nginx configuration to make the /new-admin subpath work?

<!-- gh-comment-id:1204163711 --> @tonioo commented on GitHub (Aug 3, 2022): @jahlives Have you updated your nginx configuration to make the /new-admin subpath work?
Author
Owner

@jahlives commented on GitHub (Aug 8, 2022):

@tonioo I did not change the nginx config as I thought that /new-admin should be handled by the / location

location / {
        include uwsgi_params;
        uwsgi_pass 127.0.0.1:3031;
        uwsgi_param UWSGI_SCRIPT team.wsgi:application;
        uwsgi_param UWSGI_SCHEME https;
    }

according to uwsgi logs the request is passed to uwsgi as I would expect it by / location

Aug  8 12:10:36 sc-team uwsgi[15181]: REDACTED [pid: 15181|app: 1|req: 466/941] REDACTED () {62 vars in 1077 bytes}
 [Mon Aug  8 10:10:36 2022] GET /new-admin => generated 878 bytes in 276 msecs 
 (HTTP/1.1 404) 5 headers in 169 bytes (1 switches on core 0)
<!-- gh-comment-id:1207929018 --> @jahlives commented on GitHub (Aug 8, 2022): @tonioo I did not change the nginx config as I thought that /new-admin should be handled by the / location ``` location / { include uwsgi_params; uwsgi_pass 127.0.0.1:3031; uwsgi_param UWSGI_SCRIPT team.wsgi:application; uwsgi_param UWSGI_SCHEME https; } ``` according to uwsgi logs the request is passed to uwsgi as I would expect it by / location ``` Aug 8 12:10:36 sc-team uwsgi[15181]: REDACTED [pid: 15181|app: 1|req: 466/941] REDACTED () {62 vars in 1077 bytes} [Mon Aug 8 10:10:36 2022] GET /new-admin => generated 878 bytes in 276 msecs (HTTP/1.1 404) 5 headers in 169 bytes (1 switches on core 0) ```
Author
Owner

@stale[bot] commented on GitHub (Oct 8, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1272275200 --> @stale[bot] commented on GitHub (Oct 8, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Author
Owner

@jahlives commented on GitHub (Oct 31, 2022):

sorry to open again but we still have this issue with the current updated version (we did an update today)

<!-- gh-comment-id:1297402506 --> @jahlives commented on GitHub (Oct 31, 2022): sorry to open again but we still have this issue with the current updated version (we did an update today)
Author
Owner

@ossimantylahti commented on GitHub (Feb 17, 2023):

I can confirm that the issue exists in a fresh Modoboa install to a new server.
OS Type: Ubuntu
OS Version: 22.04 LTS
Database Type: Postgre
Modoboa: 2.0.4
installer used: Yes
Webserver: Nginx

image

<!-- gh-comment-id:1433930854 --> @ossimantylahti commented on GitHub (Feb 17, 2023): I can confirm that the issue exists in a fresh Modoboa install to a new server. OS Type: Ubuntu OS Version: 22.04 LTS Database Type: Postgre Modoboa: 2.0.4 installer used: Yes Webserver: Nginx ![image](https://user-images.githubusercontent.com/37711285/219520572-7b8ef3de-9d0b-42ed-a2aa-41c2aefc59f8.png)
Author
Owner

@ossimantylahti commented on GitHub (Feb 17, 2023):

Here is how to fix this (tested on 2.0.4)
Modify file /srv/modoboa/instance/instance/settings.py

Find a section that says

# Uncomment if you need a custom sub url for new_admin interface
# NEW_ADMIN_URL = 'new_admin' 

Remove the # mark from the 2nd line and modify address to have dash instead of underscore, so it would read:

NEW_ADMIN_URL = 'new-admin'

Reboot the server for the change to take effect.

<!-- gh-comment-id:1434455469 --> @ossimantylahti commented on GitHub (Feb 17, 2023): Here is how to fix this (tested on 2.0.4) Modify file `/srv/modoboa/instance/instance/settings.py` Find a section that says ``` # Uncomment if you need a custom sub url for new_admin interface # NEW_ADMIN_URL = 'new_admin' ``` Remove the # mark from the 2nd line and modify address to have dash instead of underscore, so it would read: `NEW_ADMIN_URL = 'new-admin' ` Reboot the server for the change to take effect.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1626
No description provided.