Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to clean uninstall. Keeps coming back with previous settings and issues #535

Closed
AlexHimself opened this issue Feb 2, 2024 · 2 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@AlexHimself
Copy link

AlexHimself commented Feb 2, 2024

Problem/Motivation

Receiving error Cannot read properties of null (reading 'avatar') after deleting [email protected] account. Uninstalling/reinstalling nginx is not removing previous settings. I'm using the Raspberry Pi Home Assistant image (not sure technical name of that install).

I believe this is after the auto-upgrade breaking change and deleting the [email protected] user. #507 .

The following error appears on nearly every configuration page, not just SSL Certificates.

image

Expected behavior

Uninstalling nginx and reinstalling would be a vanilla install again.

Actual behavior

Same settings, user accounts, and errors persist after each uninstall/install and even mixing in restarts.

[08:41:29] INFO: Starting NGinx...
s6-rc: info: service legacy-services successfully started
2024/02/02 08:41:29 [error] 208#208: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.86.7, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "hapi4.local:81", referrer: "http://hapi4.local:81/nginx/certificates"
[2/2/2024] [8:41:29 AM] [Global ] › ℹ info Using Sqlite: /config/database.sqlite
[2/2/2024] [8:41:32 AM] [Migrate ] › ℹ info Current database version: none

Steps to reproduce

The steps that lead to this error were essentially:

  1. Noticed was unable to login to nginx with my account and I used [email protected]/changeme and it allowed me to login. This was likely due to ℹ Updated to v1: Proxy no longer works, cannot login, doesn't work, lost all settings #507
  2. Was not prompted to change password and previous settings were gone. Appeared vanilla.
  3. I configured the proxy hosts and SSL certificate using [email protected] account.
  4. Added [email protected] as admin.
  5. Deleted [email protected].
  6. Signed out of [email protected] and in as [email protected].
  7. Received error that I suspect is related and could be solved by this github post. I'm guessing the certificate owner was the [email protected] account.
  8. Uninstalled/reinstalled multiple times as well as restarted device and previous settings (user account, forwarding) persist.

This is in the log, if relevant:

[08:41:29] INFO: Starting NGinx...
s6-rc: info: service legacy-services successfully started
2024/02/02 08:41:29 [error] 208#208: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.86.7, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "hapi4.local:81", referrer: "http://hapi4.local:81/nginx/certificates"
[2/2/2024] [8:41:29 AM] [Global ] › ℹ info Using Sqlite: /config/database.sqlite
[2/2/2024] [8:41:32 AM] [Migrate ] › ℹ info Current database version: none

@AlexHimself
Copy link
Author

AlexHimself commented Feb 2, 2024

I managed to fix the database, but I think the underlying issue may still exist. My resolution was the following:

From web SSH Terminal, I ran the following:

  1. apk add sqlite
  2. I opened my nginx database with sqlite3 /addon_configs/a0d7b954_nginxproxymanager/database.sqlite
  3. Ran the following two commands:

update certificate set owner_user_id = 2;
update proxy_host set owner_user_id = 2;
.exit

  1. Refreshed nginx and it was corrected.

Observation - I noticed when running SELECT * FROM 'auth' that there are 3 users and is_deleted = 0 for all of them. I only have 1 user account ([email protected]).

When running SELECT * FROM 'user' however, I see is_deleted=1 for the two other accounts that shouldn't be there. One is [email protected] and the other is [email protected], which was my attempt to recreate the default admin account.

Copy link

github-actions bot commented Mar 4, 2024

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Mar 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

1 participant