question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Different OS incompatibility or flask crash when too many peers (Original Problem: Unable to see / add peers inside a configuration: TypeError: '<' not supported between instances of 'int' and 'str')

See original GitHub issue

Describe The Problem Installed the dashboard service on top of an existing wireguard server with multiple peers. I’m unable to see anything inside of the configuration. The log file shows a traceback: TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’

Expected Error / Traceback

Please provide the error traceback here

[22/Jun/2021 20:20:37] “GET /get_config/wg0 HTTP/1.1” 500 - [2021-06-22 20:20:59,820] ERROR in app: Exception on /get_config/wg0 [GET] Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/flask/app.py”, line 2447, in wsgi_app response = self.full_dispatch_request() File “/usr/local/lib/python3.6/site-packages/flask/app.py”, line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File “/usr/local/lib/python3.6/site-packages/flask/app.py”, line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File “/usr/local/lib/python3.6/site-packages/flask/_compat.py”, line 39, in reraise raise value File “/usr/local/lib/python3.6/site-packages/flask/app.py”, line 1950, in full_dispatch_request rv = self.dispatch_request() File “/usr/local/lib/python3.6/site-packages/flask/app.py”, line 1936, in dispatch_request return self.view_functionsrule.endpoint File “dashboard.py”, line 406, in get_conf “peer_data”: get_peers(config_name), File “dashboard.py”, line 186, in get_peers result = sorted(result, key=lambda d: d[‘status’]) TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’

To Reproduce Please provide how you run the dashboard

Home page shows Wg0. When selecting Wg0 returns blank page with navigation on left still visible. Can activate / deactivate the interface.

OS Information:

  • OS: CentOS Linux release 8.3.2011
  • Python Version: 3.6.8

Sample of your .conf file

[Interface]
Address = 10.200.200.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 ens32 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens32 -j MASQUERADE
ListenPort = <Listen port>
PrivateKey = <Private Key here>

[Peer]
PublicKey = <Public Key here>
AllowedIPs = 10.200.200.3/32
Endpoint = <Client Generated>

[Peer]
PublicKey = <Public Key here>
AllowedIPs = 10.200.200.4/32
Endpoint = <Client Generated>

[Peer]
PublicKey = <Public Key here>
AllowedIPs = 10.200.200.6/32
Endpoint = <Client Generated>


Please provide a sample of your configuration file that you are having problem with. You can replace your public key and private key to ABCD...

[Account] username = ABCD password = ABCD

[Server] wg_conf_path = /etc/wireguard app_ip = 0.0.0.0 app_port = 10086 auth_req = true version = v2.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
donaldzoucommented, Jul 2, 2021

Bug fixed on the newest release 😉 Running 80+ peers now should be fine, please file another bug report if it is still causing bug in the newest version 😃

0reactions
donaldzoucommented, Jul 2, 2021

Hi! Thank you for replying back, I’m gonna re-open this bug report since is gonna remind me to fix it lol. I’m gonna test on multiple OS and also simulate more peers running and figure out what is going on 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Different OS incompatibility or flask crash when too many peers ...
Different OS incompatibility or flask crash when too many peers (Original Problem: Unable to see / add peers inside a configuration: TypeError: '<'...
Read more >
TypeError: '<' not supported between instances of 'int' and 'str ...
I understand that the < comparitor cannot be used between different data types 'int' and 'str'. But I'm not sure which part of...
Read more >
Changelog — Python 3.11.1 documentation
gh-97612: Fix a shell code injection vulnerability in the get-remote-certificate.py example script. The script no longer uses a shell to run openssl commands....
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild ... probably not desired in many cases" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >
PyCharm 181.4203.547 Release Notes | Knowledge Base
Feature PY‑20770 Support Python 3.6 asynchronous generators and comprehensions Feature PY‑21768 Semantic highlighting for Python Bug PY‑19573 Python console ‑ no output under OS X Bug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found