markqvist / NomadNet

Communicate Freely
GNU General Public License v3.0
1.15k stars 43 forks source link

Crash on Android/Termux when trying to browse #36

Closed r8io closed 6 months ago

r8io commented 11 months ago

NomadNet crashes on Android/Termux when trying to browse a page. It seems to be an urwid issue.

System: Google Pixel 6a GrapheneOS 2023101100 Android Version 14 Termux Version 0.118.0 Reticulum Version 0.6.2 NomadNet Version 0.3.9


[2023-10-11 19:23:33] [Notice] Configuration loaded from /data/data/com.termux/files/home/.nomadnetwork/config
[2023-10-11 19:23:33] [Notice] Loaded Primary Identity <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> from /data/data/com.termux/files/home/.nomadnetwork/storage/identity
[2023-10-11 19:23:33] [Notice] LXMF Router ready to receive on: <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
[2023-10-11 19:23:33] [Notice] LXMF Propagation Node started on: <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
[2023-10-11 19:23:33] [Info] Selecting <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> as default LXMF propagation node
[2023-10-11 19:23:33] [Info] Starting user interface...
[2023-10-11 19:23:41] [Error] An unhandled exception occurred, the details of which will be dumped below
[2023-10-11 19:23:41] [Error] Type  : <class 'AssertionError'>
[2023-10-11 19:23:41] [Error] Value : 
[2023-10-11 19:23:41] [Error] Trace : 
  File "/data/data/com.termux/files/usr/bin/nomadnet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/nomadnet/nomadnet.py", line 51, in main
    program_setup(configarg, rnsconfigarg, daemon, console)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/nomadnet/nomadnet.py", line 11, in program_setup
    app = nomadnet.NomadNetworkApp(
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/nomadnet/NomadNetworkApp.py", line 363, in __init__
    nomadnet.ui.spawn(self.uimode)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/nomadnet/ui/__init__.py", line 29, in spawn
    return TextUI()
           ^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/nomadnet/ui/TextUI.py", line 211, in __init__
    self.loop.run()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 287, in run
    self._run()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 385, in _run
    self.event_loop.run()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 790, in run
    self._loop()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 818, in _loop
    self._entering_idle()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 779, in _entering_idle
    callback()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 574, in entering_idle
    self.draw_screen()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/main_loop.py", line 589, in draw_screen
    self.screen.draw_screen(self.screen_size, canvas)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/raw_display.py", line 778, in draw_screen
    for row in r.content():
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/canvas.py", line 601, in content
    yield shard_body_row(sbody)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/canvas.py", line 833, in shard_body_row
    row.extend(next(content_iter))
               ^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/urwid/canvas.py", line 415, in content
    assert trim_left >= 0 and trim_left < maxcol
                              ^^^^^^^^^^^^^^^^^^
'''  
markqvist commented 6 months ago

Assuming fixed with urwid updates.