[GH-ISSUE #933] Unhandled Exceptions - All Modal Dialogs Broken in 2.8.0 When Routing NPM to localhost #791

Closed
opened 2026-02-26 06:34:26 +03:00 by kerem · 6 comments
Owner

Originally created by @LanceMcCarthy on GitHub (Mar 8, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/933

Are you in the right place?

  • ☑ If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the right place.

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes, this is a regression. I have been successfully using this approach for over a year, it broke after updating the image to jc21/nginx-proxy-manager:latest.
  • Are you sure you're not using someone else's docker image?
  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network?
    • The route itself works and most of the site works, see the screenshots below (validating a logged in user, navigating the site over the route's URL).

Describe the bug

  • NGINX Proxy Manager v2.8.0
  • Problem: Client-side functions that open modal dialog do not work when accessing NPM through a proxied route.

This used to work before the update, now it's not working any more. I don't know what version the regression started, but it's definitely in 2.8.0.

Add Proxy Host Error

TypeError: Cannot read property 'call' of undefined
Uncaught (in promise) TypeError: Cannot read property 'call' of undefined

image

Add SSL Certificate Error

TypeError: Cannot read property 'display_name' of undefined
Uncaught (in promise) TypeError: Cannot read property 'display_name' of undefined

image

Add 404 Host Errors

TypeError: Cannot read property 'call' of undefined
Uncaught (in promise) TypeError: Cannot read property 'call' of undefined

TypeError: n is not a constructor
Uncuaght (in promise) TypeError: n is not a constructor

image

To Reproduce

Steps to reproduce the behavior:

  1. Set up a proxy host, pointing to the NPM installation [https:]npm.yourdomain.com
    • You can use either 127.0.0.1:81, localhost:81 or hostname.local:81 for the destination
    • All other setup is normal, generate the SSL cert, setup the proxy route, etc.
  2. Navigate to the site via the proxy host and login to confirm it is loading
  3. Attempt to use any of the following buttons
    • Add Proxy Host
    • Add 404 Host
    • Add SSL Certificate
  4. Observe the errors in the above screenshots

image

Expected behavior

The model dialog appears, without exceptions, allowing you to complete the task that dialog is for.

Operating System

I have reproduced this issue on all of the following:

  • Raspberry Pi OS (latest), running on
    • Pi4
    • Pi Zero W
    • Pi 2
  • Debian 10 running in Hyper-V

Additional Context - Works in hostname.local Confirmation

Just to make it clear this is only a problem over the proxied route, visit NPM via either

  • The hostname.local from another computer on the network
  • Use localhost on the machine that has NPM installed

This is probably something wrong with the scripts being loaded, because it works fine when using localhost or hostname.local.

The error messages are similar to when you have incorrect relative URLs, or hardcoded paths in the s cript.

I can eliminate the script loading problem because main,js loads comepletely fine to the script tags and those methods are loaded in memory

Here's a final screenshot to prove it does work

image

Originally created by @LanceMcCarthy on GitHub (Mar 8, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/933 **Are you in the right place?** - ☑ If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* **Checklist** - ✅ Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes, this is a regression. I have been successfully using this approach for over a year, it broke after updating the image to jc21/nginx-proxy-manager:latest. - ✅ Are you sure you're not using someone else's docker image? - ✅ If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? - The route itself works and most of the site works, see the screenshots below (validating a logged in user, navigating the site over the route's URL). ### Describe the bug - NGINX Proxy Manager `v2.8.0` - Problem: Client-side functions that open modal dialog do not work when accessing NPM through a proxied route. This used to work before the update, now it's not working any more. I don't know what version the regression started, but it's definitely in 2.8.0. #### Add Proxy Host Error ``` TypeError: Cannot read property 'call' of undefined Uncaught (in promise) TypeError: Cannot read property 'call' of undefined ``` ![image](https://user-images.githubusercontent.com/3520532/110332630-92fe1080-7fee-11eb-8938-a3265796cc75.png) #### Add SSL Certificate Error ``` TypeError: Cannot read property 'display_name' of undefined Uncaught (in promise) TypeError: Cannot read property 'display_name' of undefined ``` ![image](https://user-images.githubusercontent.com/3520532/110334449-c8a3f900-7ff0-11eb-90c0-9f9b91888e7d.png) #### Add 404 Host Errors ``` TypeError: Cannot read property 'call' of undefined Uncaught (in promise) TypeError: Cannot read property 'call' of undefined TypeError: n is not a constructor Uncuaght (in promise) TypeError: n is not a constructor ``` ![image](https://user-images.githubusercontent.com/3520532/110334655-0012a580-7ff1-11eb-8ae9-03dfe79ccba9.png) ### To Reproduce Steps to reproduce the behavior: 1. Set up a proxy host, pointing to the NPM installation **[https:]npm.yourdomain.com** - You can use either `127.0.0.1:81`, `localhost:81` or `hostname.local:81` for the destination - All other setup is normal, generate the SSL cert, setup the proxy route, etc. 2. Navigate to the site via the proxy host and login to confirm it is loading 3. Attempt to use any of the following buttons - **Add Proxy Host** - **Add 404 Host** - **Add SSL Certificate** 4. Observe the errors in the above screenshots ![image](https://user-images.githubusercontent.com/3520532/110332037-d86e0e00-7fed-11eb-8352-d7ced9a7c1d1.png) ### Expected behavior The model dialog appears, without exceptions, allowing you to complete the task that dialog is for. ### Operating System I have reproduced this issue on all of the following: - Raspberry Pi OS (latest), running on - Pi4 - Pi Zero W - Pi 2 - Debian 10 running in Hyper-V ### Additional Context - Works in hostname.local Confirmation Just to make it clear this is only a problem over the proxied route, visit NPM via either - The hostname.local from another computer on the network - Use localhost on the machine that has NPM installed This is probably something wrong with the scripts being loaded, because it works fine when using localhost or hostname.local. The error messages are similar to when you have incorrect relative URLs, or hardcoded paths in the s cript. I can eliminate the script loading problem because main,js loads comepletely fine to the script tags and those methods are loaded in memory Here's a final screenshot to prove it does work ![image](https://user-images.githubusercontent.com/3520532/110333347-7f06de80-7fef-11eb-97d2-cfee935dba51.png)
kerem 2026-02-26 06:34:26 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@LanceMcCarthy commented on GitHub (Mar 12, 2021):

Update - Weirdly enough this does not occur when using the front-end from a mobile browser (MSFT Edge on Android 10)

<!-- gh-comment-id:797522968 --> @LanceMcCarthy commented on GitHub (Mar 12, 2021): Update - Weirdly enough this does not occur when using the front-end from a mobile browser (MSFT Edge on Android 10)
Author
Owner

@rclough commented on GitHub (Jun 13, 2021):

I'm also experiencing the same issue - the UI is unusable when I access it in Opera, but works fine when I use it in chrome (thanks to the issue I realized can workaround in a different browser)

<!-- gh-comment-id:860286260 --> @rclough commented on GitHub (Jun 13, 2021): I'm also experiencing the same issue - the UI is unusable when I access it in Opera, but works fine when I use it in chrome (thanks to the issue I realized can workaround in a different browser)
Author
Owner

@rclough commented on GitHub (Jun 13, 2021):

granted I use the unraid docker image, and I dont think I use localhost for it

<!-- gh-comment-id:860286339 --> @rclough commented on GitHub (Jun 13, 2021): granted I use the unraid docker image, and I dont think I use localhost for it
Author
Owner

@chaptergy commented on GitHub (Jun 14, 2021):

@LanceMcCarthy Which browser were you using? Ist this an opera-specific / browser-specific problem or does it appear in most browsers?

<!-- gh-comment-id:860383202 --> @chaptergy commented on GitHub (Jun 14, 2021): @LanceMcCarthy Which browser were you using? Ist this an opera-specific / browser-specific problem or does it appear in most browsers?
Author
Owner

@LanceMcCarthy commented on GitHub (Jun 14, 2021):

It was chromium-based Microsoft Edge.

<!-- gh-comment-id:860639003 --> @LanceMcCarthy commented on GitHub (Jun 14, 2021): It was chromium-based Microsoft Edge.
Author
Owner

@LanceMcCarthy commented on GitHub (Jul 4, 2021):

This is still occurring in v2.9.4 with a fresh installation of nginxproxymanager (raspberry pi using docker-compose with default config settings)

image

These errors look a lot like when the root operator is null.

Broken UX

Due to the handled exceptions, the execution of the UI's layout is halted, which results in missing elements. Here is what the main page looks like after initial install and changing the the default admin credentials:

image

Consequential Side Effects

  • After initial login, I did not see the popup to change the admin credentials. It took several attempts, with multiple page refreshes, before the if/else statement that checks the 'admin' username to even work.
  • All the main views do not work. They each present their own errors, but seem to be based on the same null reference issue (Settings, Hosts, etc)
    • The user-edit/pwd change popups don't work

Environment

Windows 10 (latest 21H1 service update, build 19041)
Chromium-based Microsoft Edge

image

<!-- gh-comment-id:873581554 --> @LanceMcCarthy commented on GitHub (Jul 4, 2021): This is still occurring in v2.9.4 with a fresh installation of nginxproxymanager (raspberry pi using docker-compose with default config settings) ![image](https://user-images.githubusercontent.com/3520532/124385355-1ed53000-dca3-11eb-8088-0f50d0bee820.png) These errors look a lot like when the root operator is null. ## Broken UX Due to the handled exceptions, the execution of the UI's layout is halted, which results in missing elements. Here is what the main page looks like after initial install and changing the the default admin credentials: ![image](https://user-images.githubusercontent.com/3520532/124385447-a91d9400-dca3-11eb-8ff4-a64e997b644d.png) ## Consequential Side Effects * After initial login, I did not see the popup to change the admin credentials. It took several attempts, with multiple page refreshes, before the if/else statement that checks the 'admin' username to even work. * All the main views do not work. They each present their own errors, but seem to be based on the same null reference issue (Settings, Hosts, etc) * * The user-edit/pwd change popups don't work ## Environment Windows 10 (latest 21H1 service update, build 19041) Chromium-based Microsoft Edge ![image](https://user-images.githubusercontent.com/3520532/124386257-97d68680-dca7-11eb-895a-2d7da140f344.png)
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/nginx-proxy-manager-NginxProxyManager#791
No description provided.