nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Cannot Log into Admin After Upgrade to 2.12.4

Open paelan8a opened this issue 1 year ago • 93 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?

Describe the bug After upgrading from 2.12.3 to 2.12.4, I can no longer log into the admin panel. The login page is displayed, but authentication does not work. The Docker logs show the following and do not proceed any further:

nginx  | ❯ Starting backend ...
nginx  | [7/1/2025] [11:29:07 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
nginx  | [7/1/2025] [11:29:08 AM] [Migrate  ] › ℹ  info      Current database version: none
nginx  | [7/1/2025] [11:29:08 AM] [Global   ] › ⬤  debug     CMD: [ -f '/etc/letsencrypt/credentials/credentials-50' ] || { mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo '# Cloudflare API token
nginx  | dns_cloudflare_api_token=****' > '/etc/letsencrypt/credentials/credentials-50' && chmod 600 '/etc/letsencrypt/credentials/credentials-50'; }
nginx  | [7/1/2025] [11:29:08 AM] [Global   ] › ⬤  debug     CMD: [ -f '/etc/letsencrypt/credentials/credentials-63' ] || { mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo '# Cloudflare API token
nginx  | dns_cloudflare_api_token=****' > '/etc/letsencrypt/credentials/credentials-63' && chmod 600 '/etc/letsencrypt/credentials/credentials-63'; }
nginx  | [7/1/2025] [11:29:08 AM] [Certbot  ] › ▶  start     Installing cloudflare...
nginx  | [7/1/2025] [11:29:08 AM] [Global   ] › ⬤  debug     CMD: . /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==4.0.* acme==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')  && deactivate
nginx  | [7/1/2025] [11:29:09 AM] [Certbot  ] › ✖  error     ERROR: Cannot install certbot-dns-cloudflare==4.0.0 and cloudflare==4.0.* because these package versions have conflicting dependencies.
nginx  | ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
nginx  |
nginx  | [7/1/2025] [11:29:09 AM] [Global   ] › ✖  error     Some plugins failed to install. Please check the logs above CommandError: Some plugins failed to install. Please check the logs above
nginx  |     at /app/lib/certbot.js:39:14
nginx  |     at Immediate.<anonymous> (/app/node_modules/batchflow/lib/batchflow.js:80:9)
nginx  |     at process.processImmediate (node:internal/timers:483:21) {
nginx  |   previous: undefined,
nginx  |   code: 1,
nginx  |   public: false
nginx  | }

Rolling back to 2.12.3 works fine.

Nginx Proxy Manager Version 2.12.4

To Reproduce

  1. Update docker image from jc21/nginx-proxy-manager:2.12.3 to 2.12.4
  2. Access the admin panel
  3. Try to log in
  4. Login fails

Expected behavior Should be able to log in as usual after the upgrade

Screenshots N/A

Operating System Ubuntu 24.04.2 LTS Docker version 26.1.3, build b72abbb

Additional context

  • No issue with 2.12.3
  • Similar issue: #1769
  • No other errors are shown in docker logs
  • /api/tokens returns a 502 error.(Thanks for @LukeSearle )

paelan8a avatar Jul 01 '25 02:07 paelan8a

I have the same problem.

The browser console logs indicates getting /api/tokens returns a 502.

LukeSearle avatar Jul 01 '25 03:07 LukeSearle

Oh, I forgot. Thanks!

paelan8a avatar Jul 01 '25 03:07 paelan8a

I'm also having login problems don't know how to fix it

spirytuslove avatar Jul 01 '25 03:07 spirytuslove

Same problem here. Just rolled back to previous version and it's working fine. Logs look exactly the same as above with the added pip reporting conflicting dependencies.

Robertwhitten87 avatar Jul 01 '25 03:07 Robertwhitten87

Same issue, just upgraded... cloudflare failing exactly the same

Joshndroid avatar Jul 01 '25 03:07 Joshndroid

I just ran into the same issue. Rolled back by adding the :2.12.3 tag to my unraid docker template and it's working again.

drbadd avatar Jul 01 '25 04:07 drbadd

Preliminary Investigation

The container is performing this installation via pip

. /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==4.0.* acme==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')  && deactivate

And the error is

ERROR: Cannot install certbot-dns-cloudflare==4.0.0 and cloudflare==4.0.* because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested cloudflare==4.0.*
    certbot-dns-cloudflare 4.0.0 depends on cloudflare<2.20 and >=2.19

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Changing the version in this command to cloudflare==2.19.* fixes the issues

. /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==2.19.* acme==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')  && deactivate

Likely Root cause is whatever script is generating the command for pip install & possibly certbot-dns-cloudflare version 4 is accidentally applied to cloudflare package.


MariaDB or Postgres

Rollbacks won't help in some cases because the migration lock happens, but doing the following might be unsafe

UPDATE `migrations_lock` SET
`index` = '1',
`is_locked` = '0'
WHERE `index` = '1';

I used an adminer container to connect to my NPM instance.

Critically, issues persist with both mariadb & postgres as well, sqllite folks maybe just need to fix the pip requirements.

santoshganti avatar Jul 01 '25 04:07 santoshganti

I've returned to 2.12.3 at the moment. waiting for fixes

tom-kst avatar Jul 01 '25 04:07 tom-kst

Same issue here for me as well.

jjjonesjr33 avatar Jul 01 '25 04:07 jjjonesjr33

Same here. Rollback seems to work with no problem

AnSch1510 avatar Jul 01 '25 05:07 AnSch1510

Same issue here with the login, I'm working with a sqllite db.

jicho avatar Jul 01 '25 05:07 jicho

Same issue cannot login. /api/token error..

hilee0602 avatar Jul 01 '25 06:07 hilee0602

Same issue: "Bad gateway" error on login and API unavailable

Chacsam avatar Jul 01 '25 06:07 Chacsam

Same issue here - backup restore to version 2.12.3 fixed it for now

MK-0x41 avatar Jul 01 '25 07:07 MK-0x41

Same issue here. And with a high CPU usage also.

OPTips avatar Jul 01 '25 07:07 OPTips

Same here, rollback to 2.12.3 worked fine for now.

MSommer95 avatar Jul 01 '25 07:07 MSommer95

Can confirm the same for me. Rolling back to 2.12.3 and all working.

Selidie avatar Jul 01 '25 07:07 Selidie

Not only the /api/tokens endpoint throws the 502, but I use /api to do healthchecks in Uptime Kuma and even that is throwing a 502.

rsaffi avatar Jul 01 '25 07:07 rsaffi

After upgrading from 2.12.3 to 2.12.4, I encountered the same issue. Rolling back to 2.12.3 worked fine. Please fix this, Tks.

iamggggs avatar Jul 01 '25 08:07 iamggggs

I can confirm - Same issue here with 2.12.4 - Couldn't log in (API error) - Rolled back to 2.12.3, and everything again worked fine.

hummelmose avatar Jul 01 '25 08:07 hummelmose