clicking WG0 Settings keeps loading for ever
See original GitHub issueDescribe The Problem I click on the WG0 Connection to open the settings for this connection. WGDashboard starts loading forever from now on.
Expected Error / Traceback
[2021-11-19 06:28:34,099] ERROR in app: Exception on /get_config/wg0 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "dashboard.py", line 779, in get_conf
"peer_data": get_peers(config_name, search, sort),
File "dashboard.py", line 327, in get_peers
get_all_peers_data(config_name)
File "dashboard.py", line 269, in get_all_peers_data
search = db.search(peers.id == i['PublicKey'])
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 233, in search
docs = [doc for doc in self if cond(doc)]
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 233, in <listcomp>
docs = [doc for doc in self if cond(doc)]
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 603, in __iter__
for doc_id, doc in self._read_table().items():
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 653, in _read_table
tables = self._storage.read()
File "/usr/local/lib/python3.7/dist-packages/tinydb/storages.py", line 125, in read
return json.load(self._handle)
File "/usr/lib/python3.7/json/__init__.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 4504 (char 4503)
10.7.0.3 - - [19/Nov/2021 06:28:34] "GET /get_config/wg0?search= HTTP/1.1" 500 -
10.7.0.3 - - [19/Nov/2021 06:28:34] "GET /static/img/logo.png HTTP/1.1" 200 -
User not loggedin - Attemped access: get_conf
10.0.5.17 - - [19/Nov/2021 06:28:49] "GET /get_config/wg0?search= HTTP/1.1" 302 -
10.0.5.17 - - [19/Nov/2021 06:28:49] "GET /signin HTTP/1.1" 200 -
10.0.5.17 - - [19/Nov/2021 06:28:49] "GET /static/css/dashboard.css HTTP/1.1" 200 -
10.0.5.17 - - [19/Nov/2021 06:28:49] "GET /static/js/jquery.min.js HTTP/1.1" 200 -
10.0.5.17 - - [19/Nov/2021 06:28:49] "GET /static/js/bootstrap.bundle.js HTTP/1.1" 200 -
10.0.5.17 - - [19/Nov/2021 06:28:50] "GET /static/js/tools.js HTTP/1.1" 200 -
[2021-11-19 06:29:34,197] ERROR in app: Exception on /get_config/wg0 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "dashboard.py", line 779, in get_conf
"peer_data": get_peers(config_name, search, sort),
File "dashboard.py", line 327, in get_peers
get_all_peers_data(config_name)
File "dashboard.py", line 269, in get_all_peers_data
search = db.search(peers.id == i['PublicKey'])
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 233, in search
docs = [doc for doc in self if cond(doc)]
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 233, in <listcomp>
docs = [doc for doc in self if cond(doc)]
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 603, in __iter__
for doc_id, doc in self._read_table().items():
File "/usr/local/lib/python3.7/dist-packages/tinydb/table.py", line 653, in _read_table
tables = self._storage.read()
File "/usr/local/lib/python3.7/dist-packages/tinydb/storages.py", line 125, in read
return json.load(self._handle)
File "/usr/lib/python3.7/json/__init__.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 4504 (char 4503)
10.7.0.3 - - [19/Nov/2021 06:29:34] "GET /get_config/wg0?search= HTTP/1.1" 500 -
To Reproduce It is running on a raspberry pi 4. It is installed with all recommendations/guidelines provided from this github wiki/installation instructions.
OS Information:
- OS: dietpi 7.8.2
- Python Version: 3.7.3
Sample of your .conf
file
[Interface]
Address = 10.7.0.1/24
SaveConfig = true
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
ListenPort = 51820
PrivateKey = [SNIP]
[Peer]
PublicKey = [SNIP]
PresharedKey = [SNIP]
AllowedIPs = 10.7.0.2/32
Endpoint = [SNIP]:60308
[Peer]
PublicKey = [SNIP]
PresharedKey = [SNIP]
AllowedIPs = 10.7.0.3/32
Endpoint = [SNIP]:63366
[Peer]
PublicKey = [SNIP]
PresharedKey = [SNIP]
AllowedIPs = 10.7.0.4/32
[Peer]
PublicKey = [SNIP]
AllowedIPs = 10.7.0.10/32
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
How To Set Up WireGuard on Ubuntu 20.04 - DigitalOcean
In this tutorial, you will set up WireGuard on an Ubuntu 20.04 server, ... wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0 Loaded: ...
Read more >How to get started with WireGuard VPN - UpCloud
In this tutorial, we will set up WireGuard on Ubuntu 18.04 server. ... First things first, if you have not yet registered on...
Read more >Wireguard is not updating it's config when started by wg-quick ...
I am checking this looking at the output of wg and checking my public IP. wg-quick strip wg0 does print the correct configuration...
Read more >Cannot setup WireGuard VPN - Server Fault
Ok solved the wireguard "Line unrecognized Address=" with wg show wg0 NOT using wg-quick. Just removed/commented the line in config Address ...
Read more >Set Up WireGuard VPN on Ubuntu - Linode
Wireguard encrypts your traffic quickly and safely, this guide will show you how to set up WireGuard VPN server and clients.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was getting the same symptom as this, hanging going into the tunnel’s configuration file.
https://github.com/donaldzou/WGDashboard/issues/108
Fixing the invalid character at the end of the json file for that tunnel in the /db folder fixed it.
Hi, sorry I’ve been super busy recently. Could you also provide a sample of your wireguard configuration please? Thanks a lot!