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

[bug] Persistent notification - Cause: Integer name casues backend restart #874

Closed
4 of 7 tasks
sk8er000 opened this issue Nov 5, 2024 · 16 comments
Closed
4 of 7 tasks
Labels
bug 🐛 Something isn't working next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed.

Comments

@sk8er000
Copy link

sk8er000 commented Nov 5, 2024

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

Opening the web interface from the browser it appears the following notification:

[Upgrade] : App upgraded 🚀 Please clear the cache:

Click OK below
Clear the browser cache (shift + browser refresh button)
Clear app cache with the 🔄 (reload) button in the header
Go to Settings and click Save

Check out new features and what has changed in the 📓 release notes.

But after doing every step multiple times the notification still pops up.

Expected Behavior

The notification should disappear after doing all the steps

Steps To Reproduce

No response

app.conf

No response

docker-compose.yml

No response

What branch are you running?

Production

app.log

No response

Debug enabled

  • 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.
@sk8er000 sk8er000 added the bug 🐛 Something isn't working label Nov 5, 2024
@jokob-sk
Copy link
Owner

jokob-sk commented Nov 5, 2024

Hi @sk8er000,

Please submit your log. I can't help otherwise. This is usually happening because the backend is restarting.

#811

Thanks,
J

@jokob-sk jokob-sk added Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. Not enough info to help 🛑 Not enough info provided or available to help with this issue. Please check the debug tips docs. labels Nov 5, 2024
@sk8er000
Copy link
Author

sk8er000 commented Nov 5, 2024

Thank you for your answer! My logs folder is more than 200MB can I upload he folder through a google drive link?

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 5, 2024

Sure, even better if you only share the part of your logs with the exception, just before the backend restarted.

You might need to check Portainer to get these exceptions.

See these guides for additional details:

https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_PLUGINS.md

https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md

@sk8er000
Copy link
Author

sk8er000 commented Nov 5, 2024

Thank you very much, I've sent the log to your email address if they are too big as soon as I come back tonight I'll try to locate the important part and paste it here

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 5, 2024

Haven't received anything so far.

@sk8er000
Copy link
Author

sk8er000 commented Nov 5, 2024

I've sent the log with my gmail to the mail reported on the previous links

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 5, 2024

It was in the spam folder.

Regrettably however the log files are inconclusive. As mentioned above, sometimes the only way to catch an exception is in the docker/portainer logs. Can you please share any exceptions logged in there before the backend restarts:

The backend restarted (started). If this is unexpected check https://bit.ly/NetAlertX_debug for troubleshooting tips.
10:51:39 

10:51:39 Permissions check (All should be True)

usually an exception can be found before these lines of log output.

@sk8er000
Copy link
Author

sk8er000 commented Nov 5, 2024

is this part?

2024-11-05T11:45:55.112584561Z 12:45:55 [New Devices] New Devices end
2024-11-05T11:45:55.112587600Z 12:45:55 [Process Scan] Updating Devices Info
2024-11-05T11:45:55.112590631Z 12:45:55 [Update Devices] 1 Last Connection
2024-11-05T11:45:55.112593607Z 12:45:55 [Update Devices] 2 Clean no active devices
2024-11-05T11:45:55.131888609Z Traceback (most recent call last):
2024-11-05T11:45:55.131917459Z File "", line 198, in _run_module_as_main
2024-11-05T11:45:55.131920817Z File "", line 88, in _run_code
2024-11-05T11:45:55.131922970Z File "/app/server/main.py", line 209, in
2024-11-05T11:45:55.132046807Z sys.exit(main())
2024-11-05T11:45:55.132076663Z ^^^^^^
2024-11-05T11:45:55.132080690Z File "/app/server/main.py", line 139, in main
2024-11-05T11:45:55.132260120Z process_scan(db)
2024-11-05T11:45:55.132332151Z File "/app/server/networkscan.py", line 45, in process_scan
2024-11-05T11:45:55.132535771Z update_devices_data_from_scan (db)
2024-11-05T11:45:55.132607959Z File "/app/server/device.py", line 478, in update_devices_data_from_scan
2024-11-05T11:45:55.132903336Z dev_DeviceType = guess_type(device['dev_Vendor'], device['dev_MAC'], device['dev_LastIP'], device['dev_Name'], default_type)
2024-11-05T11:45:55.133026824Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-05T11:45:55.133034496Z File "/app/server/device.py", line 742, in guess_type
2024-11-05T11:45:55.133505555Z name = name.lower() if name else "(unknown)"
2024-11-05T11:45:55.133636811Z ^^^^^^^^^^
2024-11-05T11:45:55.133645025Z AttributeError: 'int' object has no attribute 'lower'
2024-11-05T11:45:55.133762120Z 12:45:55 [Update Devices] - cur_IP -> dev_LastIP (always updated)
2024-11-05T11:45:55.133773169Z 12:45:55 [Update Devices] - cur_Vendor -> (if empty) dev_Vendor
2024-11-05T11:45:55.133777675Z 12:45:55 [Update Devices] - (if not empty) cur_Port -> dev_Network_Node_port
2024-11-05T11:45:55.133781330Z 12:45:55 [Update Devices] - (if not empty) cur_NetworkNodeMAC -> dev_Network_Node_MAC_ADDR
2024-11-05T11:45:55.133785396Z 12:45:55 [Update Devices] - (if not empty) cur_NetworkSite -> (if empty) dev_NetworkSite
2024-11-05T11:45:55.133807105Z 12:45:55 [Update Devices] - (if not empty) cur_SSID -> (if empty) dev_SSID
2024-11-05T11:45:55.133812097Z 12:45:55 [Update Devices] - (if not empty) cur_Type -> (if empty) dev_DeviceType
2024-11-05T11:45:55.133815991Z 12:45:55 [Update Devices] - (if not empty) cur_Name -> (if empty) dev_NAME
2024-11-05T11:45:56.286865915Z
2024-11-05T11:45:56.286910588Z [INSTALL] 🚀 Starting app (:20211)
2024-11-05T11:45:56.286917731Z
2024-11-05T11:45:56.286922162Z
2024-11-05T11:46:00.757894337Z 12:45:56 [MAIN] Setting up ...
2024-11-05T11:46:00.757916938Z 12:45:56 [conf.tz] Setting up ...
2024-11-05T11:46:00.757920989Z 12:45:56
2024-11-05T11:46:00.757923155Z
2024-11-05T11:46:00.757925018Z 12:45:56 The backend restarted (started). If this is unexpected check https://bit.ly/NetAlertX_debug for troubleshooting tips.
2024-11-05T11:46:00.757927121Z 12:45:56
2024-11-05T11:46:00.757929488Z
2024-11-05T11:46:00.757931414Z 12:45:56 Permissions check (All should be True)
2024-11-05T11:46:00.757933420Z 12:45:56 ------------------------------------------------
2024-11-05T11:46:00.757935413Z 12:45:56 /config/app.conf | READ | True
2024-11-05T11:46:00.757937276Z 12:45:56 /config/app.conf | WRITE | True
2024-11-05T11:46:00.757939105Z 12:45:56 /db/app.db | READ | True
2024-11-05T11:46:00.757940819Z 12:45:56 /db/app.db | WRITE | True
2024-11-05T11:46:00.757942699Z 12:45:56 ------------------------------------------------
2024-11-05T11:46:00.757944600Z 12:45:56 [Setup] Attempting to fix permissions.
2024-11-05T11:46:00.757946520Z 12:45:56 [Setup] Attempting to fix permissions.

jokob-sk pushed a commit that referenced this issue Nov 5, 2024
@jokob-sk
Copy link
Owner

jokob-sk commented Nov 5, 2024

Thank you @sk8er000 ,

This is exactly what I needed.

This should be fixed in the next release. It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first), 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.

Thanks in advance,
j

@jokob-sk jokob-sk changed the title Persistent notification [bug] Persistent notification - Casue: Integer name casues backend restart Nov 5, 2024
@jokob-sk jokob-sk changed the title [bug] Persistent notification - Casue: Integer name casues backend restart [bug] Persistent notification - Cause: Integer name casues backend restart Nov 5, 2024
@jokob-sk jokob-sk removed the Not enough info to help 🛑 Not enough info provided or available to help with this issue. Please check the debug tips docs. label Nov 5, 2024
@sk8er000
Copy link
Author

sk8er000 commented Nov 5, 2024

I'm sorry for the late reply, at the moment I can't easily access to my docker installation but I can try as soon as I can. Some hours at worse

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 6, 2024

no rush @sk8er000 - thanks for the help 🙏

@sk8er000
Copy link
Author

sk8er000 commented Nov 6, 2024

Sorry for the delay but I came back at night and went to sleep. I've redeployed my container using the dev branch. When I logged to the web I terface I received the same notification but after doing all the reported steps it disappeared and now I can use the web interface! I'll try more deeply today and report here. In the meanwhile thank you very much for the prompt fix!

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 6, 2024

No need to apologize and thanks for testing!

@sk8er000
Copy link
Author

sk8er000 commented Nov 7, 2024

It's now a couple of days and didn't notice any issue with the actual dev branch image, I think that my issue is completely fixed.

Thank you! 🍻

@jokob-sk
Copy link
Owner

jokob-sk commented Nov 9, 2024

Hi @sk8er000 - glad to hear that and thanks for testing!

@jokob-sk jokob-sk added next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed. and removed Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. labels Nov 9, 2024
@jokob-sk
Copy link
Owner

Releasing -> Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed.
Projects
None yet
Development

No branches or pull requests

2 participants