markqvist / LXMF

A universal, distributed and secure messaging protocol for Reticulum
MIT License
241 stars 16 forks source link

Error When Enabling Nomadnet Node on Mx Linux #19

Closed fr33n0w closed 1 month ago

fr33n0w commented 1 month ago

Describe the Bug

On MXLinux, when enabling the node feature in the config of nomadnet (enabling nomadnet pages), nomadnet closes with the following error:

Traceback (most recent call last):
  File "/home/frk/.local/bin/nomadnet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/frk/.local/lib/python3.11/site-packages/nomadnet/nomadnet.py", line 51, in main
    program_setup(configarg, rnsconfigarg, daemon, console)
  File "/home/frk/.local/lib/python3.11/site-packages/nomadnet/nomadnet.py", line 11, in program_setup
    app = nomadnet.NomadNetworkApp(
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frk/.local/lib/python3.11/site-packages/nomadnet/NomadNetworkApp.py", line 336, in __init__
    self.message_router.enable_propagation()
  File "/home/frk/.local/lib/python3.11/site-packages/LXMF/LXMRouter.py", line 466, in enable_propagation
    raise e
  File "/home/frk/.local/lib/python3.11/site-packages/LXMF/LXMRouter.py", line 437, in enable_propagation
    peer = LXMPeer.from_bytes(serialised_peer, self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frk/.local/lib/python3.11/site-packages/LXMF/LXMPeer.py", line 42, in from_bytes
    peer = LXMPeer(router, dictionary["destination_hash"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frk/.local/lib/python3.11/site-packages/LXMF/LXMPeer.py", line 111, in __init__
    self.destination = RNS.Destination(self.identity, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "propagation")
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frk/.local/lib/python3.11/site-packages/RNS/Destination.py", line 171, in __init__
    raise ValueError("Can't create outbound SINGLE destination without an identity")
ValueError: Can't create outbound SINGLE destination without an identity 

It seems to be an identity error but it's not! (or maybe an error for the identity of the nomad node!)

When disabling the "enable node" in the config, nomadnet starts working again without problems, but i have only the nomad client, i want to enable node to serve pages. There is a way to fix om my machine, or is a nomadnet problem? i tested also on debian, mint, windows, but never got this error!!

On windows cannot also get pages working due to a "stty" error...windows doesn't have stty, so i think the problem is there.

markqvist commented 1 month ago

Thank you! Transferred to LXMF repository, as this is where the bug is located.

fr33n0w commented 1 month ago

thank you for your great and hard work mark!!!

i just managed to resolve the problem disabling the propagation node in the config file!!!

Verbose explanation: in the config file:

disable_propagation = False

changed into: disable_propagation = true the nomadnet client return to open up normally without errors, and now with keeping node hosting active: enable_node = yes it works perfectly and i'm able to host pages, but losing the ability to host a propagation node, that i'm currently running on a meshchat client on the same machine.

another user found the same issue on his raspberry nomadnet installation and pointed out to me, resolving my the issue too (don't know his OS version, sorry)

markqvist commented 1 month ago

Yes, that should be a good workaround for now! The issue happened because at some point your node had propagation enabled, and remembered old propagation peers that now cannot have their identity keys resolved. It was nice of you to report it, since it of course shouldn't crash when that happens!

I'll release an update to LXMF soon with the fix included :)