morpheusthewhite / nordpy

A gui application to connect automatically to the recommended NordVPN server
GNU General Public License v3.0
105 stars 16 forks source link

NordPy and Fedora 29 Wayland: Floating Point Exception #17

Closed rharmonson closed 5 years ago

rharmonson commented 5 years ago

After installation and running as a non-root user from Master branch, prompted for root's password but not accepted and prompts again--"Wrong root password, insert it again."

Installing and using NordPy as root works great! <-- NOT TRUE

Let me know if I can provide additional details or test something.

rharmonson commented 5 years ago

On further testing, I am having other issues using root.

I am going to close the issue and monitor your progress. I saw code updates within 8 hours ago. Safe to say you are amidst development. I will wait and check back in a few weeks.

morpheusthewhite commented 5 years ago

The password you provide to the window is the same you type in when launching a command with sudo? If yes, can you try to run

sudo ./nordpy.py

in the directory and tell me if it works?


install.sh completed with only one oddity which at a glance does not seem related

installing certificates (needed by ipsec)
/etc/ipsec.d/cacerts/NordVPN.der: No such file or directory

It's because on Fedora ipsec support fails to install (I will soon suppress that error)

morpheusthewhite commented 5 years ago

What are these other issues you are having?

rharmonson commented 5 years ago

I decided to install Fedora 29 to test as it is the current version--didn't make sense to invest time in Fedora 28. Initially, the thought was to start with root then move to a sudo user, but testing with root resulted with Floating point exception (core dumped).

Using VirtualBox, installed using Fedora 29 Live media then updated. I made no customization whatsoever. After reboot, cloned your master branch and executed install.sh. Full transcript given below.

[root@localhost NordPy]# ./install.sh 
Do you want to install support for obfuscated servers (it will reinstall openvpn)?[y/n] (Recommended: n)
n
sudo: apt-get: command not found
Dependencies resolved.
================================================================================
 Package                        Arch     Version              Repository   Size
================================================================================
Removing:
 openvpn                        x86_64   2.4.7-1.fc29         @updates    1.3 M
Removing dependent packages:
 NetworkManager-openvpn-gnome   x86_64   1:1.8.10-1.fc29      @updates    212 k
Removing unused dependencies:
 NetworkManager-openvpn         x86_64   1:1.8.10-1.fc29      @updates    1.1 M
 pkcs11-helper                  x86_64   1.22-6.fc29          @anaconda   156 k

Transaction Summary
================================================================================
Remove  4 Packages

Freed space: 2.7 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/1 
  Erasing          : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/4 
  Erasing          : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          2/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Verifying        : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          1/4 
  Verifying        : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    2/4 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 

Removed:
  openvpn-2.4.7-1.fc29.x86_64                                                   
  NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64                           
  NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64                                 
  pkcs11-helper-1.22-6.fc29.x86_64                                              

Complete!
which: no openvpn in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
sudo: apt-get: command not found
Last metadata expiration check: 0:22:52 ago on Mon 08 Apr 2019 08:41:34 PM PDT.
Dependencies resolved.
================================================================================
 Package              Architecture  Version                Repository      Size
================================================================================
Installing:
 openvpn              x86_64        2.4.7-1.fc29           updates        522 k
Installing dependencies:
 pkcs11-helper        x86_64        1.22-6.fc29            fedora          62 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 584 k
Installed size: 1.4 M
Downloading Packages:
(1/2): openvpn-2.4.7-1.fc29.x86_64.rpm          520 kB/s | 522 kB     00:01    
(2/2): pkcs11-helper-1.22-6.fc29.x86_64.rpm      35 kB/s |  62 kB     00:01    
--------------------------------------------------------------------------------
Total                                           224 kB/s | 584 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Installing       : openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            1/2 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       2/2 

Installed:
  openvpn-2.4.7-1.fc29.x86_64          pkcs11-helper-1.22-6.fc29.x86_64         

Complete!
Required packages installed
installing certificates (needed by ipsec)
Saving desktop shortcut in /usr/local/share/applications
downloading and extracting conf files from NordVPN
**[root@localhost NordPy]# ./nordpy.py 
Retrieved stats
Floating point exception (core dumped)**
[root@localhost NordPy]# 

Curious as to what python3 packages where installed, I used rpm to grep.

[root@localhost NordPy]# rpm -qa| grep -i python3
python3-louis-3.7.0-2.fc29.noarch
python3-hawkey-0.28.1-1.fc29.x86_64
python3-kickstart-3.16-1.fc29.noarch
python3-dateutil-2.7.5-1.fc29.noarch
python3-sssdconfig-2.1.0-2.fc29.noarch
python3-ply-3.9-8.fc29.noarch
python3-cffi-1.11.5-6.fc29.x86_64
python3-slip-0.6.4-12.fc29.noarch
python3-rpm-4.14.2.1-2.fc29.x86_64
python3-pysocks-1.6.8-4.fc29.noarch
python3-idna-2.7-3.fc29.noarch
python3-six-1.11.0-6.fc29.noarch
python3-cups-1.9.72-22.fc29.x86_64
python3-pwquality-1.4.0-10.fc29.x86_64
python3-gobject-base-3.30.4-1.fc29.x86_64
python3-ntplib-0.3.3-12.fc29.noarch
python3-unbound-1.8.3-2.fc29.x86_64
python3-mako-1.0.6-11.fc29.noarch
python3-audit-3.0-0.7.20190326git03e7489.fc29.x86_64
python3-systemd-234-7.fc29.x86_64
python3-brlapi-0.6.7-31.fc29.x86_64
python3-pyudev-0.21.0-8.fc29.noarch
python3-dbus-1.2.8-3.fc29.x86_64
python3-setuptools-40.8.0-1.fc29.noarch
python3-inotify-0.9.6-13.fc29.noarch
python3-libcomps-0.1.11-1.fc29.x86_64
python3-tempita-0.5.1-20.fc29.noarch
python3-pyOpenSSL-19.0.0-1.fc29.noarch
python3-meh-gui-0.47-1.fc29.noarch
python3-tkinter-3.7.2-5.fc29.x86_64
python3-pycparser-2.14-15.fc29.noarch
python3-bytesize-1.4-1.fc29.x86_64
python3-crypto-2.6.1-24.fc29.x86_64
python3-chardet-3.0.4-7.fc29.noarch
python3-pillow-5.3.0-1.fc29.x86_64
python3-setools-4.1.1-13.fc29.x86_64
python3-libreport-2.10.0-1.fc29.x86_64
python3-decorator-4.3.0-1.fc29.noarch
python3-enchant-2.0.0-5.fc29.noarch
python3-speechd-0.8.8-8.fc29.x86_64
python3-cairo-1.17.1-2.fc29.x86_64
python3-markupsafe-1.0-1.fc29.x86_64
python3-asn1crypto-0.24.0-5.fc29.noarch
python3-requests-file-1.4.3-8.fc29.noarch
python3-beaker-1.10.0-1.fc29.noarch
python3-langtable-0.0.41-1.fc29.noarch
python3-urllib3-1.24.1-2.fc29.noarch
python3-gobject-3.30.4-1.fc29.x86_64
python3-libs-3.7.2-5.fc29.x86_64
python3-pid-2.2.3-1.fc29.noarch
python3-dnf-plugins-core-4.0.6-1.fc29.noarch
python3-meh-0.47-1.fc29.noarch
python3-slip-dbus-0.6.4-12.fc29.noarch
python3-coverage-4.5.1-3.fc29.x86_64
python3-humanize-0.5.1-14.fc29.noarch
python3-pyxdg-0.26-3.fc29.noarch
python3-blivet-3.1.2-4.fc29.noarch
python3-pip-18.1-1.fc29.noarch
python3-blockdev-2.21-1.fc29.x86_64
python3-gpg-1.12.0-1.fc29.x86_64
python3-pyparted-3.11.0-17.fc29.x86_64
python3-ordered-set-2.0.2-7.fc29.noarch
libpeas-loader-python3-1.22.0-9.fc29.x86_64
python3-pycurl-7.43.0.2-3.fc29.x86_64
python3-olefile-0.46-1.fc29.noarch
python3-pytz-2018.5-1.fc29.noarch
python3-libselinux-2.8-6.fc29.x86_64
python3-libsemanage-2.8-8.fc29.x86_64
python3-dnf-4.2.2-2.fc29.noarch
python3-policycoreutils-2.8-17.fc29.noarch
python3-requests-2.20.0-1.fc29.noarch
python3-augeas-0.5.0-13.fc29.noarch
python3-3.7.2-5.fc29.x86_64
python3-libxml2-2.9.8-5.fc29.x86_64
python3-paste-2.0.3-8.fc29.noarch
python3-bind-9.11.5-4.P4.fc29.noarch
python3-iniparse-0.4-32.fc29.noarch
python3-pyatspi-2.30.0-1.fc29.noarch
python3-distro-1.3.0-4.fc29.noarch
python3-firewall-0.6.3-1.fc29.noarch
python3-abrt-addon-2.12.0-2.fc29.x86_64
python3-cryptography-2.3-2.fc29.x86_64
python3-simpleline-1.4-1.fc29.noarch
python3-requests-ftp-0.3.1-13.fc29.noarch
python3-productmd-1.21-1.fc29.noarch
python3-pydbus-0.6.0-7.fc29.noarch
python3-libdnf-0.28.1-1.fc29.x86_64
python3-abrt-2.12.0-2.fc29.x86_64

Let me know how I can help. I want this to work.

morpheusthewhite commented 5 years ago

You have the needed python packages;

Can you repeat the process (clone and installation as well as the launch of the application) without entering su but instead entering your password only when needed by sudo?

rharmonson commented 5 years ago

Absolutely!

Here is the complete transcript with the resulting _tkinter.TclError: couldn't connect to display ":0" error when executing nordpy.py.

[johndoe@localhost ~]$ git clone https://github.com/morpheusthewhite/NordPy.git
Cloning into 'NordPy'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 649 (delta 21), reused 36 (delta 11), pack-reused 596
Receiving objects: 100% (649/649), 445.34 KiB | 1.86 MiB/s, done.
Resolving deltas: 100% (409/409), done.
[johndoe@localhost ~]$ cd NordPy/
[johndoe@localhost NordPy]$ ./install.sh 
Do you want to install support for obfuscated servers (it will reinstall openvpn)?[y/n] (Recommended: n)
n
[sudo] password for johndoe: 
sudo: apt-get: command not found
Dependencies resolved.
================================================================================
 Package                        Arch     Version              Repository   Size
================================================================================
Removing:
 openvpn                        x86_64   2.4.7-1.fc29         @updates    1.3 M
Removing dependent packages:
 NetworkManager-openvpn-gnome   x86_64   1:1.8.10-1.fc29      @updates    212 k
Removing unused dependencies:
 NetworkManager-openvpn         x86_64   1:1.8.10-1.fc29      @updates    1.1 M
 pkcs11-helper                  x86_64   1.22-6.fc29          @anaconda   156 k

Transaction Summary
================================================================================
Remove  4 Packages

Freed space: 2.7 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/1 
  Erasing          : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/4 
  Erasing          : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          2/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Verifying        : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          1/4 
  Verifying        : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    2/4 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 

Removed:
  openvpn-2.4.7-1.fc29.x86_64                                                   
  NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64                           
  NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64                                 
  pkcs11-helper-1.22-6.fc29.x86_64                                              

Complete!
which: no openvpn in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
sudo: apt-get: command not found
Fedora Modular 29 - x86_64 - Updates             21 kB/s |  17 kB     00:00    
Fedora Modular 29 - x86_64 - Updates            639 kB/s | 2.1 MB     00:03    
Fedora 29 - x86_64 - Updates                     46 kB/s |  18 kB     00:00    
Last metadata expiration check: 0:00:01 ago on Tue 09 Apr 2019 04:03:46 AM PDT.
Dependencies resolved.
================================================================================
 Package              Architecture  Version                Repository      Size
================================================================================
Installing:
 openvpn              x86_64        2.4.7-1.fc29           updates        522 k
Installing dependencies:
 pkcs11-helper        x86_64        1.22-6.fc29            fedora          62 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 584 k
Installed size: 1.4 M
Downloading Packages:
(1/2): pkcs11-helper-1.22-6.fc29.x86_64.rpm     155 kB/s |  62 kB     00:00    
(2/2): openvpn-2.4.7-1.fc29.x86_64.rpm          437 kB/s | 522 kB     00:01    
--------------------------------------------------------------------------------
Total                                           366 kB/s | 584 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Installing       : openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            1/2 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       2/2 

Installed:
  openvpn-2.4.7-1.fc29.x86_64          pkcs11-helper-1.22-6.fc29.x86_64         

Complete!
Required packages installed
installing certificates (needed by ipsec)
Saving desktop shortcut in /usr/local/share/applications
downloading and extracting conf files from NordVPN
[johndoe@localhost NordPy]$ ./nordpy.py 
Retrieved stats
Retrieved stats
No protocol specified
No protocol specified
Traceback (most recent call last):
  File "./nordpy.py", line 30, in <module>
    main()
  File "./nordpy.py", line 25, in main
    app = gui()
  File "/home/johndoe/NordPy/bin/gui.py", line 22, in __init__
    super().__init__()
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 2023, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0"
[johndoe@localhost NordPy]$ 

Also, a difference with my initial attempts with Fedora 28 is the password prompt field/screen is tiny. Weird. The error is generated after entering password and hitting enter. Using sudo ./nordpy.py results with the same error without the password prompt dialogue.

nordpy_fed29 jpb nordpy_fed29_err

morpheusthewhite commented 5 years ago

Leaving for a moment the textbox size (we'll solve it later), the problem is caused by the decision of Gnome developers to prevent root to access display 0 (you can find here the reported bug and here the discussion about it).

So to authorize it you just have to run

xhost si:localuser:root

It should work after that

rharmonson commented 5 years ago

(I didn't refresh my screen so I didn't see your entry above. I will test your suggestion tonight.)

I may have figured out the core of the problem. Wayland/Gnome3 and its new security features. To summarize my understanding, it actively prevents user processes to escalate privileges to root. Details can be found at https://bugzilla.redhat.com/show_bug.cgi?id=1274451.

To test my hypothesis, I installed Fedora 29 Mint using Gnome 2. The results are mixed, but I think it verifies the above.

NordPy launched, the root password window was appropriately sized, escalated privileges without issue, and I successfully authenticated, and established a layer 3 connection. However, DNS resolution doesn't work.

Below is me testing layer 3 connectivity and DNS.

[janedoe@localhost ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:67:49:b5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.nonurbiz.2/24 brd 192.168.22.255 scope global dynamic noprefixroute enp0s3
       valid_lft 13122sec preferred_lft 13122sec
    inet6 fe80::927a:36:2dd6:d8d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
    link/none 
    inet 10.7.9.7/24 brd 10.7.9.255 scope global tun0
       valid_lft forever preferred_lft forever
    inet6 fe80::168:22e0:xyz:1485/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever
[janedoe@localhost ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=25.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=26.5 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 126ms
rtt min/avg/max/mdev = 25.187/25.840/26.493/0.653 ms
[janedoe@localhost ~]$ nslookup www.google.com
;; connection timed out; no servers could be reached

Image of successful connection to NordVPN.

gnome2

rharmonson commented 5 years ago

I think I found the problem with DNS. Looks like the install.sh munched the resolv.conf file. Looks like the \n from install.sh didn't translate well.

[janedoe@localhost ~]$ cat /etc/resolv.conf
# Appended by NordPy\nnameserver 8.8.8.8\nnameserver 8.8.4.4
# Generated by NetworkManager
search mydomain.info

After correcting the syntax in resolv.conf by resplacing \n with a line return.

[janedoe@localhost ~]$ cat /etc/resolv.conf
# Appended by NordPy
nameserver 8.8.8.8
nameserver 8.8.4.4
# Generated by NetworkManager
search intranet.harmonson.net winauth.harmonson.net harmonson.net
[janedoe@localhost ~]$ nslookup www.google.com
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   www.google.com
Address: 172.217.5.100

I always assumed NordVPN provided DNS on connection via DHCP. Maybe after work, I can test that theory. I've ran out of time for now.

morpheusthewhite commented 5 years ago

Thank you, I'll fix it right now

rharmonson commented 5 years ago

I will clone the master(?) branch tonight and test Gnome2 and Gnome3. On Gnome3, I will test using xhost si:localuser:root. Off to work I go. sigh. This is more fun.

morpheusthewhite commented 5 years ago

I just tested it on Fedora 29 in vm and it worked, so it is will sure fix it

corrad1nho commented 5 years ago

While workarounds exist, gui applications should never run as root. There is reason why Gnome devs prevent this.

morpheusthewhite commented 5 years ago

The fact is that this strictly depends on the DE; from what I've read Gnome devs stopped this since (for the way Gnome is built) it may allow privilege escalation. However other DE (such as KDE Plasma, which I mainly use) does not suffer it, so it is far more convenient asking root passwork only one time

corrad1nho commented 5 years ago

Different DEs approach this differently, but running the gui process as root should be avoided nonetheless. Instead of running the whole application with elevated privileges, you could offer to provide polkit rules that allow running openvpn for example as normal user (no sudo required). Alternatively, you could create a (systemd) service handling root stuff and let your gui communicate with it via dbus for example.

morpheusthewhite commented 5 years ago

I think that for the moment I'll ask multiple times the root password; I'll then replace all of this with a systemd service

morpheusthewhite commented 5 years ago

Announced fix pushed on https://github.com/morpheusthewhite/NordPy/commit/4075b872c783bb645a5cf4343e8c76335426fbb9: application will continue asking only one time root password and getting privileges when needed

morpheusthewhite commented 5 years ago

@rharmonson you do not need anymore to apply the command I suggested previously

rharmonson commented 5 years ago

Fedora 29 Gnome(3) continues to fail executing xhost si:localuser:root prior to ./nordpy.py with the same error and the teeny-tiny window. It worked for you, so maybe I got something out sequence?

Good news is Fedora 29 Mint using Gnome2 and your revision works without issue including DNS.

Updated Issue title. Seems more appropriate but feel free to revise.

morpheusthewhite commented 5 years ago

Pull the new commits, it should fix it (not the window size)

rharmonson commented 5 years ago

Did a clone of master branch, but it is still not working on Fedora 29 using Gnome3/Wayland.

[johndoe@localhost ~]$ git clone https://github.com/morpheusthewhite/NordPy.git
Cloning into 'NordPy'...
remote: Enumerating objects: 70, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 666 (delta 33), reused 48 (delta 18), pack-reused 596
Receiving objects: 100% (666/666), 450.76 KiB | 3.29 MiB/s, done.
Resolving deltas: 100% (421/421), done.
[johndoe@localhost ~]$ cd NordPy/
[johndoe@localhost NordPy]$ ./install.sh 
Do you want to install support for obfuscated servers (it will reinstall openvpn)?[y/n] (Recommended: n)
n
[sudo] password for johndoe: 
sudo: apt-get: command not found
Dependencies resolved.
================================================================================
 Package                        Arch     Version              Repository   Size
================================================================================
Removing:
 openvpn                        x86_64   2.4.7-1.fc29         @updates    1.3 M
Removing dependent packages:
 NetworkManager-openvpn-gnome   x86_64   1:1.8.10-1.fc29      @updates    212 k
Removing unused dependencies:
 NetworkManager-openvpn         x86_64   1:1.8.10-1.fc29      @updates    1.1 M
 pkcs11-helper                  x86_64   1.22-6.fc29          @anaconda   156 k

Transaction Summary
================================================================================
Remove  4 Packages

Freed space: 2.7 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/1 
  Erasing          : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    1/4 
  Erasing          : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          2/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Erasing          : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       4/4 
  Verifying        : NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64          1/4 
  Verifying        : NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64    2/4 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            3/4 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       4/4 

Removed:
  openvpn-2.4.7-1.fc29.x86_64                                                   
  NetworkManager-openvpn-gnome-1:1.8.10-1.fc29.x86_64                           
  NetworkManager-openvpn-1:1.8.10-1.fc29.x86_64                                 
  pkcs11-helper-1.22-6.fc29.x86_64                                              

Complete!
which: no openvpn in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
sudo: apt-get: command not found
Last metadata expiration check: 1:10:13 ago on Wed 10 Apr 2019 05:29:23 PM PDT.
Dependencies resolved.
================================================================================
 Package              Architecture  Version                Repository      Size
================================================================================
Installing:
 openvpn              x86_64        2.4.7-1.fc29           updates        522 k
Installing dependencies:
 pkcs11-helper        x86_64        1.22-6.fc29            fedora          62 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 584 k
Installed size: 1.4 M
Downloading Packages:
(1/2): pkcs11-helper-1.22-6.fc29.x86_64.rpm      77 kB/s |  62 kB     00:00    
(2/2): openvpn-2.4.7-1.fc29.x86_64.rpm          265 kB/s | 522 kB     00:01    
--------------------------------------------------------------------------------
Total                                           220 kB/s | 584 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: pkcs11-helper-1.22-6.fc29.x86_64                       1/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Installing       : openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Running scriptlet: openvpn-2.4.7-1.fc29.x86_64                            2/2 
  Verifying        : openvpn-2.4.7-1.fc29.x86_64                            1/2 
  Verifying        : pkcs11-helper-1.22-6.fc29.x86_64                       2/2 

Installed:
  openvpn-2.4.7-1.fc29.x86_64          pkcs11-helper-1.22-6.fc29.x86_64         

Complete!
Required packages installed
installing certificates (needed by ipsec)
Saving desktop shortcut in /usr/local/share/applications
downloading and extracting conf files from NordVPN
[johndoe@localhost NordPy]$ xhost si:localuser:root
localuser:root being added to access control list
[johndoe@localhost NordPy]$ ./nordpy.py 
Retrieved stats
Retrieved stats
Floating point exception (core dumped)
[johndoe@localhost NordPy]$ cat /etc/fedora-release 
Fedora release 29 (Twenty Nine)
[johndoe@localhost NordPy]$ 
morpheusthewhite commented 5 years ago

Yes, I too am encountering the same error when testing on a fresh Fedora 29 vm; it seems to be misteriously caused by some correct tkinter instruction like

self.serverTypeMenu = OptionMenu(self.serverTypeFrame, self.serverType, *MODES)

I'll do further tests to understand why that happens

rharmonson commented 5 years ago

Thank you.

I will spend some time googling as well, but I am a novice Python programmer. Love it, but I have not invested the time to be fluent. However, I do have an oVirt lab so it is painless to spin up a clean CentOS/Fedora VM for testing.

Let me know how I can help.

morpheusthewhite commented 5 years ago

Further and simpler tests confirmed what I was thinking: that bug is present into Fedora 29 python3-tkinter library, probably into the OptionMenu.

In fact, even running such a simple program as

import tkinter

class App(tkinter.Tk):
    def __init__(self):
        super().__init__()

        self.str_var = tkinter.StringVar(self)
        self.str_var.set("foo")
        self.menu = tkinter.OptionMenu(self, self.str_var, "bar")

        self.menu.pack()

app = App()
app.mainloop()

causes, as you have noticed, Floating point exception (core dumped), while my current Debian runs it with no problem. I'll open a bug on bugzilla (for completion I'll also post the link here) and close this issue. Thank you @rharmonson for the constant support, I'll add a Caveat in the README for those who will face the same problem.

morpheusthewhite commented 5 years ago

Here it is https://bugzilla.redhat.com/show_bug.cgi?id=1699049

morpheusthewhite commented 5 years ago

The bug has been closed on the bugzilla page since Fedora 29 reached EOL (end-of-life) stage