Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.83k stars 2.02k forks source link

[BUG] Consolidated stuck at "Connecting to wallet" or wallet does not sync issues #6993

Open PrashantSinghrgb opened 3 years ago

PrashantSinghrgb commented 3 years ago

my chai blockchain is stucked on connecting wallet on one computer and working fine on other one please help me

mariano54 commented 3 years ago

Can you try the following steps:

  1. Shut down the application by closing the GUI, or if on command line, activate and then do chia stop all -d.
  2. Update to the latest version
  3. Check if any chia process are running in the task manager, if so, close them
  4. Restart computer
  5. Start Chia App
  6. Refresh with Ctrl+R if it's not working
  7. If still not working, close the app, and delete the wallet DB (delete all files in ~/.chia/mainnet/wallet/db), and start it again

You might have to wait 10+ minutes for the wallet to start syncing up. There have been bugs in older versions where sometimes the wallet DB got corrupted, which is why we recommend deleting the DB if the application does not load, or if the wallet does not sync properly. If you see any errors in the ~/.chia/mainnet/log/debug.log file after performing those steps, you can post them here.

fullet-tortuga commented 3 years ago

I just made a clean install of version 1.1.7. and the problem persists.

Funny thing is that the program launches these 4 instances:

".\AppData\Local\chia-blockchain\app-1.1.7\Chia.exe"

".\AppData\Local\chia-blockchain\app-1.1.7\Chia.exe" --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=936,5784584054182019487,8737712859100052370,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --lang=en-US --service-sandbox-type=network --mojo-platform-channel-handle=1200 /prefetch:8

".\AppData\Local\chia-blockchain\app-1.1.7\Chia.exe" --type=renderer --field-trial-handle=936,5784584054182019487,8737712859100052370,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --lang=en-US --app-user-model-id=com.squirrel.chia-blockchain.Chia --app-path=".\AppData\Local\chia-blockchain\app-1.1.7\resources\app.asar" --node-integration --no-sandbox --no-zygote --preload=".\AppData\Local\chia-blockchain\app-1.1.7\resources\app.asar\build\electron/preload.js" --enable-remote-module --background-color=#ffffff --enable-spellcheck --enable-websql --disable-electron-site-instance-overrides --device-scale-factor=1 --num-raster-threads=1 --renderer-client-id=4 --no-v8-untrusted-code-mitigations --mojo-platform-channel-handle=1404 /prefetch:1

".\AppData\Local\chia-blockchain\app-1.1.7\Chia.exe" --type=gpu-process --field-trial-handle=936,5784584054182019487,8737712859100052370,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --gpu-preferences=MAAAAAAAAADgAAAwAAAAAAAAAAAAAAAAAABgAAAAAAAQAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAgAAAAAAAAACgAAAAAAAAAMAAAAAAAAAA4AAAAAAAAABAAAAAAAAAAAAAAAAUAAAAQAAAAAAAAAAAAAAAGAAAAEAAAAAAAAAABAAAABQAAABAAAAAAAAAAAQAAAAYAAAA= --use-gl=swiftshader-webgl --mojo-platform-channel-handle=1312 /prefetch:2

Hope that helps.

Ebolet commented 3 years ago

I have the same problem and updated to 1.1.7 and it does not connect the wallet, it always stays on charge. and I can't fix it in any way, I need help please

mpnowacki-reef commented 3 years ago

@mariano54 I'm also having trouble with wallets not syncing. I've noticed these two errors in debug.log:

full_node chia.full_node.full_node: ERROR Exception while querying DNS server: All nameservers failed to answer the query dns-introducer.chia.net. IN A: Server 192.168.1.1 UDP port 53 answered SERVFAIL on mainnet, chia-blockchain v1.1.7

and

> exception=AttributeError("'WalletPeers' object has no attribute 'connection'")>
Traceback (most recent call last):
  File "/private/var/root/p/pool-reference/chia-blockchain/chia/server/node_discovery.py", line 704, in ensure_is_closed
    await self._close_common()
  File "/private/var/root/p/pool-reference/chia-blockchain/chia/server/node_discovery.py", line 118, in _close_common
    await self.connection.close()
AttributeError: 'WalletPeers' object has no attribute 'connection'

on testnet9, chia-blockchain 1.1.7.dev95+gb1cd26cf.d20210706

jadechip commented 3 years ago

Still getting the following error running the latest version on Ubuntu:

root@chia-mainnet-node-0:/chia-blockchain# tail ~/.chia/mainnet/log/debug.log
    raise ValueError("Peer returned no response")
ValueError: Peer returned no response

and

ERROR    Loop exception in sync Was not able to add blocks 0-32.
  File "/chia-blockchain/chia/wallet/wallet_node.py", line 515, in sync_job
    await self._sync()
  File "/chia-blockchain/chia/wallet/wallet_node.py", line 614, in _sync
enazarian commented 3 years ago

Hi - I have the same problem where the GUI is stuck "connecting to wallet" after updating to the latest 1.2 - pool compatible version. When I tried to delete the files in .chia/mainnet/wallet/db, I was able to load the GUI but all of the xch that had been in my wallet were gone. How do I retrieve my xch or how do I fix this issue?

keliew commented 3 years ago

Hi - I have the same problem where the GUI is stuck "connecting to wallet" after updating to the latest 1.2 - pool compatible version. When I tried to delete the files in .chia/mainnet/wallet/db, I was able to load the GUI but all of the xch that had been in my wallet were gone. How do I retrieve my xch or how do I fix this issue?

Your wallet needs to be synced, then you'll see it. It's not an "issue".

mpnowacki-reef commented 3 years ago

@enazarian depending on your machine, syncing the whole blockchain and wallet maybe take up to a few dozen hours. To see if everything is alright, runchia show -s and see if the first number in the line Current Blockchain Status: Syncing X/Y is rising (in consecutinve calls) or if you eventually get a Current Blockchain Status: Full Node Synced line.

You also have to wait for your wallet to "catch up" with blockchain. run chia wallet show. If you get a line saying Sync status: Not synced your xch balance will be invalid/not-up-to-date. If the value in a line saying Wallet height: X is not rising, then you have a problem. Otherwise just leave your machine on and wait.

borislavstoychev commented 3 years ago

Hi In my file debug.log I found an error that is repeated many times. Everything is fully synced.I will be grateful for any help! Using Ubuntu 20.04.02 LTS.

2021-07-13T16:03:14.661 wallet wallet_server              : WARNING  Trying to ban localhost for 10, but will not ban
2021-07-13T17:59:58.982 wallet wallet_server              : ERROR    Exception: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop, {'host': '127.0.0.1', 'port': 8444}. Traceback (most recent call last):
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 523, in wrapped_coroutine
    result = await coroutine
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node_api.py", line 49, in new_peak_wallet
    await self.wallet_node.new_peak_wallet(peak, peer)
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node.py", line 446, in new_peak_wallet
    async with self.new_peak_lock:
  File "/usr/lib/python3.8/asyncio/locks.py", line 97, in __aenter__
    await self.acquire()
  File "/usr/lib/python3.8/asyncio/locks.py", line 203, in acquire
    await fut
RuntimeError: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop

2021-07-13T17:59:59.002 wallet wallet_server              : ERROR    Exception: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop <class 'RuntimeError'>, closing connection {'host': '127.0.0.1', 'port': 8444}. Traceback (most recent call last):
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 533, in api_call
    response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=timeout)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
    return await fut
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 530, in wrapped_coroutine
    raise e
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 523, in wrapped_coroutine
    result = await coroutine
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node_api.py", line 49, in new_peak_wallet
    await self.wallet_node.new_peak_wallet(peak, peer)
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node.py", line 446, in new_peak_wallet
    async with self.new_peak_lock:
  File "/usr/lib/python3.8/asyncio/locks.py", line 97, in __aenter__
    await self.acquire()
  File "/usr/lib/python3.8/asyncio/locks.py", line 203, in acquire
    await fut
RuntimeError: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop

//new warning...
2021-07-13T17:59:59.050 wallet wallet_server              : WARNING  Trying to ban localhost for 10, but will not ban
borislavstoychev commented 3 years ago

Hi In my file debug.log I found an error that is repeated many times. Everything is fully synced.I will be grateful for any help! Using Ubuntu 20.04.02 LTS.

2021-07-13T16:03:14.661 wallet wallet_server              : WARNING  Trying to ban localhost for 10, but will not ban
2021-07-13T17:59:58.982 wallet wallet_server              : ERROR    Exception: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop, {'host': '127.0.0.1', 'port': 8444}. Traceback (most recent call last):
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 523, in wrapped_coroutine
    result = await coroutine
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node_api.py", line 49, in new_peak_wallet
    await self.wallet_node.new_peak_wallet(peak, peer)
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node.py", line 446, in new_peak_wallet
    async with self.new_peak_lock:
  File "/usr/lib/python3.8/asyncio/locks.py", line 97, in __aenter__
    await self.acquire()
  File "/usr/lib/python3.8/asyncio/locks.py", line 203, in acquire
    await fut
RuntimeError: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop

2021-07-13T17:59:59.002 wallet wallet_server              : ERROR    Exception: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop <class 'RuntimeError'>, closing connection {'host': '127.0.0.1', 'port': 8444}. Traceback (most recent call last):
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 533, in api_call
    response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=timeout)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
    return await fut
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 530, in wrapped_coroutine
    raise e
  File "/home/petrich90/chia-blockchain/chia/server/server.py", line 523, in wrapped_coroutine
    result = await coroutine
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node_api.py", line 49, in new_peak_wallet
    await self.wallet_node.new_peak_wallet(peak, peer)
  File "/home/petrich90/chia-blockchain/chia/wallet/wallet_node.py", line 446, in new_peak_wallet
    async with self.new_peak_lock:
  File "/usr/lib/python3.8/asyncio/locks.py", line 97, in __aenter__
    await self.acquire()
  File "/usr/lib/python3.8/asyncio/locks.py", line 203, in acquire
    await fut
RuntimeError: Task <Task pending name='Task-13048' coro=<ChiaServer.incoming_api_task.<locals>.api_call() running at /home/petrich90/chia-blockchain/chia/server/server.py:533>> got Future <Future pending> attached to a different loop

//new warning...
2021-07-13T17:59:59.050 wallet wallet_server              : WARNING  Trying to ban localhost for 10, but will not ban

i think updating chia solved the problem

roonmorton commented 3 years ago

Hello, in the debug.log file it repeatedly shows the following error, and in the chia GUI the wallet synchronization does not advance from 241,344

Try to delete / wallet / db and sync up to 241,344

Create a new Key and the same thing happens

I have a Key that the wallet is synchronized but the ones that I have recently created do not advance in synchronization

Ubuntu 20.04 LTS CHIA 1.2.2

` 2021-07-15T07:49:04.342 full_node full_node_server : ERROR Exception: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain, {'host': '127.0.0.1', 'port': 8449}. Traceback (most recent call last): File "chia/server/server.py", line 523, in wrapped_coroutine File "chia/full_node/full_node_api.py", line 1254, in request_header_blocks File "chia/full_node/block_store.py", line 225, in get_blocks_by_hash ValueError: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain

2021-07-15T07:49:04.343 full_node full_node_server : ERROR Exception: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain <class 'ValueError'>, closing connection {'host': '127.0.0.1', 'port': 8449}. Traceback (most recent call last): File "chia/server/server.py", line 533, in api_call File "asyncio/tasks.py", line 494, in wait_for File "chia/server/server.py", line 530, in wrapped_coroutine File "chia/server/server.py", line 523, in wrapped_coroutine File "chia/full_node/full_node_api.py", line 1254, in request_header_blocks File "chia/full_node/block_store.py", line 225, in get_blocks_by_hash ValueError: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain

2021-07-15T07:49:04.344 full_node full_node_server : WARNING Trying to ban localhost for 10, but will not ban 2021-07-15T07:49:04.345 wallet chia.wallet.wallet_node : ERROR Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last): File "chia/wallet/wallet_node.py", line 527, in batch_sync_to_peak File "chia/wallet/wallet_node.py", line 679, in fetch_blocks_and_validate ValueError: Peer returned no response

2021-07-15T07:49:04.346 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 241343-241375. Traceback (most recent call last): File "chia/wallet/wallet_node.py", line 580, in sync_job File "chia/wallet/wallet_node.py", line 660, in _sync File "chia/wallet/wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 241343-241375

`

BigDealsNinja commented 3 years ago

For some reason my wallet stopped synchronizing a couple of days ago, today I restarted my pc and started sync again however it gets stuck on synchronizing and doesn't move forward.

Looking at the log I see the following (not sure if its related):

2021-07-17T02:10:39.651 wallet wallet : INFO Reconnecting to peer {'host': '127.0.0.1', 'port': 8444} 2021-07-17T02:10:39.746 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x00000000000000> [The remote computer refused the network connection] 2021-07-17T02:10:41.684 wallet wallet_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x0000000000000> [The remote computer refused the network connection]

2021-07-17T02:26:02.465 full_node full_node_server : INFO Not accepting inbound connection: {'host': '118.118.255.255', 'port': 8444}.Inbound limit reached. 2021-07-17T02:26:02.725 full_node full_node_server : INFO Connection closed: 118.118.255.255, node id: 00000000000000000000000000

Any help will be appreciated, cheers

doma2345 commented 3 years ago

i have this same issue, I have a fully synced node and added a new key / wallet and it refuses to sync, I have restarted the app and the computer multiple times it just sticks on syncing (0) and am getting the following in the logs

2021-07-22T19:27:13.237 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 580, in sync_job File "chia\wallet\wallet_node.py", line 660, in _sync File "chia\wallet\wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 0-32

2021-07-22T19:27:13.239 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.245 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.247 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.253 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.255 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.256 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.256 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.257 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.258 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.259 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.260 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.261 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.262 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.264 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.264 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.271 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.272 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.273 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.274 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.274 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.274 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.276 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.277 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.277 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.279 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.279 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.280 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.281 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.282 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.285 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.287 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.289 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:27:13.828 wallet chia.rpc.rpc_server : WARNING Error while handling message: Traceback (most recent call last): File "chia\rpc\rpc_server.py", line 212, in safe_handle File "chia\rpc\rpc_server.py", line 203, in ws_api File "chia\rpc\wallet_rpc_api.py", line 358, in get_sync_status AssertionError

2021-07-22T19:27:13.830 wallet chia.rpc.rpc_server : WARNING Error while handling message: Traceback (most recent call last): File "chia\rpc\rpc_server.py", line 212, in safe_handle File "chia\rpc\rpc_server.py", line 203, in ws_api File "chia\rpc\wallet_rpc_api.py", line 358, in get_sync_status AssertionError

2021-07-22T19:30:21.958 wallet chia.wallet.wallet_node : ERROR Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 527, in batch_sync_to_peak File "chia\wallet\wallet_node.py", line 679, in fetch_blocks_and_validate ValueError: Peer returned no response

2021-07-22T19:30:21.962 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 580, in sync_job File "chia\wallet\wallet_node.py", line 660, in _sync File "chia\wallet\wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 0-32

2021-07-22T19:30:21.971 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:34:06.109 wallet chia.wallet.wallet_node : ERROR Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 527, in batch_sync_to_peak File "chia\wallet\wallet_node.py", line 679, in fetch_blocks_and_validate ValueError: Peer returned no response

2021-07-22T19:34:06.118 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 580, in sync_job File "chia\wallet\wallet_node.py", line 660, in _sync File "chia\wallet\wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 0-32

2021-07-22T19:34:06.120 wallet chia.wallet.wallet_node : WARNING bad peak response from peer None 2021-07-22T19:36:05.271 wallet chia.wallet.wallet_node : ERROR Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 527, in batch_sync_to_peak File "chia\wallet\wallet_node.py", line 679, in fetch_blocks_and_validate ValueError: Peer returned no response

2021-07-22T19:36:05.273 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last): File "chia\wallet\wallet_node.py", line 580, in sync_job File "chia\wallet\wallet_node.py", line 660, in _sync File "chia\wallet\wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 0-32

roonmorton commented 3 years ago

Hello, in the debug.log file it repeatedly shows the following error, and in the chia GUI the wallet synchronization does not advance from 241,344

Try to delete / wallet / db and sync up to 241,344

Create a new Key and the same thing happens

I have a Key that the wallet is synchronized but the ones that I have recently created do not advance in synchronization

Ubuntu 20.04 LTS CHIA 1.2.2

` 2021-07-15T07:49:04.342 full_node full_node_server : ERROR Exception: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain, {'host': '127.0.0.1', 'port': 8449}. Traceback (most recent call last): File "chia/server/server.py", line 523, in wrapped_coroutine File "chia/full_node/full_node_api.py", line 1254, in request_header_blocks File "chia/full_node/block_store.py", line 225, in get_blocks_by_hash ValueError: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain

2021-07-15T07:49:04.343 full_node full_node_server : ERROR Exception: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain <class 'ValueError'>, closing connection {'host': '127.0.0.1', 'port': 8449}. Traceback (most recent call last): File "chia/server/server.py", line 533, in api_call File "asyncio/tasks.py", line 494, in wait_for File "chia/server/server.py", line 530, in wrapped_coroutine File "chia/server/server.py", line 523, in wrapped_coroutine File "chia/full_node/full_node_api.py", line 1254, in request_header_blocks File "chia/full_node/block_store.py", line 225, in get_blocks_by_hash ValueError: Header hash b'\x9b\xda6\xf8kr#!<0\xed\xd2G\xd7e\xb8l\xac\xb7\xee\xe5\xd5\x02Ip\xd5^q\xa8\xb9\xd9c' not in the blockchain

2021-07-15T07:49:04.344 full_node full_node_server : WARNING Trying to ban localhost for 10, but will not ban 2021-07-15T07:49:04.345 wallet chia.wallet.wallet_node : ERROR Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last): File "chia/wallet/wallet_node.py", line 527, in batch_sync_to_peak File "chia/wallet/wallet_node.py", line 679, in fetch_blocks_and_validate ValueError: Peer returned no response

2021-07-15T07:49:04.346 wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 241343-241375. Traceback (most recent call last): File "chia/wallet/wallet_node.py", line 580, in sync_job File "chia/wallet/wallet_node.py", line 660, in _sync File "chia/wallet/wallet_node.py", line 537, in batch_sync_to_peak RuntimeError: Was not able to add blocks 241343-241375

`

I solved this problem by syncing the node again, removing mainnet/db,

I make the assumption that something is different in version 1.2.2 to synchronize the wallet, now I have no problems adding new keys / wallets synchronized without problem ...

github-actions[bot] commented 3 years ago

This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.

boner-cmd commented 3 years ago

8146 and #8019 appear related to this issue

boner-cmd commented 3 years ago

I also didn't create a new bug since this consolidation, but I have a new (1.2.3) Chia setup on a raspberry pi running ubuntu server. Node fully synced, wallet block height has been 0 for a week.

boner-cmd commented 3 years ago

7886 is one possible cause but probably not the universal cause

boner-cmd commented 3 years ago

Tis is a good feature request, but sadly was not the cause of my issue.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Louis Loudog Trottier @.> Sent: Thursday, September 9, 2021 12:24:32 PM To: Chia-Network/chia-blockchain @.> Cc: Dimelo Waterson @.>; Comment @.> Subject: Re: [Chia-Network/chia-blockchain] [BUG] Consolidated stuck at "Connecting to wallet" or wallet does not sync issues (#6993)

I also didn't create a new bug since this consolidation, but I have a new (1.2.3) Chia setup on a raspberry pi running ubuntu server. Node fully synced, wallet block height has been 0 for a week.

If you are running in the python env and did not do chia wallet show at least once on your wallet to specify if you want to ecover from backup or skip, it will (semms to me) stay at 0 and never start syncing.

[FEATURE] Adding and flag to skip the backup would be a nice addition so we can actuallty run the service without user input.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Chia-Network/chia-blockchain/issues/6993#issuecomment-916250441, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4UEJFJCF4EXNOOJOMKGCDUBDNUBANCNFSM47LQ6RNA.

emlowe commented 3 years ago

2. I am aware only 1 wallet is synced at a time, but i can only assume it automatically switch to another when done with one?

No, this assumption does not hold. You must "switch" the wallet using chia wallet show

flotti455 commented 3 years ago

I am experiencing the bug that my wallet cannot sync from fresh; it's in a loop Requesting blocks 0-32 from my full node. It's requesting these blocks, then the request times out after exactly 60 seconds, and repeats.

https://github.com/Chia-Network/chia-blockchain/blob/1.2.5/chia/wallet/wallet_node.py#L683

I have the vague feeling that the default request timeout of 60 seconds (maybe this: https://github.com/Chia-Network/chia-blockchain/blob/1.2.5/chia/server/ws_connection.py#L265 ) is too short for older computers.

alexs20 commented 3 years ago

Lol, a 6 months later and chia still cannot fix that stupid bug that doesn't let to start fresh installed chia client. I surprised that with such awful client the chia is still has some value on the market. But anyway... fresh client, no db or any previously installed files in the system, porta are open... and it stuck on Connecting to wallet. Do something with it or shutdown that project. do at least something.

LouisLoudogTrottier commented 3 years ago

I've ended up backuping config.yaml and delete the whole .chia/mainnet folder and start again. I've crate a loop script that change to the next wallet every 10 minutes and all wallet seems to sync proprely and advacne at +/- the same rate.

ghost commented 3 years ago

It is very frustrating. I am trying to sync for the last 3 weeks and I always get stuck. Tried to reinstall whole client (debian, no gui), delete wallet db many times and start over but never manage to the end of sync procces.

`2021-09-14T13:33:02.280 full_node full_node_server        : WARNING  Trying to ban localhost for 10, but will not ban
2021-09-14T13:33:02.281 wallet chia.wallet.wallet_node    : ERROR    Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last):
  File "/root/chia-blockchain/chia/wallet/wallet_node.py", line 555, in batch_sync_to_peak
    added, advanced_peak = await self.fetch_blocks_and_validate(
  File "/root/chia-blockchain/chia/wallet/wallet_node.py", line 687, in fetch_blocks_and_validate
    raise ValueError("Peer returned no response")
ValueError: Peer returned no response

2021-09-14T13:33:02.281 wallet chia.wallet.wallet_node    : ERROR    Loop exception in sync Was not able to add blocks 563613-563645. Traceback (most recent call last):
  File "/root/chia-blockchain/chia/wallet/wallet_node.py", line 608, in sync_job
    await self._sync()
  File "/root/chia-blockchain/chia/wallet/wallet_node.py", line 668, in _sync
    await self.batch_sync_to_peak(fork_height, peak)
  File "/root/chia-blockchain/chia/wallet/wallet_node.py", line 565, in batch_sync_to_peak
    raise RuntimeError(f"Was not able to add blocks {start_height}-{end_height}")
RuntimeError: Was not able to add blocks 563613-563645`
boner-cmd commented 2 years ago

Just had an issue where my node and wallet, despite still having connections, suddenly lost sync. I was on 1.2.5. Deleted wallet DB, updated to 1.2.7, still no sync. Encountered another bug at the same time #8533 but the sync issue is separate and ongoing.

For clarity, I had the wallet not syncing, then when trying to restart got the "stuck at connecting to wallet" issue. Again, clearing wallet DB has not corrected the issue.

boner-cmd commented 2 years ago

The oldest issue folded in here is from May 10th. The newest occurrence is September 19th. Thanks for removing the "stale issue" label.

boner-cmd commented 2 years ago

After upgrading to 1.2.7 and deleting my wallet db I was able to re-sync. Still not sure what caused the corruption, this is my fourth occurrence in as many versions I think.

jack60612 commented 2 years ago

After upgrading to 1.2.7 and deleting my wallet db I was able to re-sync. Still not sure what caused the corruption, this is my fourth occurrence in as many versions I think.

db corruption is not an issue caused by chia.

boner-cmd commented 2 years ago

db corruption is not an issue caused by chia.

I'm just confused then. A popular and supposedly resilient database repeatedly corrupts, with the only solution being manual user intervention (i.e. deleting the folder and restarting the application), but Chia is not the cause?

From the corruption reference:

An SQLite database is highly resistant to corruption. If an application crash, or an operating-system crash, or even a power failure occurs in the middle of a transaction, the partially written transaction should be automatically rolled back the next time the database file is accessed. The recovery process is fully automatic and does not require any action on the part of the user or the application.

But with Chia I have to navigate to a specific folder by hand and delete its contents in entirety? And not just within Chia, exclusively the wallet database, but never the node database?

This strikes me as an incredible coincidence. Wouldn't the node and the wallet corrupt with equal frequency if the underlying software dependency, hardware, or environment were to blame?

jack60612 commented 2 years ago

db corruption is not an issue caused by chia.

I'm just confused then. A popular and supposedly resilient database repeatedly corrupts, with the only solution being manual user intervention (i.e. deleting the folder and restarting the application), but Chia is not the cause?

From the corruption reference:

An SQLite database is highly resistant to corruption. If an application crash, or an operating-system crash, or even a power failure occurs in the middle of a transaction, the partially written transaction should be automatically rolled back the next time the database file is accessed. The recovery process is fully automatic and does not require any action on the part of the user or the application.

But with Chia I have to navigate to a specific folder by hand and delete its contents in entirety? And not just within Chia, exclusively the wallet database, but never the node database?

This strikes me as an incredible coincidence. Wouldn't the node and the wallet corrupt with equal frequency if the underlying software dependency, hardware, or environment were to blame?

i have never had to replace my database. That is just bad luck

boner-cmd commented 2 years ago

That is just bad luck

This thread exists to document the "bad luck" of dozens of users across different platforms, hardware configurations, and Chia versions over the past four months, and the issue pre-dates even that. The second post in this entire thread is @mariano54 acknowledging the issue.

If you really believe, in good faith, that corruption is not a Chia problem, just close the mega-thread and all subsequent reports; everything is working as intended and there is no bug to report or fix.

Or, maybe your experience isn't representative and isn't sufficient justification to claim no problem exists.

jack60612 commented 2 years ago

That is just bad luck

This thread exists to document the "bad luck" of dozens of users across different platforms, hardware configurations, and Chia versions over the past four months, and the issue pre-dates even that. The second post in this entire thread is @mariano54 acknowledging the issue.

If you really believe, in good faith, that corruption is not a Chia problem, just close the mega-thread and all subsequent reports; everything is working as intended and there is no bug to report or fix.

Or, maybe your experience isn't representative and isn't sufficient justification to claim no problem exists.

the thing is. We use a standard python library for the db. Which thousands of other projects use. If there was an issue with the db library that would still be an issue with them and not chia. If these bugs were truly not caused by some sort of bad memory /hdd /ssd then no one would use aiomysqlite (the module we use).

boner-cmd commented 2 years ago

This is actually my argument for why it is Chia related. If the library was bad, nobody would use it. But specifically Chia's use of that library produces this hung state as a result of corruption. Bad hardware can only make you so "unlucky" if users are only experiencing fatal issues with your application.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Jack Nelson @.> Sent: Sunday, September 19, 2021 2:38:25 PM To: Chia-Network/chia-blockchain @.> Cc: Dimelo Waterson @.>; Comment @.> Subject: Re: [Chia-Network/chia-blockchain] [BUG] Consolidated stuck at "Connecting to wallet" or wallet does not sync issues (#6993)

That is just bad luck

This thread exists to document the "bad luck" of dozens of users across different platforms, hardware configurations, and Chia versions over the past four months, and the issue pre-dates even that. The second post in this entire thread is @mariano54https://github.com/mariano54 acknowledging the issue.

If you really believe, in good faith, that corruption is not a Chia problem, just close the mega-thread and all subsequent reports; everything is working as intended and there is no bug to report or fix.

Or, maybe your experience isn't representative and isn't sufficient justification to claim no problem exists.

the thing is. We use a standard python library for the db. Which thousands of other projects use. If there was an issue with the db library that would still be an issue with them and not chia. If these bugs were truly not caused by some sort of bad memory /hdd /ssd then no one would use aiomysqlite.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Chia-Network/chia-blockchain/issues/6993#issuecomment-922517601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4UEJD3OFNJI3TMSLUM2CDUCYU2DANCNFSM47LQ6RNA.

LouisLoudogTrottier commented 2 years ago

Wallet sync has been, and still is, an issue. Every single version break wallet sync at one point and resyncing many wallet takes FOREVER just in the hope one will not crash and you have to delete ALL wallets and resync ALL of them. This is ridicoulusly frustrating. You need to asses this problem. PLEASE.

Seriously, i am at a point where i just gave up, i sync one wallet at a time, delete the keys import a new one, snc it, send the fund to a min wallet, delete the keys add a new one, sync, send the fund, etc etc etc. I have been on this process of over 5 weeks now. And once i a while a wallet stop syncing and i have to delete the db folder and start sync again. This happens randomly about twice a week on different wallets. Talk about bad luck hein !?

jack60612 commented 2 years ago

Wallet sync has been, and still is, an issue. Every single version break wallet sync at one point and resyncing many wallet takes FOREVER just in the hope one will not crash and you have to delete ALL wallets and resync ALL of them. This is ridicoulusly frustrating. You need to asses this problem. PLEASE.

Seriously, i am at a point where i just gave up, i sync one wallet at a time, delete the keys import a new one, snc it, send the fund to a min wallet, delete the keys add a new one, sync, send the fund, etc etc etc. I have been on this process of over 5 weeks now. And once i a while a wallet stop syncing and i have to delete the db folder and start sync again. This happens randomly about twice a week on different wallets. Talk about bad luck hein !?

i personally run a farm of my own and i have not had to delete my db once. I will look into it but still.

emlowe commented 2 years ago

We are working on an entirely new syncing protocol for the wallet therefore we aren't spending much time right now on other wallet syncing issues. This new syncing protocol should reduce wallet syncing times substantially in most cases. I realize syncing your wallet can be frustrating.

boner-cmd commented 2 years ago

This is exactly the kind of information that provides reassurance. Thank you.


From: Earle Lowe @.> Sent: Monday, September 20, 2021 12:58:08 PM To: Chia-Network/chia-blockchain @.> Cc: Dimelo Waterson @.>; Comment @.> Subject: Re: [Chia-Network/chia-blockchain] [BUG] Consolidated stuck at "Connecting to wallet" or wallet does not sync issues (#6993)

We are working on an entirely new syncing protocol for the wallet therefore we aren't spending much time right now on other wallet syncing issues. This new syncing protocol should reduce wallet syncing times substantially in most cases. I realize syncing your wallet can be frustrating.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Chia-Network/chia-blockchain/issues/6993#issuecomment-923106348, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4UEJEHZJ7S5JTVOHQFRP3UC5R2BANCNFSM47LQ6RNA.

LouisLoudogTrottier commented 2 years ago

keeping a watch on the debug log level INFO and the wallet just stopped syncing about an hour ago without any error. It just never requested the next blocks and stopped at 883311. When this behavour (silent without errors) you can usually simply restart the wallet with chia start wallet-only -r and it will restart synccing again. I have added a cron job to restart the wallet every hour for now. <= This is only a inconvenience.

PS: This behaviour is completelly different as when i get the error about the empty peer response and that i cannot add the blocks, which happens often on many different wallet at different height, and THIS requires to delete the db folder and resync from sratch. <= This is a real problemé

LouisLoudogTrottier commented 2 years ago

Since 1.2.9 sometimes, let sys I have a wallet a height 600000+, in the log wallet is requesting block 272000 ish, and stop sycing. Again on mutiple wallet. I have wallet almost fully syncin the log it ask fo 0-32...

LouisLoudogTrottier commented 2 years ago

Since 1.2.9 sometimes, let sys I have a wallet a height 600000+, in the log wallet is requesting block 272000 ish, and stop sycing. Again on mutiple wallet. I have wallet almost fully syncin the log it ask fo 0-32...

3rd time this happens to me with 3 différente wallet.

It get almost fully synced and then it start requestion older block in the debug.log and the wallet stop syncing. Have to restart the wallet with chia start wallet-only -r to start syncing again.

LouisLoudogTrottier commented 2 years ago

This is annoying... Wallet get almost up to sync, about 100 lbock behind full node. Then stop syncing a log show wallet ask for old block about 1000 block behind... Again... for more thatn 2 hours, requesting the wrong block.... Waste my time..

sutra commented 2 years ago

If the chia process is interrupted abnormally, and then start it again, the sync processing will not work properly, you will keep seeing error in log/debug.log ERROR Loop exception in sync Was not able to add blocks ....

And I have to delete .chia directory and chia init to restart all from zero again.

ahnchiha commented 2 years ago

Coin not coming in

2021-10-18T20:33:32.504 wallet chia.wallet.wallet_node : INFO Loop start in sync job 2021-10-18T20:33:32.655 wallet chia.wallet.wallet : INFO coins is not None {Coin(parent_coin_info=, puzzle_hash=<bytes32: 8d759e4f38654f504b017f699579e9e6b6e3bd64b7ddf1fe72d055f2053b089f>, amount=1750000000000)} 2021-10-18T20:33:32.656 wallet chia.wallet.wallet : INFO coin from coins {'amount': 1750000000000, 'parent_coin_info': '0xccd5bb71183532bff220ba46c268991a000000000000000000000000000f13a3', 'puzzle_hash': '0x8d759e4f38654f504b017f699579e9e6b6e3bd64b7ddf1fe72d055f2053b089f'} 2021-10-18T20:33:32.670 wallet chia.wallet.wallet : INFO Spends is [CoinSpend(coin=Coin(parent_coin_info=, puzzle_hash=<bytes32: 8d759e4f38654f504b017f699579e9e6b6e3bd64b7ddf1fe72d055f2053b089f>, amount=1750000000000), puzzle_reveal=SerializedProgram(ff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0aef7941c0080a3dbbe8248584069dd7efde49d13a5c3cf99469c072e61ccebcbd1d7446fbe789aecefa41702571799a3ff018080), solution=SerializedProgram(ff80ffff01ffff33ffa08d759e4f38654f504b017f699579e9e6b6e3bd64b7ddf1fe72d055f2053b089fff8601977420dc0080ffff3cffa056e80ccdfb8411b8643f118bedae2c9be4368b78045aa67e8084a30b2aa5cbcf8080ff8080))]

Is there any way to solve this?

luotinen commented 2 years ago

Confirmed the bug still exists in 1.2.11. My wallet sync is stuck at 391,793 and I tried all of the steps including deleting the wallet DB and it just stays stuck indefinitely while the main node is synced and farming takes place normally. Any ideas on way to solve this issue?

vassluck commented 2 years ago

I've been troubleshooting Chia bugs over 6 months..what a time suck. I fully share everyone's frustration. CHIA GUYS, can you pls focus on fixing this persistent issue? you are losing your most loyal early believers. I upgraded to the latest version 1.2.11 from 1.2.09, as advised by your team's tweet.. Got stuck on "Connecting to Wallet", tried all the suggestions. None worked. I completely removed the app from my mac, reinstalled 1.2.11. I didn't help. I am stuck on Connecting to Wallet, not asking for mnemonic, not even getting to syncing mainnet. I am so frustrated, I am usually very composed, I am at the verge of losing my s*t and scream.. PLEASE HELP AND FIX THIS ONCE AND FOR ALL!

vassluck commented 2 years ago

I got fed up and rolled back to 1.2.9. It worked a treat, though now I need to resync the whole mainnet. Chia - what a technical disaster.. if they cant solve this issue - connecting to your money!! - what else is there to talk about..?

russellcaughey commented 2 years ago

Confirmed the bug still exists in 1.2.11

craig0100 commented 2 years ago

I've deleted my wallet db and it's still stuck at "connecting to wallet". Any other suggestions?