MathNodes / meile-gui

Meile dVPN GUI for Linux, OS X, and Windows - Powered by the Sentinel Network
https://meile.app
GNU General Public License v3.0
35 stars 6 forks source link

[BUG] Crash on Creating New Wallet #62

Closed MathNodes closed 7 months ago

MathNodes commented 7 months ago

When a wallet exists already and a user wishes to destroy that wallet and create/restore a new one, Meile crashes due to the following stack trace:

 Traceback (most recent call last):
   File "main\meile_gui.py", line 17, in <module>
   File "main\meile_gui.py", line 13, in main
   File "kivy\app.py", line 955, in run
   File "kivy\base.py", line 574, in runTouchApp
   File "kivy\base.py", line 339, in mainloop
   File "kivy\base.py", line 383, in idle
   File "kivy\base.py", line 334, in dispatch_input
   File "kivy\base.py", line 302, in post_dispatch_input
   File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
   File "kivymd\uix\button\button.py", line 1187, in on_touch_up
   File "kivymd\uix\behaviors\ripple_behavior.py", line 404, in on_touch_up
   File "kivy\uix\behaviors\button.py", line 179, in on_touch_up
   File "kivy\_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
   File "ui\screens.py", line 954, in destroy_wallet_open_wallet_dialog
   File "shutil.py", line 740, in rmtree
   File "shutil.py", line 618, in _rmtree_unsafe
   File "shutil.py", line 616, in _rmtree_unsafe
 PermissionError: [WinError 5] Access is denied: 'C:\\Users\\freqn\\.meile-gui\\keyring-file\\keyhash'

The reason for this is because the new sentinel-cli mod that Meile now uses has created the keyring-dir to be read-only and so rmtree fails as it cannot delete read-only files/directories.

The solution is found here: https://stackoverflow.com/a/2656408

Meile will be updated in a staged release.

MathNodes commented 7 months ago

Fixed in https://github.com/MathNodes/meile-gui/commit/9d5378ecc2815253f0d8443561098d1b356afbaf

Will merge on Linux and OS X branches if those OSes are affected by the same read-only error.