NetAlertX icon indicating copy to clipboard operation
NetAlertX copied to clipboard

Devices screen stuck on Loading

Open cyberbrix opened this issue 9 months ago • 17 comments

Is there an existing issue for this?

  • [X] I have searched the existing open and closed issues and I checked the docs https://github.com/jokob-sk/NetAlertX/tree/main/docs

Current Behavior

When I go to the devices screen, it hangs on the loading display. I have restarted the docker container, same behavior.

Expected Behavior

Devices screen should load

Steps To Reproduce

No response

app.conf

No response

docker-compose.yml

No response

What branch are you running?

Production

app.log

nginx.txt

Debug enabled

  • [X] I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

cyberbrix avatar Apr 30 '24 13:04 cyberbrix

Could you please clear the cache as described here?

https://github.com/jokob-sk/NetAlertX/issues/659

if it doesn't work, please provide console log from browser.

jokob-sk avatar Apr 30 '24 13:04 jokob-sk

Uncaught TypeError: e[i] is undefined jQuery 7 getMacsOfShownDevices http://10.10.10.100:20212/devices.php#my:1474 http://10.10.10.100:20212/devices.php#my:1494 handle_locked_DB http://10.10.10.100:20212/js/common.js:495 setTimeout handler*handle_locked_DB http://10.10.10.100:20212/js/common.js:494 main http://10.10.10.100:20212/devices.php#my:896 jQuery 7 main http://10.10.10.100:20212/devices.php#my:894 http://10.10.10.100:20212/devices.php#my:877 jquery.dataTables.min.js:66:150 init common.js common.js:1338:9 undefined ui_components.js:16:11 Array(52) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ] ui_components.js:22:11 init ui_components.js ui_components.js:286:9 migrationNeeded = false devices.php:813:9 1714479755143.4854 common.js:1211:11 Some cookies are misusing the recommended “SameSite“ attribute 3 All up-to-date! handle_version.js:19:13 Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data numberArrayFromString http://10.10.10.100:20212/js/common.js:503 main http://10.10.10.100:20212/devices.php#my:899 jQuery 7 main http://10.10.10.100:20212/devices.php#my:894 http://10.10.10.100:20212/devices.php#my:877 common.js:503:15 numberArrayFromString http://10.10.10.100:20212/js/common.js:503 main http://10.10.10.100:20212/devices.php#my:899 jQuery 7 main http://10.10.10.100:20212/devices.php#my:894 http://10.10.10.100:20212/devices.php#my:877

cyberbrix avatar Apr 30 '24 13:04 cyberbrix

Did you try to refresh the cache as mentioned above? try a different browser as well - if you updated recently the browser might still cache old files

jokob-sk avatar Apr 30 '24 13:04 jokob-sk

Tried 2 other browsers, and cleared the cache

cyberbrix avatar Apr 30 '24 13:04 cyberbrix

Can you please post your app.log in debug mode?

Also please provide your docker compose.

jokob-sk avatar Apr 30 '24 14:04 jokob-sk

app.log

Docker statement: docker run -d --network=host --name=netalertx
-v /volume1/docker/netalertx/config:/app/config
-v /volume1/docker/netalertx/db:/app/db
-v /volume1/docker/netalertx/logs:/app/front/log
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_apprise/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_mqtt/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_ntfy/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_pushsafer/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_email/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/_publisher_webhook/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/csv_backup/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/ddns_update/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/dhcp_leases/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/dhcp_servers/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/internet_ip/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/internet_speedtest/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/pihole_scan/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/snmp_discovery/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/website_monitor/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/unifi_import/ignore_plugin
-v /volume1/docker/netalertx/ignore_plugin:/app/front/plugins/pholus_scan/ignore_plugin
-e TZ=America/New_York
-e PORT=20212
jokobsk/netalertx:latest

cyberbrix avatar Apr 30 '24 14:04 cyberbrix

Hi there,

thanks for the details.

I can't seem to reproduce the issue on my end. Can you provide me screenshots of:

  • The issue
  • The console log from browser (the copy pasted text from above isn't too readable - I don;t know whats a warning, error or log output).

Thanks in advance, j

jokob-sk avatar May 01 '24 06:05 jokob-sk

You can also try the dev image if the issue is solved there jokobsk/netalertx-dev:latest

jokob-sk avatar May 01 '24 08:05 jokob-sk

I pulled these from a clean browser session.

console-export-2024-5-1_6-37-40.txt

netalertx

cyberbrix avatar May 01 '24 10:05 cyberbrix

Thanks for that - I'm actually working on that part of code where the error comes from. Can you try to re-download the -dev image in about 10 min from now, recreate the container, load the app and clean the cache with the 🔄 button?

jokob-sk avatar May 01 '24 10:05 jokob-sk

Reloaded, rebuilt. Same error. Not sure if this helps from the nginx error log. I'm gonna try to re-add the plugins.

2024/05/01 07:36:33 [error] 126#126: *1 open() "/app/front/api/app_state.json" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /api/app_state.json HTTP/1.1", host: "0.0.0.0:20212" 2024/05/01 07:37:29 [error] 123#123: *9 FastCGI sent in stderr: "PHP message: PHP Warning: SQLite3::query(): Unable to execute statement: database is locked in /app/front/php/server/parameters.php on line 135" while reading response header from upstream, client: 10.10.10.146, server: , request: "GET /php/server/parameters.php?action=get&expireMinutes=525600&defaultValue=[0,1,2,3,5,6,7,8,9,10,11,17]¶meter=Front_Devices_Columns_Visible&skipcache HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "10.10.10.100:20212", referrer: "http://10.10.10.100:20212/devices.php" 2024/05/01 07:37:34 [error] 123#123: *9 FastCGI sent in stderr: "PHP message: PHP Warning: SQLite3::query(): Unable to execute statement: database is locked in /app/front/php/server/parameters.php on line 135" while reading response header from upstream, client: 10.10.10.146, server: , request: "GET /php/server/parameters.php?action=get&expireMinutes=525600&defaultValue=[0,1,2,3,5,6,7,8,9,10,11,17]¶meter=Front_Devices_Columns_Visible&skipcache HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "10.10.10.100:20212", referrer: "http://10.10.10.100:20212/devices.php"

cyberbrix avatar May 01 '24 11:05 cyberbrix

yeah, at least the error is different so re-enabling plugins might help - give it a go and see if it helps.

you can also try accessing the URL http://<ip>:20212/api/app_state.json in the browser.

jokob-sk avatar May 01 '24 11:05 jokob-sk

{ "currentState": "Process: Wait", "lastUpdated": "2024-05-01 08:19:19-04:00", "settingsSaved": 1714564240.5436797, "settingsImported": 1714564240.5436797, "showSpinner": false, "isNewVersion": false, "isNewVersionChecked": 1714564255 }

Plugins aren't helping, maybe it's a bad device. I'm gonna try deleting them one by one. Next option is a clean start

cyberbrix avatar May 01 '24 13:05 cyberbrix

Purged my DB and reloaded. Something is up with the config and it just keeps reloading the plugins. I'm going to do a completely clean start and see if it replicates.

cyberbrix avatar May 01 '24 17:05 cyberbrix

I think there is a startup bug in the -dev image - can you try in about 5 min with the newest image?

If it still doesn't work, please try to check the restart container log in e.g. portainer or disable auto-restart to capture the error message/exception

jokob-sk avatar May 01 '24 21:05 jokob-sk

I sadly wiped it.  But that startup bug does explain what I was seeing when I tried before. I'll recreate everything and give it another shot. Nothing has really changed much in my set up. On May 1, 2024, at 5:27 PM, jokob-sk @.***> wrote: I think there is a startup bug in the -dev image - can you try in about 5 min with the newest image? If it still doesn't work, please try to check the restart container log in e.g. portainer or disable auto-restart to capture the error message/exception

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

cyberbrix avatar May 01 '24 21:05 cyberbrix

OKay, let me know - hope we get it to work eventually.

jokob-sk avatar May 01 '24 21:05 jokob-sk

For me, the problem occurs reproducibly when i set icons via multi-edit. If i afterwards delete the icons via Multi-Edit, so i can also load the device page again after deleting the cache.

(Version: 19:33:32 - Dev)

BigTrikerTom avatar May 08 '24 17:05 BigTrikerTom

Thanks for the report @BigTrikerTom .I think that's a different issue (I didn't urlencode the values passed to the backend and icons may contain special characters, such as +), but it should be fixed in the next build.

If you can, please have a look at the netalertx-dev docker image, in about 15 minutes (or after the last action finishes) from now.

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

It would be great if you could test this (backup everything first or use a new container) on your end by switching to the above image and letting me know if the issue was resolved.

Thanks in advance, j

jokob-sk avatar May 08 '24 21:05 jokob-sk

Many many thanks. The error with the icons is remedied by the new Docker Image.

Best regards from Germany ...

Tom

BigTrikerTom avatar May 09 '24 15:05 BigTrikerTom

Glad to hear that > closing as resolved for now

jokob-sk avatar May 09 '24 21:05 jokob-sk

@jokob-sk I'm still having this issue con version 24.7.18 and Firefox

Pietro395 avatar Jul 28 '24 12:07 Pietro395

Hi,

Did you try the following advice?

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

jokob-sk avatar Jul 28 '24 12:07 jokob-sk

Hi,

Did you try the following advice?

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

Ok thanks, clearing the site cache works

Pietro395 avatar Jul 28 '24 13:07 Pietro395