bitmask-vpn crashes if iptables is not installed
Running `0.24.6-rc.1-g8edc50a` on a Debian 12 with XFCE installed:
1) iptables is not installed
2) bitmask-root fails
3) Initialization process fails and returns an error
4) Our error handling is garbage...
pea@leap-debian12:~/bitmask-vpn$ bitmask-vpn
qml: flavor: bitmask-vpn
2024-06-24T17:32:03+02:00 INF Enabling logging hint="you can change the log level with env LOG_LEVEL=INFO|DEBUG|TRACE" logFile=/home/pea/.config/leap/systray.log
2024-06-24T17:32:03+02:00 INF Checking for updates url=https://downloads.leap.se/RiseupVPN/linux/lastver
2024-06-24T17:32:03+02:00 INF Sucessfully checked if there is an update updateAvailable=false
2024-06-24T17:32:03+02:00 INF Stopping firewall
2024-06-24T17:32:04+02:00 WRN Error running bitmask-root: "Traceback (most recent call last):
File "/usr/sbin/bitmask-root", line 121, in <module>
IPTABLES = swhich("iptables")
^^^^^^^^^^^^^^^^^^
File "/usr/sbin/bitmask-root", line 118, in swhich
raise Exception("Can't find %s" % (binary,))
Exception: Can't find iptables" error="exit status 1" cmd="/usr/sbin/bitmask-root firewall stop"
2024-06-24T17:32:04+02:00 WRN Could not stop firewall error="exit status 1"
2024-06-24T17:32:04+02:00 ERR Could not initialize bitmask error="exit status 1"
2024-06-24T17:32:04+02:00 INF Fetching gateways...
qml: errors, setting root.error
qml: errors, setting root.error
2024-06-24T17:32:05+02:00 WRN Could not fetch geolocation error="Post \"https://menshen.demo.bitmask.net/json\": tls: failed to verify certificate: x509: certificate signed by unknown authority"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x555a6d18083d]
goroutine 62 [running]:
0xacab.org/leap/bitmask-vpn/pkg/backend.connectionCtx.delayCheckForGateways.func1()
/home/pea/bitmask-vpn/build/bitmask/build/bitmask-vpn_0.24.6-rc.1/pkg/backend/gatewaychecker.go:18 +0x5d
created by 0xacab.org/leap/bitmask-vpn/pkg/backend.connectionCtx.delayCheckForGateways in goroutine 6
/home/pea/bitmask-vpn/build/bitmask/build/bitmask-vpn_0.24.6-rc.1/pkg/backend/gatewaychecker.go:10 +0xaf
Aborted
pea@leap-debian12:~/bitmask-vpn$