Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

ZEN Cash Wallet error #64

Closed
erkcet opened this issue Feb 3, 2018 · 70 comments
Closed

ZEN Cash Wallet error #64

erkcet opened this issue Feb 3, 2018 · 70 comments

Comments

@erkcet
Copy link

erkcet commented Feb 3, 2018

A general unexpected critical error has occurred:
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

Hi all,

I am receiving the following error each time I started the wallet. I would remove the whole wallet from the system and install it again if I have private keys. But I don't have private keys. Could someone help me to fix this problem or how I can get my private keys?

Thanks.

@vaklinov
Copy link
Contributor

vaklinov commented Feb 3, 2018

This appears to be the known problem of a broken/corrupt block-chain. In most cases it can be fixed safely. Some manual repairs will be necessary.

The ZEN private keys are located in the wallet.dat file in directory:
Windows: %APPDATA%/Zen/
Mac OS: ~/Library/Application Support/Zen/
To make sure your ZEN is not lost, the most important thing is to keep a backup copy of your wallet.dat file - it must never be lost! It may be copied manually when the GUI wallet/zend are not running. The wallet.dat needs to be backed up regularly (not just once - say after every 30-40 outgoing transactions) and it MUST also be backed up after creating a new Z address.

Once you make sure you have a wallet backup in a safe place, this problem is most commonly solved by re-indexing the block-chain. For details of how to reindex, see the troubleshooting guide: https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/TroubleshootingGuide.md

@LordMajestros
Copy link

LordMajestros commented Feb 10, 2018

What does reindexing do? Does it simps reindex the local copy or does it redownload the whole block chain?

@vaklinov
Copy link
Contributor

Reindexing does not re-download the blockchain data from the network. It only recreates the blockchain database and rechecks the data in it.

@bobwilson100
Copy link

bobwilson100 commented Feb 11, 2018

///
update: After a few hours of "validating transactions" while re-indexing, my curiosity got the best of me and I launched ZenCash wallet again. This time, it worked. Even though the "validating transactions" is still going (not sure when to stop that), the wallet corrected itself and now it is about 85% complete synchronizing the block chain it says.
///

I am having the same issue. 2 items worth noting. I am on a Mac.

  1. When I go to Library/Application Support/ , I do not have a Zen folder for some reason.
  2. I read the instructions to reindex and kicked that off. You didn't mention if we needed to wait until reindexing is complete before trying again. I assume so, but I only see that I am "validating transactions" when I run the command to reindex. Not sure how I know when it is done.

Thanks in advance!

@vaklinov
Copy link
Contributor

vaklinov commented Feb 12, 2018

The issue with the wallet not starting properly is due to a broken local block-chain. The underlying technical cause is not in the GUI itself but in the ZEN core/node. The problem is being investigated as a priority by the ZEN core team. It started occurring recently with high frequency without any software changes - it is related to network load/transactions/block content. Once a fix is made available a new wallet release will be made. The workaround to do reindexing is not very convenient but still allows uses to recover from the problem.

As to the questions/issues:
o You can open the GUI wallet while re-indexing is taking place. However until reindexing ends and you have a 100% synchronized blockchain, the UI will show an old state of the wallet, old balance etc.
o There are several different folders of type Library/Application Support/ on a Mac. You need the one inside your user account /Users/[username]/Library/Application Support/
o You can consider reindexing as complete when your blockchain synchronization indicator (lower right UI corner) shows 100%.

Users who encounter the problem more than once may also store a “good” copy of the blockchain for later re-use as mentioned in this post: https://miningwithnvidia.com/2018/02/09/zencash-wallet-eof-reached-code-1/

@CryptoMang
Copy link

Mine doesn't show my old balance..shows no balance.

@LordMajestros
Copy link

LordMajestros commented Feb 14, 2018

Have your addresses changed?
You can check https://explorer.zen-solutions.io using your addresses to see if your funds are still in your address.
Check that your addresses have not changed.
Import your private keys and rescan if they have.

@CryptoMang
Copy link

CryptoMang commented Feb 14, 2018

No, my address hasn't changed. So I was reindexing and it wasn't showing any balances. Then after the reindex my balances showed correctly. I closed the wallet then reopened it and I'm back to my original "EOF" error.

@zenmonies
Copy link

I am having this same error on start up. When I run the zend -reindex command it says 'zend' is not recognized as an internal or external command, operable program or batch file. The directions say "On Windows you first have to locate zend.exe. It is in the /app sub-directory of the wallet installation." I have located that but what exactly do you do once you locate it?

Thanks

@CryptoMang
Copy link

You need to make sure you're in the "zen" directory. I made the same mistake yesterday. %appdata%\zen

@zenmonies
Copy link

Thank you. So I just need to go to that directory then run the command? Because I did that and still get the same message. :(

@CryptoMang
Copy link

CryptoMang commented Feb 14, 2018

I'm sorry...I gave you bad info...you need to go to the "app" folder...where your wallet.exe is located and run zend -reindex from there.

@zenmonies
Copy link

Dang. That doesn't work either. Well... I have backups and the private keys so hopefully when I get the chance to reinstall a fresh wallet I can restore it that way.

@CryptoMang
Copy link

CryptoMang commented Feb 14, 2018

what directory did you go to? Make sure your wallet gui isn't up when you do.

@CryptoMang
Copy link

here's my path; C:\Users\wegen\Downloads\ZENCashDesktopGUIWallet_0.75.8\app

Inside the "app" directory is where your zend.exe should be.

@zenmonies
Copy link

here is mine. Maybe I'm in the wrong spot? But the zend.exe is there
C:\Users\Calvin\Documents\Vault\Zen\app

@vaklinov
Copy link
Contributor

@zenmonies You need to open a Windows command prompt and change the current directory to where zend.exe is located, like:

cd C:\Users\Calvin\Documents\Vault\Zen\app

To make sure zend.exe is located there use the dir comamnd - it should list it. After that the command

zend -reindex

should work.

@zenmonies
Copy link

@vaklinov I think I am getting somewhere now. It is running through the validation process. Thank you!

@dcryptob
Copy link

@vaklinov having same issue and I am not computer savvy. this is the location of my zend.exe file:
C:\Users\Demetrius\Desktop\zencash\app
not sure what you mean by making sure zend.exe is there by air command and adding the zend -reindex

in terminal:
C:\Users\Demetrius>zend - reindex
'zend' is not recognized as an internal or external command,
operable program or batch file.

Complete noob on my end i did not get private keys before having the issue and do not know what program to use to open my wallet.bat file
need help plz from anyone if @vaklinov isnt available. trying to move funds from swing wallet to Arizen

@zenmonies
Copy link

@dcryptob

Here is what you need to do based on vaklinov's instructions. (Worked for me)

open run command and type (for you):

cd C:\Users\Demetrius\Desktop\zencash\app

hit enter, then type:

dir

hit enter, then type:

zend -reindex

hit enter and it should start the process. Takes several hours. Once completed my wallet opened right up.

@dcryptob
Copy link

@zenmonies THX!! work perfectly. I wasn't aware about hitting enter then typing zend -reindex. once again thx for help

@vaklinov
Copy link
Contributor

The following step-by-step guide for Windows users (created by a third party) is handy: https://miningwithnvidia.com/2018/02/09/zencash-wallet-eof-reached-code-1/ to help with reindexing in case of encountering the common block-chain problem.

@i8avet
Copy link

i8avet commented Feb 19, 2018

is there any info how to use with imac not having to keep terminal open? I have to leave terminal open for Wallet to open correctly. Allowed all day for my wallet to sync 100%. kept on for 5 minutes after. closed wallet and terminal, tried to reopen wallet and same error "code -1". reopened terminal and opened wallet. Blockchain started from 0% again...

@vaklinov
Copy link
Contributor

@i8avet If you are experiencing the "broken blockchain" too often and you cannot keep the terminal open, unfortunately only other option is maybe to use a different wallet like Arizen that does not have the problem:
https://github.com/ZencashOfficial/arizen

The underlying technical cause is not in the GUI itself but in the ZEN core/node. The problem is being investigated as a priority by the ZEN core team. It started occurring recently with high frequency without any software changes - it is related to network load/transactions/block content. Once a fix is made available a new wallet release will be made. The workaround to do reindexing is not very convenient but still allows uses to recover from the problem.

@i8avet
Copy link

i8avet commented Feb 19, 2018 via email

@vaklinov
Copy link
Contributor

A new release of the ZEN core node has been made that contains a stability fix for the “broken blockchain” problems that many users have experienced recently, that cause the GUI wallet to fail on startup:
https://github.com/ZencashOfficial/zen/releases/tag/v2.0.11

This new ZEN core version will be used in the next GUI wallet releases to fix the problem. Users who do not wish to wait for a new GUI wallet release may use the new ZEN core/node binaries by replacing them in the GUI wallet installation manually. Some details on how to do this: the ZENCash Desktop GUI Wallet includes a full ZEN node and the UI is in effect an interface to the locally running ZEN node. The ZEN node binaries are located in:

Mac OS (absolute file paths):
/Applications/ZENCashWallet.app/Contents/Java/zend
/Applications/ZENCashWallet.app/Contents/Java/zen-cli

Windows: having as a base directory the place where the GUI wallet was unzipped from ZENCashDesktopGUIWallet_0.75.8.zip the binaries are:
/app/zend.exe
/app/zen-cli.exe

If a user has experienced the “broken blockchain” problem more than once before he may replace the ZEN binaries with the ones from the latest release to gain better stability.

Note: If the ZEN blockchain is currently in a broken state, even with the new/fixed binaries users may have to do one final reixdexing operation to avoid the problems. For details on how to reindex the following articles may be consulted:
https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/TroubleshootingGuide.md
https://miningwithnvidia.com/2018/02/09/zencash-wallet-eof-reached-code-1/

@Mer1
Copy link

Mer1 commented Mar 2, 2018

Hello,
I did exactly what you guys said about reindexing, being a complete noob i followed it step by step, but after giving the zend -reindex command, the cmd is telling me:

"error: cannot find the zcash network parameters in the following directory: C:....\roaming\ZcashParams.
Please run "zen-fetch-params" or "./zcutil/fetch-params.sh" and then restart."

When running eather of those commands it tell me they're not recognized as internal or external command, executable file or batch file.
Any ideas? It's probably a tiny thing i have no idea about because, well, i'm a noob.
Thanks!

@LordMajestros
Copy link

What OS are you on? Windows?

@Mer1
Copy link

Mer1 commented Mar 2, 2018

Yes, Windows. 8.1

@bahnstoermer
Copy link

bahnstoermer commented Apr 9, 2018

I also ran into code -1, and it was because sync'ing the block chain took so long I had to risk closing the wallet to move the machine; sadly I paid the price I hoped I wouldn't (code -1) which appears to be mean corrupted block chain file (and that explanation matches the actions I took). The app couldn't handle a close while sync'ing apparently.

So I'm on OSX for crypto (10.13) but not a Mac power user let's say and looked for /Users/[username]/Library/Application Support/ and there is no Zen folder. If I go to Macintosh HD>Library>Application Support there are folders, but not anything to do with Zen either.

I have a file in a folder that I set up as my backup directory, and it's 106kb of file that OSX nor Windows (when put on a USB drive and transferred, just to look at) will show me an extension for (ugh, I'm feeling stupid now). OSX says unix executable, opening with a text editor show binary gibberish. So I'm not sure if this is my file or not, a search for wallet.dat across the whole machine doesn't pull anything.

I have my private key and public address, but don't want to take any action without more guidance... input from the group? Thank you for any thoughts...

@vaklinov
Copy link
Contributor

vaklinov commented Apr 9, 2018

@bahnstoermer Merely stopping the GUI wallet while the block-chain is being synchronized should not result in a broken local block-chain (tried many times). However we cannot rule out this kind of problem happening in some/rare cases :-[

If you are not an experienced Mac user as a start it may be advisable to get familiar with using the Mac terminal: https://www.macworld.co.uk/how-to/mac-software/how-use-terminal-on-mac-3608274/

I am sure the directory /Users/[username]/Library/Application Support/Zen exists. On a terminal you may list it with a command like:

$ ls -lh ~/Library/Application\ Support/Zen/
total 98680
drwx------   51 user  staff   1,7K 16 Мар 22:53 blocks
-rw-------    1 user  staff   920B 19 Сеп  2017 cert.pem
drwx------  170 user  staff   5,6K 17 Мар 20:45 chainstate
-rw-------    1 user  staff     0B 16 Юли  2017 db.log
-rw-------    1 user  staff   6,3M 17 Мар 22:58 debug.log
-rw-------    1 user  staff    33K 17 Мар 22:58 fee_estimates.dat
-rw-------    1 user  staff   1,7K 19 Сеп  2017 key.pem
-rw-------    1 user  staff   3,2M 17 Мар 22:58 peers.dat
-rw-------    1 user  staff    10M 17 Мар 22:58 wallet.dat
-rw-r--r--    1 user  staff   723B 18 Юли  2017 zen.conf

Once you establish that the directory is there, you may follow the directions to backup the wallet.dat and re-index the blockhcain...

@bahnstoermer
Copy link

bahnstoermer commented Apr 9, 2018

Thank you for the response. I found my wallet.dat file and have backed it up off line. I read that OSX High Sierra may have been part of the problem.

Regardless, I'm scanning the above posts for OSX re-indexing instructions now.

Edit: Ran /Applications/ZENCashWallet.app/Contents/Java/zend -reindex from the terminal, it appears to be re-indexing... thank you again for the posts.

@bahnstoermer
Copy link

image

Ok the validations have slowed to 1 every couple seconds... does that mean I'm "caught up?" How do I know when it's safe to stop the process and re-launch the GUI wallet?

Thanks in advance...

@zenportodev
Copy link
Contributor

It is not necessary to stop zend's reindexing before launching the GUI wallet. If you start the GUI it will use the zend already started... and if the GUI shows 100% blockchain synchronization, then reindexing has finished.

@bahnstoermer
Copy link

image

Thanks for helping me get this straightened out!

@roguecryptovestor
Copy link

I am having the same error. I am a noob using a Mac and was able to get to terminal but when I enter /Applications/ZENCashWallet.app/Contents/Java/zend -reindex on the terminal command line. I get an error " -bash:/ Applications/ZENCashWallet.app/Contents/Java/zend: No such file or directory" can some tell me how I go about executing the reindexing of zend on terminal command line.

I also tried typing zend -reindex while in the Zen directory and I command not found. I have attached below. Any help is appreciated.

2018-04-22_12-44-051

@LordMajestros
Copy link

LordMajestros commented Apr 22, 2018

Try this
'''
./zend -datadir="/Users//Library/Application Support/Zen" -reindex
'''
replacing with your actual user name.
If that does not work try copying out the contents of Java to the desktop and try again from terminal in that directory

@roguecryptovestor
Copy link

LordMajestros thank you for feedback. I tried typing the above per you suggestion and I get the following message "No such file or directory. I am wondering if I am I even in the correct directory to be running zend -reindex command? The only zend file I see is zend.pid not a zend.exe file. I tried following github docs as best as I can. As far as java suggestion unfortunately I am not a savvy programmer so I would not even know where to start.

Here is screenshot of my terminal inputs and the directory I am trying to perform reindex:

2018-04-22_16-16-19a

@LordMajestros
Copy link

LordMajestros commented Apr 23, 2018

Ok, the issue is you don't have the zen binary in that folder.
You can
1.) get it here https://github.com/ZencashOfficial/zen/releases/tag/v2.0.11
The file to get is Zen_Mac_binaries_v2.0.11.zip and check the signature matches Zen_Mac_binaries_v2.0.11.zip.asc
Then unzip it to a folder called zencash on the desktop.
Or
2.) You can try what I suggested earlier. If you have the swing wallet then go to Applications select open in finder.
Right click ZENCashwallet.App select "Show Package Contents"
Open the "Contents" folder
Open the "Java"
Copy out "zend" and "libs"
Paste in a folder somewhere else maybe your desktop.

Let's call the folder zencash.
open a terminal and type "cd /Users/prousermac/Desktop/zencash" hit enter
then this ./zend -datadir="/Users//Library/Application Support/Zen" -reindex

@LordMajestros
Copy link

Let me know any issues you encounter

@roguecryptovestor
Copy link

Thank you LordMajestros. I went with option 2 and it seems to be synchronizing now. On Friday before it failed Blockchain synchronized was 98%. it looks like reindexing starts the synchronization from scratch back to 0%. I will let you know if I have any other issues. Do you think it is still necessary to download zen binary or can I use option 2 for reindexing if I run into issue again. I really appreciate all your help.

@LordMajestros
Copy link

You can use option 2, there is no need to download the zen binary again unless there is an update.
Yes, reindexing starts from 0% but it doesn't download anything till it's done with the blockchain on your disk then it continues as normal updating the blockchain as new blocks are found.
You're welcome 😀

@roguecryptovestor
Copy link

LordMajestros the swing wallet stop synchronizing an got the following error after getting to 98% again. Can you please advise me on what to do. Should I download latest Swing wallet (current version is ZENCash Desktop GUI Wallet 0.75.9) and try to reindex through terminal again or should I do something else. I am afraid to do anything at this point in fear of losing my zencash. Ultimately I would like to move my zencash after full synchronization to Arizen or Ledger Nano S so I do not have to keep updating the blockchain. Is there a way to do this without the synchronizing. I really appreciate your help.

Here is the following error on Terminal window:
2018-04-23_10-10-05a

Here is error on swing wallet menu:
2018-04-23_10-08-54a

@zenportodev
Copy link
Contributor

@roguecryptovestor The error indicates that your wallet is too old. It uses zend 2.0.10-1 that is deprecated. You need to update the wallet to its newest version.

The ZEN private keys are located in the wallet.dat file in directory:
Windows: %APPDATA%/Zen/
Mac OS: ~/Library/Application Support/Zen/
To make sure your ZEN is not lost, the most important thing is to keep a backup copy of your wallet.dat file - it must never be lost! It may be copied manually when the GUI wallet/zend are not running. The wallet.dat needs to be backed up regularly (not just once - say after every 30-40 outgoing transactions) and it MUST also be backed up after creating a new Z address.

@roguecryptovestor
Copy link

Thanks zenportodev. that is why I am trying to synchronize my swing wallet so I can backup my wallet.dat file. How do I go about updating swing wallet on Mac without overwriting information in my existing wallet. Do I just download it and start the synchronizing? I Will my zencash be safe from being lost. I am a noob and am just being cautious. I appreciate all your help.

@LordMajestros
Copy link

LordMajestros commented Apr 23, 2018

The blockchain is stored in ~/Library/Application Support/Zen/ (OSX) and %APPDATA%/Zen/ on windows. the swing wallet is in your Applications folder on OSX and in Program Files on Windows
So no downloading it shouldn't cause a problem. @roguecryptovestor
You can get the latest release here: https://github.com/ZencashOfficial/zen/releases/tag/v2.0.11 for the command line tool and here https://github.com/ZencashOfficial/zencash-swing-wallet-ui/releases/download/0.81.0/ZENCashWallet-0.81.0.dmg for the GUI Version which contains the latest zend version.
Still make sure to backup your wallet.dat or your seed phrase or your private key or all three.

@anderson-sean
Copy link

I tried the first stage, which is of reindex the block-chain with this guide " https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/TroubleshootingGuide.md". But I cannot even launch "Zend.exe". The "zend.exe" app dashes during 1sec then it stops working. I use win8

@zenportodev
Copy link
Contributor

zenportodev commented Apr 24, 2018

@anderson-sean The following guide for Windows is more detailed:
https://miningwithnvidia.com/2018/02/09/zencash-wallet-eof-reached-code-1/
You also need to use a recent version of the wallet. If using an old version that contains an older zend.exe, it will not run due to the auto-deprecation feature.

zend that is automatically started by the wallet, stores its logs at locations:
Linux: ~/.zen/debug.log,
Windows: %APPDATA%/Zen/debug.log
Mac OS: ~/Library/Application Support/Zen/debug.log
The log files are the first place too look for clues as to the nature of problem.

@ghost
Copy link

ghost commented May 29, 2018

Backup the wallet.dat.

I had this error on linux due to my zen.conf file being incorrectly setup. That file is located in your userdirectory/.zen/zen.conf and a very basic conf file should look like this:

rpcuser=username
rpcpassword=Random Password Goes Here

addnode=23.227.163.203
addnode=198.27.98.171
addnode=50.116.39.40
addnode=23.92.31.218
addnode=45.79.64.189
addnode=23.227.163.200
addnode=144.76.92.119
addnode=163.172.172.171```

The addnode's are just secure nodes I added. You do not need to specify an RPC port and your zen.conf may be doing so. Note: The username doesnt need to be changed. Leave it as username. Only change the password and just use a password generator to be safe. You won't need it for anything in the wallet itself.

You could also navigate to the .zen folder listed above and remove the chainstate, blocks, and database folders. Reopening the swing wallet should redownload the chain and restore those folders.

If necessary re-install and follow the swing install guide to the T.
Linux: https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/ReleaseUbuntuRepository.md
Mac: https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/Release_0.81.0.md
Windows: https://github.com/ZencashOfficial/zencash-swing-wallet-ui/blob/master/docs/Release_0.80.5.md

@Andy515
Copy link

Andy515 commented Jul 13, 2018

Hi.
When I tape %appdata%\Zen I don’t see wallet.dat
These all what are available :
blocks
chainstate
database
.lock
cert.pem
db
debug
free_esimates
key.pem
peers
wallet
zen.conf

How can I back up my wallet? I’m om windows 7

Thanks in advance

@zenportodev
Copy link
Contributor

This document describes the backup in more detail, with screen-shots:
https://zencash.atlassian.net/wiki/spaces/ZEN/pages/7176693/ZENCashWallet+Swing+Wallet+-+Backup+and+Upgrade

@tarrenj
Copy link
Contributor

tarrenj commented Jul 15, 2018

@Andy515, windows is hiding the file extention, the wallet file is the wallet.dat file.

@Andy515
Copy link

Andy515 commented Jul 16, 2018

Thanks @tarrenj
I went through reindexing process, it takes almost 3 days.
But now in CD command there is following message :
zen disable deprecation

@tarrenj
Copy link
Contributor

tarrenj commented Jul 16, 2018

Ahh, that's a quick one, you just need to update your swing wallet to the most recent version.

@Andy515
Copy link

Andy515 commented Jul 16, 2018

And I still can't open my Zen wallet.
@tarrenj Any idea haw can I upgrade to the latest version ?
Sorry total noob here )

@tarrenj
Copy link
Contributor

tarrenj commented Jul 16, 2018

@ghost
Copy link

ghost commented Feb 9, 2019

This is how I recovered my wallet on Windows 10 :

  • Have a backup of your private keys (Wallet -> Export private keys...) or your %APPDATA%\zen\wallet.dat file (if you can't open the Swing Wallet for some reason)
  • Uninstall/Delete the existing Swing Wallet and the %APPDATA%\zen directory
  • Download, extract and run the latest release
    • Don't replace anything, let it start the synchronization with a brand new and empty wallet
  • With the private keys simply use the Wallet -> Import private keys... menu and import your private keys
  • With the %APPDATA%\zen\wallet.dat file there can be version-related issues so you have to extract your private keys from the file :
    • Go to https://myzenwallet.io/
    • Settings (cog) -> Load wallet.dat -> Close (cross)
    • Select wallet.dat file
    • Export -> Download Private Keys
    • Now in the Swing Wallet use the Wallet -> Import private keys... menu and import your private keys
  • You will see all your funds when the Swing Wallet will be fully synchronized

Can this issue be closed ?

@Sto1cNate
Copy link

@zennermac should be able to close this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests