Internal Service Error on Ubuntu and RPi3
See original GitHub issueDescribe The Problem Cannot login to dashboards on either a Ubuntu or a RPi install. Ubuntu install was installed with fresh WireGuard install, RPi install had an already configured WireGuard setup.
Attempting to login with the dashboard with the default username admin and password admin results in an internal server error:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Expected Error / Traceback For Ubuntu:
[2022-01-24 11:47:39,116] ERROR in app: Exception on /auth [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "dashboard.py", line 704, in auth
password = hashlib.sha256(data['password'].encode())
TypeError: 'NoneType' object is not subscriptable'
For RPi:
[2022-01-24 11:41:35,080] ERROR in app: Exception on /auth [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "dashboard.py", line 704, in auth
password = hashlib.sha256(data['password'].encode())
TypeError: 'NoneType' object is not subscriptable
Sidenote: Are my user permissions bad? I see the traceroute says fail on /auth is that for my authentication or is that on wg-dashboard? This error is the same across two distros so it must be something consistent with either wg-dashboard or my network.
To Reproduce
I did a fresh install of both wg-dashboard and wireguard into their default directories running them with ./wgd.sh start
. I then tried to access them via the ip and port with default credentials. Upon entering credentials I am greeted with an internal server error.
OS Information:
-
OS: Ubuntu 20…04.1
-
Python Version: 3.8.10
-
OS: Linux 5.10.63-v7+
-
Python Version: 3.7.3
Sample of your .conf
file
Ubuntu:
[Interface]
Address = 10.0.0.1/24
SaveConfig = true
ListenPort = 51820
PrivateKey = ABCD
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o wlp0s20f3 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o wlp0s20f3 -j MASQUERADE
RPi:
[Interface]
Address = 10.100.0.1/32
ListenPort = 47111
PrivateKey = ABCD
DNS = 192.168.50.25
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
#x360
PublicKey = ABCD
PresharedKey = ABCD
AllowedIPs = 10.100.0.2/32, fd08:4711::2/128, 192.168.0.0/24
If any more information is required please let me know! I know I’m prone to making simple errors sometimes lol
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (10 by maintainers)
Top GitHub Comments
Ahah nice!! I would consider to move all dependencies to local. But the reason is flask running on HTTP 1.1, and it need to wait for resources 1 by 1, so would cause longer loading time. By using CDN can have faster loading speed on scripts and CSS libraries. I will close this issue now, if you have any more questions please let me know!!
GOT IT
Holy moly this one is extremely unique to me. I recently set up some blocklists on my Pi-Hole and one of them was blocking
After adding that to the whitelist the login works perfectly.
Thanks so much for your help @donaldzou! Sorry this took so long and ended up being such a niche use-case.