Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2019-12-21T22:37:39Zhttps://gitlab.torproject.org/legacy/trac/-/issues/32686Show TOR Dns port status from controller2019-12-21T22:37:39ZTracShow TOR Dns port status from controllerMy branch:
https://github.com/bounteous/nyx/tree/dns_port
**Trac**:
**Username**: bounteous17My branch:
https://github.com/bounteous/nyx/tree/dns_port
**Trac**:
**Username**: bounteous17Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32642nyx crashes on startup with `ValueError: Input needs to be a non-negative int...2020-01-24T17:57:39ZTracnyx crashes on startup with `ValueError: Input needs to be a non-negative integer, got '-33538'`When running as the same user that the Tor daemon runs under, Nyx is crashing at startup on my FreeBSD 12 relay:
```
$ nyx --version
nyx version 2.0.4 (released November 5, 2017)
$ pkg info -d py36-nyx
py36-nyx-2.0.4_1:
py36-stem-1.7....When running as the same user that the Tor daemon runs under, Nyx is crashing at startup on my FreeBSD 12 relay:
```
$ nyx --version
nyx version 2.0.4 (released November 5, 2017)
$ pkg info -d py36-nyx
py36-nyx-2.0.4_1:
py36-stem-1.7.1_1
python36-3.6.9
py36-setuptools-41.2.0
py36-sqlite3-3.6.9_7
$ python --version
Python 3.6.9
$ freebsd-version
11.3-RELEASE-p5
$ sudo -u _tor nyx
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 740, in halt_panels
panel.join()
File "/usr/local/lib/python3.6/threading.py", line 1051, in join
raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.6/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.6/site-packages/nyx/starter.py", line 118, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 217, in start
curses.wrapper(_wrapper)
File "/usr/local/lib/python3.6/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 215, in _wrapper
function()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 200, in draw_loop
interface.redraw()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 716, in redraw
panel.redraw(force = force, top = occupied)
File "/usr/local/lib/python3.6/site-packages/nyx/panel/__init__.py", line 175, in redraw
self._last_draw_size = nyx.curses.draw(self._draw, top = self._top, height = self.get_height(), draw_if_resized = draw_dimension)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 746, in draw
func(_Subwindow(subwindow_width, subwindow_height, curses_subwindow))
File "/usr/local/lib/python3.6/site-packages/nyx/panel/graph.py", line 586, in _draw
_draw_accounting_stats(subwindow, DEFAULT_CONTENT_HEIGHT + subgraph_height - 2, accounting_stats)
File "/usr/local/lib/python3.6/site-packages/nyx/panel/graph.py", line 708, in _draw_accounting_stats
subwindow.addstr(35, y, 'Time to reset: %s' % str_tools.short_time_label(accounting.time_until_reset))
File "/usr/local/lib/python3.6/site-packages/stem/util/str_tools.py", line 420, in short_time_label
raise ValueError("Input needs to be a non-negative integer, got '%i'" % seconds)
ValueError: Input needs to be a non-negative integer, got '-33538'
```
Logs don't show an upgrade to the Nyx package in a while, so I think this might be some compatibility problems with the dependencies.
**Trac**:
**Username**: strugeeDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32596Python 3.8.0 RuntimeError: dictionary keys changed during iteration2019-11-25T06:15:51ZTracPython 3.8.0 RuntimeError: dictionary keys changed during iterationI was using python 3.7.4 and update python to 3.8.0
and try to use tor, this error is showed (when 3.7.4 working good)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1100, in authenticate
stem.connection.authenticate(self...I was using python 3.7.4 and update python to 3.8.0
and try to use tor, this error is showed (when 3.7.4 working good)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1100, in authenticate
stem.connection.authenticate(self, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 592, in authenticate
controller._post_authentication()
File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication
owning_pid = self.get_conf('__OwningControllerProcess', None)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf
entries = self.get_conf_map(param, default, multiple)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map
for key in reply:
RuntimeError: dictionary keys changed during iteration
Smialar issues other github project https://github.com/vispy/vispy/issues/1729
**Trac**:
**Username**: iiwwnnaaDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32566nyx not starting2020-06-13T10:55:20Zcypherpunksnyx not startingNyx is not starting up after providing the control port password it reports:
```
% nyx
Tor controller password:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth
...Nyx is not starting up after providing the control port password it reports:
```
% nyx
Tor controller password:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth
authenticate(control_socket, password, chroot_path)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 625, in authenticate
raise auth_exc
stem.connection.MissingPassword: no passphrase provided
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/lib/python3.8/site-packages/nyx/starter.py", line 90, in main
controller = init_controller(
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller
TOR_CONTROLLER = stem.connection.connect(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 291, in connect
return _connect_auth(control_connection, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 404, in _connect_auth
return _connect_auth(control_socket, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth
return controller(control_socket, is_authenticated = True)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__
super(Controller, self).__init__(control_socket, is_authenticated)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 585, in __init__
self._post_authentication()
File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication
owning_pid = self.get_conf('__OwningControllerProcess', None)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf
entries = self.get_conf_map(param, default, multiple)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map
for key in reply:
RuntimeError: dictionary keys changed during iteration
```
If the wrong password is provided I get the usual answer:
```
% nyx
Tor controller password:
Incorrect password
```
These are the used software versions
```
% python --version
Python 3.8.0
```
```
% nyx --version
nyx version 2.1.0 (released January 12, 2019)
```
```
% uname -a
Linux archarm 4.19.84-1-ARCH #1 SMP PREEMPT Thu Nov 21 00:50:40 UTC 2019 armv7l GNU/Linux
```
I also get the same error with archlinux x86_64 (kernel 5.3.12) with the same python and nyx versionsDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32552stem says "dictionary keys changed during iteration" with python 3.82020-06-13T10:53:34Zcypherpunksstem says "dictionary keys changed during iteration" with python 3.8Every single time I try to connect to for from Nyx I get
`Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370...Every single time I try to connect to for from Nyx I get
`Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth authenticate(control_socket, password, chroot_path) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 625, in authenticate raise auth_exc stem.connection.MissingPassword: no passphrase provided During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/nyx", line 11, in <module> load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')() File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main nyx.starter.main() File "/usr/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, **kwargs) File "/usr/lib/python3.8/site-packages/nyx/starter.py", line 90, in main controller = init_controller( File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller TOR_CONTROLLER = stem.connection.connect(*args, **kwargs) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 291, in connect return _connect_auth(control_connection, password, password_prompt, chroot_path, controller) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 404, in _connect_auth return _connect_auth(control_socket, password, password_prompt, chroot_path, controller) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth return controller(control_socket, is_authenticated = True) File "/usr/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__ super(Controller, self).__init__(control_socket, is_authenticated) File "/usr/lib/python3.8/site-packages/stem/control.py", line 585, in __init__ self._post_authentication() File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication owning_pid = self.get_conf('__OwningControllerProcess', None) File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf entries = self.get_conf_map(param, default, multiple) File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map for key in reply: RuntimeError: dictionary keys changed during iteration`
Using Arch Linux on a headless server, python 3.8.0b4. Tried both cookie and password authentication methods. Controlport is 9051, inaccessible from outside (firewall set up to allow any internal connections to any port)Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32538Detect package manager in case of not finding pkg python-stem2019-11-19T01:33:53ZTracDetect package manager in case of not finding pkg python-stemIf the python-stem package is not found in the system, an attempt will be made to detect the system package manager.
https://github.com/bounteous/nyx/commit/96a02d85f108538e3abf8efda43f5daa01a99cc8
**Trac**:
**Username**: bounteous17If the python-stem package is not found in the system, an attempt will be made to detect the system package manager.
https://github.com/bounteous/nyx/commit/96a02d85f108538e3abf8efda43f5daa01a99cc8
**Trac**:
**Username**: bounteous17Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32051Nyx unable to read tor's authentication cookie2019-10-25T22:18:26ZcypherpunksNyx unable to read tor's authentication cookieUpagraded to Mint 19 from 18.3 and unable to use arm anymore. Installed Nyx and receiving the following error:
We were unable to read tor's authentication cookie...
Path: /run/tor/control.authcookie
Issue: Authentication failed: un...Upagraded to Mint 19 from 18.3 and unable to use arm anymore. Installed Nyx and receiving the following error:
We were unable to read tor's authentication cookie...
Path: /run/tor/control.authcookie
Issue: Authentication failed: unable to read '/run/tor/control.authcookie' ([Errno 13] Permission denied: '/run/tor/control.authcookie')
ControlPort 9051
CookieAuthentication 1
Hope you can assist.
ThanksDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/31792nyx "amount outbound connection" calculated wrong for 2 relays runnign at sem...2019-12-21T22:30:12Ztoralfnyx "amount outbound connection" calculated wrong for 2 relays runnign at sema ip addressI do run 2 relays at the same ip address at different ports
The stem example shows (corrrect):
```
mr-fox ~ # for p in 9051 29051 ; do python /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport $p; done
0.4.1.6 u...I do run 2 relays at the same ip address at different ports
The stem example shows (corrrect):
```
mr-fox ~ # for p in 9051 29051 ; do python /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport $p; done
0.4.1.6 uptime: 02:15:02 flags: Fast, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 3119 | 3 |
| Inbound to our ControlPort | 1 | 0 |
| Outbound to a relay | 3758 | 0 |
| Outbound uncategorized | 16 | 0 |
+------------------------------+------+------+
| Total | 6894 | 3 |
+------------------------------+------+------+
0.4.1.6 uptime: 02:02:58 flags: Fast, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 2117 | 3 |
| Inbound to our ControlPort | 1 | 0 |
| Outbound to a relay | 3702 | 0 |
| Outbound uncategorized | 16 | 0 |
+------------------------------+------+------+
| Total | 5836 | 3 |
+------------------------------+------+------+
```
A call of nyx, eg.:
```
sudo -u tor /bin/bash -c "/usr/bin/nyx -i 9051"
```
however shows about 7500 connections (Alt+S -> Connections) which seems to be the sum of boths.
Netstat etc how that the command line values are right, Nyx is wrong.Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/30750Cosmetic looks label alpha dev ico metrics terminal NYX2019-06-05T17:31:39ZTracCosmetic looks label alpha dev ico metrics terminal NYXHello, you can return description label **NEW** in NYX and nice icon lab in metrics relay site or think differently? We running alpha dev relays bridge and hs service and new labels _unrecommended_ in terminal look aren't nice.
Please ...Hello, you can return description label **NEW** in NYX and nice icon lab in metrics relay site or think differently? We running alpha dev relays bridge and hs service and new labels _unrecommended_ in terminal look aren't nice.
Please consider testers and researchers.
It's just a cosmetic looks for NYX and metrics.
Previously was label Tor 0.4.1.1-alpha-dev (NEW)
**Trac**:
**Username**: agnoxhttps://gitlab.torproject.org/legacy/trac/-/issues/30465Python error and program crash when pressing "m" menu key2019-12-21T22:28:06ZcypherpunksPython error and program crash when pressing "m" menu keyRunning system:
```
FreeBSD hostname 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
```
Packages:
```
tor-0.3.5.8
nyx-2.1.0
py36-stem-1.7.1
```
When I run Nyx and press the "m" key for the menu, I get the following error:
```...Running system:
```
FreeBSD hostname 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
```
Packages:
```
tor-0.3.5.8
nyx-2.1.0
py36-stem-1.7.1
```
When I run Nyx and press the "m" key for the menu, I get the following error:
```
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.6/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.6/site-packages/nyx/starter.py", line 128, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 219, in start
curses.wrapper(_wrapper)
File "/usr/local/lib/python3.6/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 217, in _wrapper
function()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 221, in draw_loop
nyx.menu.show_menu()
File "/usr/local/lib/python3.6/site-packages/nyx/menu.py", line 210, in show_menu
selection_x = _draw_top_menubar(menu, cursor.selection)
File "/usr/local/lib/python3.6/site-packages/nyx/menu.py", line 296, in _draw_top_menubar
nyx.curses.draw(_render, height = 1, background = RED)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 758, in draw
curses_subwindow.bkgd(' ', curses_attr(background, HIGHLIGHT))
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 440, in curses_attr
encoded |= _color_attr()[override if override else attr]
KeyError: 'none'
```Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/29431nyx tool not working2019-02-10T01:49:40Zcypherpunksnyx tool not workingThere is a file not found error, see below
Traceback (most recent call last): File "/usr/bin/nyx", line 11, in <module> load_entry_point('nyx==2.0.4', 'cons...There is a file not found error, see below
Traceback (most recent call last): File "/usr/bin/nyx", line 11, in <module> load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/nyx/__init__.py", line 46, in <module> import distutils.spawn ModuleNotFoundError: No module named 'distutils.spawn'Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/29078nyx values do differ from stem native example2019-01-18T22:17:27Ztoralfnyx values do differ from stem native exampleI do run 2 Tor relaays at the same hardware at 2 different ports. Netstat reports about 12,000 connections.
Stem 1.7.1 gives:
```
mr-fox ~ # for p in 9051 29051 ; do python /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py -...I do run 2 Tor relaays at the same hardware at 2 different ports. Netstat reports about 12,000 connections.
Stem 1.7.1 gives:
```
mr-fox ~ # for p in 9051 29051 ; do python /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport $p; done
0.3.5.7 uptime: 08:25:03 flags: Fast, Guard, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 2777 | 6 |
| Inbound to our DirPort | 3 | 0 |
| Inbound to our ControlPort | 1 | 0 |
| Outbound to a relay | 3235 | 0 |
| Outbound uncategorized | 8 | 0 |
+------------------------------+------+------+
| Total | 6024 | 6 |
+------------------------------+------+------+
0.3.5.7 uptime: 08:25:05 flags: Fast, Guard, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 2866 | 2 |
| Inbound to our ControlPort | 2 | 0 |
| Outbound to a relay | 3447 | 0 |
| Outbound uncategorized | 16 | 0 |
+------------------------------+------+------+
| Total | 6331 | 2 |
+------------------------------+------+------+
```
whilst nyx 2.0.4 gives:
```
sudo -u tor /bin/bash -c "/usr/bin/nyx -i 29051"
...
Connections (2853 inbound, 6690 outbound, 1 control):
```
and
```
sudo -u tor /bin/bash -c "/usr/bin/nyx -i 9051"
...
Connections (2787 inbound, 6694 outbound, 1 control):
```
respectively.Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28965Please accept -i :9150 parameter2018-12-30T19:24:01ZtraumschulePlease accept -i :9150 parameterFor lazyness it would be handy to use `-i :9150` as shortcut for `-i 127.0.0.1:9150`, currently nyx returns
`'' isn't a valid IPv4 address`.
Thanks!For lazyness it would be handy to use `-i :9150` as shortcut for `-i 127.0.0.1:9150`, currently nyx returns
`'' isn't a valid IPv4 address`.
Thanks!Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28902GETINFO commands with huge outputs slow down interpreter curses interface2019-01-06T05:12:12ZTracGETINFO commands with huge outputs slow down interpreter curses interfaceIf you go to Nyx interpreter, run some commands, then press ESC and arrow up, you see that scrolling back in history is very fast and smooth.
Now do the following:
1. Run `GETINFO desc/all-recent` command 3 times to get very huge output...If you go to Nyx interpreter, run some commands, then press ESC and arrow up, you see that scrolling back in history is very fast and smooth.
Now do the following:
1. Run `GETINFO desc/all-recent` command 3 times to get very huge output.
2. Press ESC and then press HOME to get at the top of scroll buffer.
3. Press arrow up and arrow down keys many times to scroll up/down.
4. Press ENTER to return to command interface.
5. Run some command with small output, e.g. `GETINFO info/names`.
6. Press ESC and try to scroll few lines up by pressing arrow up many times.
You will see that scrolling is very slow. You need few seconds to scroll just few lines up in the buffer.
Nyx version is [[one](http://ea5faa5po25cf7fb.onion/projects/tor/ticket/28332#comment:7|this)]. The ticket is filed by atagar's [[http://ea5faa5po25cf7fb.onion/projects/tor/ticket/28877#comment:3|request]]:
> I suspect your initial hypothesis about the reason Nyx is freezing is inaccurate. Feel free to file a separate ticket with the `nyx --debug` output when Nyx freezes so I can see what's up.
**Trac**:
**Username**: wagonDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28781nyx crash with traceback while browsing config2018-12-07T17:33:09ZTracnyx crash with traceback while browsing config**Versions**:
nyx: `2.0.4` installed with pip
stem: `1.7.0` installed with pip
tor: `0.3.4.9-1~bionic+1` installed from apt repository at deb.torproject.org
OS: Ubuntu GNU/Linux 18.04 Bionic
**Configuration**:
`/etc/tor/torrc...**Versions**:
nyx: `2.0.4` installed with pip
stem: `1.7.0` installed with pip
tor: `0.3.4.9-1~bionic+1` installed from apt repository at deb.torproject.org
OS: Ubuntu GNU/Linux 18.04 Bionic
**Configuration**:
`/etc/tor/torrc`:
```
SOCKSPort 127.0.0.1:9050
Log notice file /var/log/tor/notices.log
CookieAuthentication 1
DisableDebuggerAttachment 0
ORPort 443
BandwidthRate 4096 KBytes
BandwidthBurst 5120 KBytes
RelayBandwidthRate 4096 KBytes
RelayBandwidthBurst 5120 KBytes
ExitRelay 0
ExitPolicy reject *:*
HardwareAccel 1
```
`~/.nyx/config` - does not exist
**Steps to reproduce**:
* start nyx
* press `m` to show menu
* choose View - Config
* press `a` to show all options
* start scrolling down with key `down arrow` until the end
* nyx crashes
**Traceback**:
```
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
File "/usr/local/lib/python2.7/dist-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python2.7/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nyx/starter.py", line 118, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python2.7/dist-packages/nyx/curses.py", line 217, in start
curses.wrapper(_wrapper)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/nyx/curses.py", line 215, in _wrapper
function()
File "/usr/local/lib/python2.7/dist-packages/nyx/__init__.py", line 243, in draw_loop
keybinding.handle(key)
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/__init__.py", line 82, in handle
self._action(key)
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/config.py", line 232, in _scroll
self.redraw()
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/__init__.py", line 175, in redraw
self._last_draw_size = nyx.curses.draw(self._draw, top = self._top, height = self.get_height(), draw_if_resized = draw_dimension)
File "/usr/local/lib/python2.7/dist-packages/nyx/curses.py", line 746, in draw
func(_Subwindow(subwindow_width, subwindow_height, curses_subwindow))
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/config.py", line 315, in _draw
_draw_line(subwindow, scroll_offset, DETAILS_HEIGHT + i, entry, entry == selected, value_width, description_width)
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/config.py", line 335, in _draw_line
attr = [CONFIG['attr.config.category_color'].get(entry.category, WHITE)]
File "/usr/local/lib/python2.7/dist-packages/nyx/panel/config.py", line 136, in category
return getattr(manual(self.name), 'category')
AttributeError: 'NoneType' object has no attribute 'category'
```
**Trac**:
**Username**: iquziev7Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28498Unable to refresh connection circuit2019-01-11T17:57:53ZTracUnable to refresh connection circuitUnder slow internet connection it takes sometime to establish all the circuit. When nyx gets started and connection tab is accessed, it show intial circuits created upto that time and show remaining as building. After sometime, when thos...Under slow internet connection it takes sometime to establish all the circuit. When nyx gets started and connection tab is accessed, it show intial circuits created upto that time and show remaining as building. After sometime, when those connections are built, nyx does not refresh those new connections. I have to manually close nyx and reopen it. It would be better to have option in nyx to refresh connections.
Thanks
**Trac**:
**Username**: cyberpunksDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28334Text fields wider than the screeen cropped2019-12-21T22:25:20ZTracText fields wider than the screeen croppedNyx 2.0.4 at Linux.
The first problem exist with all options: if I select some option, then press `Enter` (so, start editing it), and then press `ESC`, all old values for the option are erased (value becomes `none`). This behavior confu...Nyx 2.0.4 at Linux.
The first problem exist with all options: if I select some option, then press `Enter` (so, start editing it), and then press `ESC`, all old values for the option are erased (value becomes `none`). This behavior confuses users, because normally `ESC` should keep old version of values. To my opinion, if I really need to make it `none` I should manually remove old values (or press `ctrl+u`) and then press `Enter`.
The second problem exist with options which have very long list of values. For example, you can consider `torrc` with a long list of `SocksPort` options or a long list of values for `ExcludeNodes` option. If you select such option in configuration editor (press `Enter`), only the first part of values' list will be shown. Other lengthy part of values list will not be printed and will not be accessible for editing (it is considered as non-existing). I guess it is related to the problem of line splitting ([[https://trac.torproject.org/projects/tor/ticket/28297|#28297]]). Since the first part of accessible values may end at any character (when end of line is reached), if I don't do anything, but just print `Enter`, I may get an error
`Unacceptable option value: Invalid SocksPort configuration (press any key)`
As `nyx` gives to Tor wrong option values, there are many warnings in a log file of `tor` itself, e.g.:
`Controller gave us config lines that didn't validate: Invalid SocksPort configuration`
Thus, if you accidentally press `Enter` on any option with too long list of values, you get trapped in inescapable situation: `ESC` will erase all old values, `Enter` will change them too (possibly with some errors). It is impossible to preserve status quo.
**Trac**:
**Username**: wagonDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28332Nyx configurashion editor reproducibly crashes if custom ordering is set2018-11-07T17:54:45ZTracNyx configurashion editor reproducibly crashes if custom ordering is setNyx 2.0.4 at Linux. How to reproduce:
1. Go to configuration editor.
2. Press `s` and select the following order: `Is Set`, `Name`, `Description`.
3. "Toggle filtering" by pressing `a`.
4. Nyx immediately crashes with the followi...Nyx 2.0.4 at Linux. How to reproduce:
1. Go to configuration editor.
2. Press `s` and select the following order: `Is Set`, `Name`, `Description`.
3. "Toggle filtering" by pressing `a`.
4. Nyx immediately crashes with the following log:
```
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 9, in <module>
load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
File "/usr/local/lib/python3.4/dist-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.4/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/nyx/starter.py", line 118, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python3.4/dist-packages/nyx/curses.py", line 217, in start
curses.wrapper(_wrapper)
File "/usr/lib/python3.4/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.4/dist-packages/nyx/curses.py", line 215, in _wrapper
function()
File "/usr/local/lib/python3.4/dist-packages/nyx/__init__.py", line 243, in draw_loop
keybinding.handle(key)
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/__init__.py", line 84, in handle
self._action()
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 258, in _toggle_show_all
self._sort_content()
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 325, in _sort_content
self._all_content = sorted(self._all_content, key = lambda entry: [entry.sort_value(field) for field in self._sort_order])
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 325, in <lambda>
self._all_content = sorted(self._all_content, key = lambda entry: [entry.sort_value(field) for field in self._sort_order])
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 325, in <listcomp>
self._all_content = sorted(self._all_content, key = lambda entry: [entry.sort_value(field) for field in self._sort_order])
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 128, in sort_value
return self.description
File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 148, in description
return getattr(manual(self.name), 'description')
AttributeError: 'NoneType' object has no attribute 'description'
```
I guess it would also crash with many other types of ordering.
**Trac**:
**Username**: wagonDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28299Custom colors for Nyx and tor-prompt are needed2019-01-02T00:35:11ZTracCustom colors for Nyx and tor-prompt are neededIf `color_interface true` is selected for Nyx, some elements are highlighted, but their colors cannot be changed. It would be good to add `nyxrc` options for custom colors. `tor-prompt` also needs config options to select colors.
**Trac...If `color_interface true` is selected for Nyx, some elements are highlighted, but their colors cannot be changed. It would be good to add `nyxrc` options for custom colors. `tor-prompt` also needs config options to select colors.
**Trac**:
**Username**: wagonDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28297Control interpreter in nyx does not do line splitting2019-01-04T23:09:49ZTracControl interpreter in nyx does not do line splittingWhen `GETINFO circuit-status` is typed in control interpreter of `nyx` (2.0.4), long lines are not split. Therefore, full `tor`'s reply cannot be seen. It looks like (names of Tor nodes are fake):
```
>>> GETINFO circuit-status
250+circ...When `GETINFO circuit-status` is typed in control interpreter of `nyx` (2.0.4), long lines are not split. Therefore, full `tor`'s reply cannot be seen. It looks like (names of Tor nodes are fake):
```
>>> GETINFO circuit-status
250+circuit-status=
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~nodeone,$FINGE
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~nodetwotwo2,$F
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~node11,$FINGER
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~nodethree1,$FI
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~tnode,$FINGERP
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~Unnamed,$FINGE
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~anothernode,$F
XXXX BUILT $FINGERPRINT~NODENAME,$FINGERPRINT~nodenew2,$FING
.
250 OK
```
Other commands which output long lines may also have this problem.
Interestingly, contrary to `nyx`, `tor-prompt` do line splitting correctly.
**Trac**:
**Username**: wagonDamian JohnsonDamian Johnson