jokob-sk / NetAlertX

🖧🔍 WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
3.15k stars 186 forks source link

Remove or handle github outages #763

Closed redge76 closed 2 months ago

redge76 commented 3 months ago

Is there an existing issue for this?

Current Behavior

Netalerx does not start while github is down because the outtage page does not pass JSON validation. https://www.githubstatus.com/incidents/kz4khcgdsfdv

(the pink unicor if cute though :-P )

Expected Behavior

Netalerx should handle the JSONDecodeError exception.

Steps To Reproduce

No response

app.conf

No response

docker-compose.yml

No response

What branch are you running?

Production

app.log

08/15/202401:20:06 AM all values are hidden 08/15/202401:20:06 AM 08/15/202401:20:07 AM Traceback (most recent call last): 08/15/202401:20:07 AM File "", line 198, in _run_module_as_main 08/15/202401:20:07 AM File "", line 88, in _run_code 08/15/202401:20:07 AM File "/app/server/main.py", line 209, in 08/15/202401:20:07 AM sys.exit(main()) 08/15/202401:20:07 AM ^^^^^^ 08/15/202401:20:07 AM File "/app/server/main.py", line 85, in main 08/15/202401:20:07 AM updateState("Initializing") 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/app/server/helper.py", line 133, in updateState 08/15/202401:20:07 AM state = app_state_class(newState, settingsSaved, settingsImported, showSpinner) 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/app/server/helper.py", line 89, in init 08/15/202401:20:07 AM self.isNewVersion = checkNewVersion() 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/app/server/helper.py", line 921, in checkNewVersion 08/15/202401:20:07 AM data = json.loads(text) 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/usr/lib/python3.12/json/init.py", line 346, in loads 08/15/202401:20:07 AM return _default_decoder.decode(s) 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/usr/lib/python3.12/json/decoder.py", line 337, in decode 08/15/202401:20:07 AM obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 08/15/202401:20:07 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 08/15/202401:20:07 AM File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode 08/15/202401:20:07 AM raise JSONDecodeError("Expecting value", s, err.value) from None 08/15/202401:20:07 AM json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Debug enabled

jokob-sk commented 3 months ago

Thanks for the report!

This should be available in the next release. You can have a look at the netalertx-dev docker image, in about 15 minutes (or after the last action finishes) from now.

Thanks in advance, j

jokob-sk commented 2 months ago

Releasing -> closing