Nexusoft / NexusInterface

The official Logical and Interface layers of the Nexus Software Stack.
https://crypto.nexus.io/wallet
MIT License
32 stars 12 forks source link

nexus_wallet-Linux-1.1.0.AppImage doesn't work - critical error #56

Closed github12101 closed 5 years ago

github12101 commented 5 years ago

Describe the bug Just downloaded nexus_wallet-Linux-1.1.0.AppImage on Linux MX (Debian Stretch with improved GUI). Wallet fails with critical error.

To Reproduce

$ wget https://github.com/Nexusoft/NexusInterface/releases/download/v1.1.0/nexus_wallet-Linux-1.1.0.AppImage
$ chmod +x nexus_wallet-Linux-1.1.0.AppImage
$ ./nexus_wallet-Linux-1.1.0.AppImage 
Gtk-Message: 13:34:45.524: GtkDialog mapped without a transient parent. This is discouraged.
r: 0
License accepted
[23280:0720/133448.229231:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_nexus_9yJ2Ut/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap

This is stock Linux, nothing has been changed and I have no knowledge of any custom changed made to sandbox helper or whatever that is.

Expected behavior nexus-wallet command should start wallet. I can see Licence Agreement I can click Yes, but it fails with error

Screenshots not required

Desktop (please complete the following information): $ uname -a Linux mx 4.19.0-5-amd64 #1 SMP Debian 4.19.37-2~mx17+1 (2019-05-15) x86_64 GNU/Linux

$ lsb_release -a No LSB modules are available. Distributor ID: MX Description: MX 18.3 Continuum Release: 18.3 Codename: Continuum

All packages are from Debian Stretch.

github12101 commented 5 years ago

Please note, previous version of the wallet has worked on this machine without this error (Window worked and GUI was present, but wallet failed to synchronize). This is potentially a regression from previous version.

l8nit3tr0ubl3 commented 5 years ago

From my own research into the issue, it looks like electron issue 17972 may be the culprit for the current Linux issues. To the devs: it seems that downgrading the electron builder version back to 4.xx was the workaround in the linked thread.

github12101 commented 5 years ago

Just installed brand new Debian 10.0 Buster on AMD64 machine. Results:

$ ./nexus_wallet-Linux-1.1.0.AppImage 
r: 0
License accepted
[2742:0728/145021.373257:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_nexus_ZSATul/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap
l8nit3tr0ubl3 commented 5 years ago

@pioruns Yes, I'm fairly certain it is an issue with the version of "electron builder" that is being used. Many other programs using that dependency have this issue. Chances are a simple rollback of the commit that updated the electron version should fix this issue.

Basically, this is not an issue with the wallet, but with one of the dependencies.

KenCorma commented 5 years ago

@pioruns I am going to update the electron-builder package and send you a email.

github12101 commented 5 years ago

Thanks, I sent you back the results - no success as of yet!

l8nit3tr0ubl3 commented 5 years ago

had a thought and some free time.... and came up with this:
Electron 5.x.x seemed to be the issue, so I went into the package.json and package-lock.json, and updated the electron , electron-builder packages to the newest.

• electron-builder version=21.2.0 os=4.4.0-18362-Microsoft
• loaded configuration file=package.json ("build" field)
• writing effective config file=release/builder-effective-config.yaml
• packaging platform=linux arch=x64 electron=6.0.0 appOutDir=release/linux-unpacked
• building target=AppImage arch=x64 file=release/nexus_wallet-Linux-1.1.0.AppImage
• building target=deb arch=x64 file=release/nexus_wallet-Linux-1.1.0.deb

Aaaand...... ive got a running and syncing linux wallet on 1.1.0, 3.0.2, and ubuntu 18.04, currently syncing and downloading the bootstrap!

changes were.....
package.json:
"electron": "^6.0.0",
"electron-builder": "^21.2.0"

package-lock.json:
"electron": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0.tgz",
"integrity": "sha512-JVHj0dYtvVFrzVk1TgvrdXJSyLpdvlWNLhtG8ItYZsyg9XbCOQ9OoPfgLm04FjMzKMzEl4YIN0PfGC02MTx3PQ=="

"electron-builder": {
"version": "21.2.0",

"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-21.2.0.tgz",

"integrity": "sha512-x8EXrqFbAb2L3N22YlGar3dGh8vwptbB3ovo3OF6K7NTpcsmM2zEoJv7GhFyX73rNzSG2HaWpXwGAtOp2JWiEw==",

On first run, connection to core hangs, but a second load connects and boots fine!

github12101 commented 5 years ago

That's great :) Can this be packaged into AppImage? I am happy to test once ready.

l8nit3tr0ubl3 commented 5 years ago

yes I can send it over one minute. Im not sure why, but it still seems to not like having a backup added in (old wallet.dat) and there is still connection to core issues on reloads, but it opens now!

appimage link and VT results virustotal and deb link and VT results virustotal

github12101 commented 5 years ago

Will test that in a minute, thanks!

By the way, why this is not tagged as BUG? Why no one is assigned to this issue?

EDIT: Both links goes to .deb file, file is exactly the same (sha256sum). Can you check please? If you can re-upload AppImage. Also, your virustotal deb link goes to old 1.1.0 file, not the one you just uploaded. The one you uploaded, deb 1.1.1 is here: https://www.virustotal.com/gui/file/3c1db6c93f33a1947debb70f9b279898fd3492a663589cfb82748ffe94ad3602/detection

github12101 commented 5 years ago

Ok, tried to test .deb file, result:

# gdebi nexus_wallet-Linux-1.1.1.deb 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: gir1.2-gnomekeyring-1.0

Can't install, depends on obsolete package which doesn't exist in Debian Buster 10 anymore. I never thought Debian Stable will be ahead of something, they were always miles away with versions of the software. Well, this time they are ahead.

Let me know about AppImage, I will check that next:)

l8nit3tr0ubl3 commented 5 years ago

sorry, at the time I was using anydesk from my phone lol so some of the links got messed up, appimage should be here https://drive.google.com/open?id=1UaR-g_D1ApBZzy5sXd-GLqd89lnP17GA

however these will not fix your 'gir1.2' issue, only the subsequent SUID sandboxing issues. for the gir1.2 issue try:

wget http://mirrors.kernel.org/ubuntu/pool/main/libg/libgnome-keyring/gir1.2-gnomekeyring-1.0_3.12.0-1build1_amd64.deb

sudo dpkg -i gir1.2-gnomekeyring-1.0_3.12.0-1build1_amd64.deb ` Also, ive been testing on ubuntu, so im spinning up a Debian machine now to get some more testing in on a similar setup to yours.

github12101 commented 5 years ago

You linked nexus_wallet-Linux-1.1.0.AppImage, downloaded that, no luck.

$ chmod +x nexus_wallet-Linux-1.1.0.AppImage 
pioruns@debian:~/Downloads$ ./nexus_wallet-Linux-1.1.0.AppImage 
r: 0
License accepted
[6946:0805/213106.316919:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_nexus_otbI6a/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap
l8nit3tr0ubl3 commented 5 years ago

So youve passed the gir1.2 issue? those instructions worked? heres a screen of it syncing on 18.04.... i will reupload a new copy, maybe i choose a bad file for the AppImage https://drive.google.com/file/d/1WSBwL974qcqQR0fiMky6GlMr9lCT7T5Z/view?usp=sharing

nexus

github12101 commented 5 years ago

Just downloaded your new file nexus_wallet-Linux-1.1.1.AppImage. Result:

$ chmod +x nexus_wallet-Linux-1.1.1.AppImage 
pioruns@debian:~/Downloads$ ./nexus_wallet-Linux-1.1.1.AppImage 
[7109:0805/223241.679055:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_nexus_zHv662/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap

Also, I can't just install gir1.2-gnomekeyring-1.0_3.12.0-1build1_amd64.deb into my system, it depends on other components. Most likely source depo would need to be added in order for this to work, or installation of few more packages, but that's not the path we should be taking - Nexus is depending on obsolete library in the first place.

`# dpkg -i gir1.2-gnomekeyring-1.0_3.12.0-1build1_amd64.deb
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
root@debian:/home/pioruns/Downloads# gdebi gir1.2-gnomekeyring-1.0_3.12.0-1build1_amd64.deb 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libgnome-keyring0 (= 3.12.0-1build1)`

No idea why dpkg -i doesnt work as intended, but gdebi shows what is going on.

l8nit3tr0ubl3 commented 5 years ago

eating some dinner quick, and then im on it! :) Ill grab a copy of MX and add it to my dev machine quick. Will update if i resolve the issue for your system specifically. But so far for ubuntu the SUID issue seems resolved, if an actual dev can verify thatd be great. And once i have MX working ill put it into a merge request for mainstream use if the devs see fit.

github12101 commented 5 years ago

AFAIK, Latest MX Linux is based on Debian Oldstable (Stretch), that's why I moved out from it, because I realized, that recommened way to upgrade MX is a fresh install O_o (once they release a new one based on Buster). Scrapped MX, went to base system - Debian Buster and it works perfectly, will leave my server with it for years to come.

I am testing on VM anyway, I will be happy to test on other systems once you have a piece of code which needs more extensive QA :)

l8nit3tr0ubl3 commented 5 years ago

Closed pull request as it doesn't fix Debian issues and id like to have all fixes in one pull.

I have the same issue you have with buster, however i have skipped the gir1.2 issue completely by using a gnome edition of Debian 10. So that seems to be only an issue on non-gnome distros.

However, my update fix does not work on a vanilla Debian Buster VM even though it seems to be working great on ubuntu 18.04.
Setting up a 19.04 VM to see if it works there out-of-box and then plod on ahead with a Debian fix if im able

[update] ubuntu 16.04,18.04, and 19.04 works out-of-box with my fixes, so just gotta figure out the debian 9 & 10 issue :)

[update 2] Having a tough time figuring out the debian issue, so pushing the ubuntu fix untill i figure it out, or the devs beat me to it :)

github12101 commented 5 years ago

Well that's interesting! Debian 10 Gnome version somehow satisfies dependency, which is uninstallable on Debian 10 MATE, with same repositories? I rather think that AppImage worked there for you, but not .deb file? .deb file should remain uninstallable as it doesn't exist on Debian repo, you can try here https://www.debian.org/distrib/packages these packages doesn't exist in Buster. Please confirm, I can try your AppImage on Debian 10 Gnome it that's what you did and it worked for you.

l8nit3tr0ubl3 commented 5 years ago

No progress on Debian at all. Its still stuck at the SUID issue, however it has passed the gir1.2 dependancy issue (like you said, just the AppImage ). After work today, I have a few more ideas to try, but after that ill leave it to the real devs :)

KenCorma commented 5 years ago

Hey @l8nit3tr0ubl3 thank you so much for your investigating, I does seem like electron 5 is being funky. We can look into upgrading it to 6. I think 5 to 6 will be easy compared to 4 to 5 where there were dep issues.

l8nit3tr0ubl3 commented 5 years ago

So, it would seem 5-6 still has issues on debian based distros (SUID above), and any non-gnome based distro (gir1.2 above) however I have just tested a version on Debian with downgraded 5-4 electron and no other changes, and it works so far on Debian 10!!! just have to test ubuntu then ill send a pull request :)

KenCorma commented 5 years ago

Awesome, just let me know when the pull request is finished and I can go over it with the team.

l8nit3tr0ubl3 commented 5 years ago

Heres an AppImage for anyone who wants to test Google Drive and heres a listsing of all the compiled binaries as i test them google drive folder (disclaimer - this is a 3rd party edited wallet, not yet reviewed by the official dev team! any issues are likely my fault) Tested and working on Debian 10, ubuntu 18.04, and currently building to test on windows, after which ill load it onto the hackintosh and get all systems tested.

Once all test clean i will re-issue the pull request from a cleaned up fork for review. BUT, worth mentioning, this only fixes AppImage, not .deb and only on gnome based systems!

UPDATE windows works fine, now onto mac....... mac tested and working

github12101 commented 5 years ago

Just tried your AppImage on brand new just installed Debian 10 Buster MATE on VM, fully updated. There is progress.

Result: 2019-08-08 00_35_24-Debian Buster (Snapshot 1 FRESHLY INSTALLED ALL WORKS)  Running  - Oracle VM Vir

$ ./nexus_wallet-Linux-1.1.1.AppImage
r: 0
License accepted
00:32:04.338 › File server listening on port 9331!
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
00:32:06.001 › Checking if core binary exists: /tmp/.mount_nexus_XF227J/resources/assets/linux/cores/nexus-linux-x64
00:32:06.021 › Core binary exists
00:32:06.022 › Core Manager: Data Directory path not found. Creating folder: /home/pioruns/.Nexus
00:32:06.022 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
00:32:06.022 › Core Manager: Starting core
00:32:06.150 › Core Manager: Core has started (process id: 1780)
pos 456 170
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'

Can't connect to Core even after 5 minutes.

github12101 commented 5 years ago

Tried .deb file - requires installation of libappindicator3-1. Installed. No moaning about gnomekeyring or anything.

Result:

$ nexus_wallet 
00:44:35.389 › File server listening on port 9331!
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
00:44:35.649 › Checking if core binary exists: /opt/Nexus Wallet/resources/assets/linux/cores/nexus-linux-x64
00:44:35.650 › Core binary exists
00:44:35.655 › Core Manager: Data Directory path not found. Creating folder: /home/pioruns/.Nexus
00:44:35.657 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
00:44:35.657 › Core Manager: Starting core
00:44:35.664 › Core Manager: Core has started (process id: 1871)
pos 456 170
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'

Window appears, same as AppImage, cannot connect to Core, it's just stuck.

l8nit3tr0ubl3 commented 5 years ago

On the fresh Linux install, please try closing the app and deleting the items in /home/[youruser]/.config/Nexus Wallet and re-run the program. That seems to have worked for me when I have core issues on *nix.

Once we have it running on all platforms for all users (even with small workarounds) I'll turn my attention to the libappindicator issue and the "Error reading JSON" issue with settings.json

github12101 commented 5 years ago

OK, tried that. Run AppImage - stuck. Closed. Deleted all files from mentioned folder. Run AppImage - stuck. Closed Run AppImage - this time it worked, it's bootstrapping recent database

github12101 commented 5 years ago
$ ./nexus_wallet-Linux-1.1.1.AppImage 
r: 0
License accepted
01:10:00.364 › File server listening on port 9331!
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
01:10:01.506 › Checking if core binary exists: /tmp/.mount_nexus_6h5M6M/resources/assets/linux/cores/nexus-linux-x64
01:10:01.507 › Core binary exists
01:10:01.507 › Core Manager: Data Directory path not found. Creating folder: /home/pioruns/.Nexus
01:10:01.508 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
01:10:01.508 › Core Manager: Starting core
01:10:01.540 › Core Manager: Core has started (process id: 1781)
pos 456 170
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
01:10:40.441 › Core Manager: Stop function called
01:10:40.512 › Core Manager: Core has already stopped.
pioruns@debian:~/Downloads$ ./nexus_wallet-Linux-1.1.1.AppImage 
r: 0
License accepted
01:11:11.698 › File server listening on port 9331!
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
QT Backup success!
01:11:12.181 › Checking if core binary exists: /tmp/.mount_nexus_qyHde7/resources/assets/linux/cores/nexus-linux-x64
01:11:12.189 › Core binary exists
01:11:12.190 › nexus.conf exists. Importing username and password.
01:11:12.190 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
01:11:12.191 › Core Manager: Starting core
01:11:12.196 › Core Manager: Core has started (process id: 1907)
pos 456 170
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
01:11:50.982 › Core Manager: Stop function called
01:11:51.040 › Core Manager: Core has already stopped.
pioruns@debian:~/Downloads$ ./nexus_wallet-Linux-1.1.1.AppImage 
01:11:54.222 › File server listening on port 9331!
01:11:54.707 › Checking if core binary exists: /tmp/.mount_nexus_ZR0tNO/resources/assets/linux/cores/nexus-linux-x64
01:11:54.713 › Core binary exists
01:11:54.713 › nexus.conf exists. Importing username and password.
01:11:54.714 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
01:11:54.714 › Core Manager: Starting core
01:11:54.728 › Core Manager: Core has started (process id: 2003)
pos 462 201
l8nit3tr0ubl3 commented 5 years ago

Wonderful! So we've found at least one fix for the AppImage issue. The wallet just has to be opened twice with this new update! (skipping the delete .config/NexusWallet step as it was likely un-necessary)

Happy staking, Im off to do more testing and see if i can beat some of these other warnings/errors/issues.

github12101 commented 5 years ago

I am still staking with Nexus Legacy, but watching this new wallet closely as you can tell :)

"Core Parameters: -daemon,-avatar,-server,-rpcthreads=4"

rpcthreads does that mean it assigns 4 CPU threads to RPC? If that's true, then that's not optimal, as I assigned 1 CPU thread to this VM?

l8nit3tr0ubl3 commented 5 years ago

if I understand correctly, that is an option for how many rpc request can be handled concurrently. It is not the number of cores/threads in use at any one time, just a maximum number if multiple rpc requests are made all at once. It is built in to the wallet, or possibly dynamic based on system specs, but is not something I changed in my update.

github12101 commented 5 years ago

ok thanks :)

So, testing is done at this point, we can wait for some of your changes to be pulled into main repo, right? I will be happy to test again once official builds are out.

And certainly fail of Nexus Core at first run could be looked at.

l8nit3tr0ubl3 commented 5 years ago

I wonder if the missing/unreadable settings.json is the cause of the core hanging? At which point a simple re-scan for the file after creation should fix it, or even a hardcoded core reboot after file creation.....

KenCorma commented 5 years ago

Have you seen this? https://github.com/electron/electron/issues/17972#issuecomment-516957971

KenCorma commented 5 years ago

Also have you by any chance tried with electron 6? Would rather upgrade than downgrade to 4.

l8nit3tr0ubl3 commented 5 years ago

Doing a chown & chmod does not work in our case, the chromium sandbox folder is created in /tmp/.mountnexus[randomstring] and the random string changes each time.

I believe a downgrade or fully disabling the sandbox are the only options at this point (will test disabling sandbox later this evening) If so, I'll setup a PR for both and the team can decide which has less undesirable impact.

l8nit3tr0ubl3 commented 5 years ago

@pioruns Please try a fresrun of the original AppImage (1.1.0) by the dev team. BUT, before running it run the command sudo sysctl kernel.unprivileged_userns_clone=1 All should run well :)

github12101 commented 5 years ago

I am not in sudoers file, had to use "su -" and also install procps package first.

2019-08-08 17_58_16-Debian Buster (Snapshot 1 FRESHLY INSTALLED ALL WORKS)  Running  - Oracle VM Vir

Result:

$ su -
Password: 
root@debian:~# sysctl kernel.unprivileged_userns_clone=1
kernel.unprivileged_userns_clone = 1
root@debian:~# exit
logout
pioruns@debian:~$ ./nexus_wallet-Linux-1.1.0.AppImage 
17:56:22.538 › File server listening on port 9331!
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'
17:56:23.164 › Checking if core binary exists: /tmp/.mount_nexus_DCaZiT/resources/assets/linux/cores/nexus-linux-x64
17:56:23.171 › Core binary exists
17:56:23.172 › Core Manager: Data Directory path not found. Creating folder: /home/pioruns/.Nexus
17:56:23.172 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
17:56:23.172 › Core Manager: Starting core
17:56:23.197 › Core Manager: Core has started (process id: 4712)
pos 456 170
Error reading JSON at /home/pioruns/.config/Nexus Wallet/settings.json : Error: ENOENT: no such file or directory, open '/home/pioruns/.config/Nexus Wallet/settings.json'

Beautiful.

github12101 commented 5 years ago

I also tried nexus_wallet-Linux-1.1.0.deb, but that still requires gir1.2-gnomekeyring-1.0 which is uninstallable.

l8nit3tr0ubl3 commented 5 years ago

Great! Now I'll start working on the 1st run core lag, and some of those warnings and errors that show in your log :)

I dont recommend closing this as solved yet though, as we only have a workaround at this point and not a permanent, in-wallet solution.

github12101 commented 5 years ago

Amazing.

Question: how I configure datadir location when running from AppImage, or deb? in Nexus-Qt it's easy, --datadir switch, but here I am not sure.

l8nit3tr0ubl3 commented 5 years ago

Try changing it in the home/pioruns/.config/Nexus Wallet/settings.json file, this will run ut at start when the core is started I believe. There should already be an option pointing to .Nexus

github12101 commented 5 years ago

settings.json contains only:

{
  "windowX": 456,
  "windowY": 170,
  "windowWidth": 1022,
  "windowHeight": 713,
  "acceptedAgreement": true
}

~/.Nexus folder gets created as well, database is here, along with wallet.dat, nexus.conf. I have no chance to change it?

$ ./nexus_wallet-Linux-1.1.0.AppImage --datadir=/home/pioruns/Nexus1
19:26:19.312 › File server listening on port 9331!
19:26:19.809 › Checking if core binary exists: /tmp/.mount_nexus_lGsX0N/resources/assets/linux/cores/nexus-linux-x64
19:26:19.810 › Core binary exists
19:26:19.810 › nexus.conf exists. Importing username and password.
19:26:19.811 › Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1
19:26:19.811 › Core Manager: Starting core
19:26:19.819 › Core Manager: Core has started (process id: 2907)
pos 462 201

--datadir=/home/pioruns/Nexus1 this is being ignored, and Core Parameters: -daemon,-avatar,-server,-rpcthreads=4,-fastsync,-datadir=/home/pioruns/.Nexus,-rpcport=9336,-verbose=0,-stake=1 This is being chosen on my behalf.

github12101 commented 5 years ago

I can confirm, when both folders ~/.Nexus and ~/.config/Nexus Wallet not exist, it's stuck on "Connecting to Nexus Core..."

github12101 commented 5 years ago

Another error: While bootstrapping recent Database, in the background, Nexus Core is still downloading blocks from zero, wasting CPU and bandwidth resources! I am bootstrapping while I am syncing O_o. Downloaded 6% of database, while Core synced 4436 blocks from 1 peer. CPU thread is saturated 100% by nexus_wallet, when it should do NOTHING, just wait for download to complete.

github12101 commented 5 years ago

795 MB of RAM taken to do nothing, just downloading file in the background while I waste CPU and bandwidth to download blocks from 1 peer. Electron "efficiency" in usage of resources, bravo.

2019-08-08 19_48_37-Debian Buster (Snapshot 1)  Running  - Oracle VM VirtualBox

github12101 commented 5 years ago

2019-08-08 19_56_17-Debian Buster (Snapshot 1)  Running  - Oracle VM VirtualBox

OK I downloaded whole bootstrap, 3.83GB. Now it's stuck on Downloading the database... 100%. In the background, Core continues to sync blocks relentlessly, 35k blocks synced.

I can only click Abort bootstrapping, nothing else is happening.

l8nit3tr0ubl3 commented 5 years ago

This is a separate issue, and should definitely be opened as a feature request here. You make a solid point but it's not quite a bug as it's working as expected. Just something that could be optimized :) I will add it to my list of things to attempt for the team. As for "stuck at 100%" it's currently extracting the database into the correct folder.... as you say 3.83 GB worth. Once finished it will automatically restart the core and you'll continue syncing the remaining blocks normally, although it should say "extracting database" or something to inform the user of this process.

UPDATE I think I may have a simple fix for both of your new issues, I will be testing in a few minutes, please create an issue request for each and I will answer each separately with a solution :)

tl;dr for anyone with this issue use: sudo sysctl kernel.unprivileged_userns_clone=1 to bypass this error.

github12101 commented 5 years ago

I thought so! So I left it for an hour, just came back and it's done! I am 65k blocks behind, not far:)

# systemctl kernel.unprivileged_userns_clone=1
Unknown operation kernel.unprivileged_userns_clone=1.

This doesn't work on Debian, and Debian uses systemd. And sysctl command requires installation of separate package - procps. So you can add to your tl;dr: #apt update && apt install procps if sysctl returns command not found.