Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Nginx Proxy Manager - Cannot read properties of null (reading 'avatar')

Featured Replies

I recently moved around my appdata and system folders between cache drives, and ever since I've been having all kinds of problems. My Plex database became corrupted, which I was able to repair, but I think there may be a problem with Mariadb that I use with Nginx Proxy Manager.

When I open the web gui for Nginx Proxy Manager so that I can add/edit proxy hosts, I get the error "Cannot read properties of null (reading 'avatar')" and I cannot see any of my existing hosts. The odd thing is that they seem to be working though. I've spent several hours scouring the internet for a solution, but I haven't had any luck.

I thought about wiping everything out and starting over, but after reading up on that I'm worried it might make matters worse. I definitely don't want to lose all my data and my working configurations if I can help it.

My Let's Encrypt certificate for Nextcloud renewed a few days ago before I messed everything up, so it looks like I have some time to sort this mess. I'm still fairly new to Unraid, Mariadb, Nginx Proxy Manager, etc. So any help sorting this out would be greatly appreciated. Are there any log files or commands that I need to run in the terminal to help diagnose and repair this issue?

Edited by Sup3rTr00p
typos

Solved by Sup3rTr00p

  • Community Expert

need more info the logs would help. diag may not grab theses...

 

The "Cannot read properties of null (reading 'avatar')" error in Nginx Proxy Manager (NPM) is likely caused by corrupted or misconfigured MariaDB data or files in your appdata folder. Moving around the appdata and system folders could have disrupted the connections between NPM, MariaDB, and their data files. Here's a step-by-step approach to diagnose and resolve the issue without losing your configuration or data.


*appdata plugin make a backup...

Step 1: Backup Your Appdata

Before making any changes:

Go to Settings > Docker and stop the Docker service.

Backup the entire appdata folder using your preferred method (e.g., copy to an external drive).

 

Step 2: Check MariaDB Logs

MariaDB is the likely source of the issue since NPM relies on it for its database.

SSH into your Unraid server or open the terminal in the web UI.

Navigate to MariaDB's log directory:

cd /mnt/user/appdata/mariadb
cat log.err

 

Key things to look for:

Corrupted tables.

Permission issues.

 

Step 3: Check Nginx Proxy Manager Logs

NPM logs might also contain useful information.

Navigate to the NPM logs:
 

cd /mnt/user/appdata/nginx-proxy-manager/log
tail -n 50 error.log

 

Step 4: Repair MariaDB Tables

If the MariaDB logs indicate corrupted tables, you can try to repair them:

Access the MariaDB container:

docker exec -it mariadb bash
mysql -u root -p
 

SQL cmds:

Run the following commands to check and repair tables:

USE npm; -- or the database name used by NPM
CHECK TABLE <table_name>; -- Replace with the table name from the error log
REPAIR TABLE <table_name>;

If you're unsure of the table names, use:

SHOW TABLES;

 

Step 5: Recreate NPM’s Database Connection

If repairing tables doesn’t resolve the issue, recreate the NPM database connection:

In the NPM appdata folder, locate config.json or a similar configuration file.

Verify the database credentials and connection settings:

Host: mariadb (or your database container's name).

Username/password.

Restart both MariaDB and NPM containers:

docker restart mariadb nginx-proxy-manager

 

Step 6: Rebuild Nginx Proxy Manager Without Losing Data

If the error persists, rebuilding NPM might be necessary.

Stop the NPM Container:

Go to Settings > Docker and stop the nginx-proxy-manager container.

Backup Configurations:

Backup the data and letsencrypt subfolders in the NPM appdata directory.

Remove and Reinstall the Container:

Delete the NPM container and its image but do not delete the appdata folder.

Reinstall the container and point it to the existing appdata directory.

Verify Reinstallation:

Check if the hosts and certificates reappear.

 

Step 7: Test Connectivity

Once NPM is running:

Access the web UI and verify existing proxy hosts.

Test database connectivity:

Ensure NPM can read/write to MariaDB.

 

?-Copuld be permission issue run toools>docker safe permision or set them...

Step 8: Prevent Future Issues

To avoid similar issues:

Use a cache drive with sufficient capacity for appdata.

Ensure proper permissions for all appdata folders

chmod -R 777 /mnt/user/appdata/nginx-proxy-manager
chmod -R 777 /mnt/user/appdata/mariadb

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.