WalletWasabi: ERROR System.NotSupportedException: Incomplete message.
While testing master https://github.com/zkSNACKs/WalletWasabi/commit/b5162a6fa500b35fc5583fe2ba1b5f8c30df751d (precisely to test https://github.com/zkSNACKs/WalletWasabi/pull/5973) I got this error:
Click to expand and to see the logs!
2021-08-24 16:04:59 [1] INFO Program:Main (77) Wasabi GUI started (1e8e0cf4-bc49-422f-b004-b3be4506e1f8).
2021-08-24 16:05:08 [1] INFO IndexStore:Dispose (78) InitializeAsync finished in 83 milliseconds.
2021-08-24 16:05:08 [1] INFO TransactionStore:Dispose (34) MempoolStore.InitializeAsync finished in 38 milliseconds.
2021-08-24 16:05:08 [21] INFO TransactionStore:Dispose (34) ConfirmedStore.InitializeAsync finished in 416 milliseconds.
2021-08-24 16:05:08 [21] INFO AllTransactionStore:Dispose (41) InitializeAsync finished in 492 milliseconds.
2021-08-24 16:05:08 [21] INFO BitcoinStore:Dispose (46) InitializeAsync finished in 588 milliseconds.
2021-08-24 16:05:09 [17] INFO TorProcessManager:StartProcess (234) Starting Tor process ...
2021-08-24 16:05:20 [19] INFO TorProcessManager:RestartingLoopAsync (121) Tor is running.
2021-08-24 16:05:20 [19] INFO Global:Dispose (160) TorProcessManager.Start finished in 11.69 seconds.
2021-08-24 16:05:20 [19] INFO Global:InitializeNoWalletAsync (170) TorProcessManager is initialized.
2021-08-24 16:05:20 [19] WARNING KeyManager:SetMaxBestHeight (669) Wallet (Daemon) height has been set back by 1236123. From 2064698 to 828575.
2021-08-24 16:05:20 [19] INFO P2pNetwork:.ctor (57) Loaded AddressManager from `C:\Users\HOME\AppData\Roaming\WalletWasabi\Client\BitcoinP2pNetwork\AddressManagerTestNet.dat`.
2021-08-24 16:05:20 [21] INFO HostedServices:StartAllAsync (57) Started Software Update Checker.
2021-08-24 16:05:20 [21] INFO HostedServices:StartAllAsync (57) Started System Awake Checker.
2021-08-24 16:05:20 [21] INFO HostedServices:StartAllAsync (57) Started TorMonitor.
2021-08-24 16:05:20 [29] INFO HostedServices:StartAllAsync (57) Started Blockstream.info Fee Provider.
2021-08-24 16:05:20 [27] INFO HostedServices:StartAllAsync (57) Started Bitcoin P2P Network.
2021-08-24 16:05:20 [21] INFO HostedServices:StartAllAsync (57) Started Third Party Fee Provider.
2021-08-24 16:05:20 [6] INFO HostedServices:StartAllAsync (57) Started Hybrid Fee Provider.
2021-08-24 16:05:20 [6] INFO Global:InitializeNoWalletAsync (232) Start synchronizing filters...
2021-08-24 16:05:20 [28] DEBUG BestEffortEndpointConnector:AllowOnlyTorEndpoints (104) Connections: 0, Currently allow only onions: False.
2021-08-24 16:05:50 [36] INFO FilterProcessor:ProcessAsync (65) Downloaded filters for blocks from 828576 to 838575.
2021-08-24 16:05:50 [36] INFO HybridFeeProvider:OnAllFeeEstimateArrived (137) Accurate fee rates are acquired from WasabiSynchronizer ranging from target 2 at 2 sat/b to target 2 at 2 sat/b.
2021-08-24 16:06:14 [23] INFO FilterProcessor:ProcessAsync (65) Downloaded filters for blocks from 838576 to 848575.
2021-08-24 16:06:37 [23] INFO FilterProcessor:ProcessAsync (65) Downloaded filters for blocks from 848576 to 858575.
2021-08-24 16:06:55 [1] DEBUG TerminateService:Terminate (103) Start shutting down the application.
2021-08-24 16:06:55 [4] INFO Program:TerminateApplicationAsync (171) Wasabi GUI stopped gracefully (1e8e0cf4-bc49-422f-b004-b3be4506e1f8).
2021-08-24 16:06:55 [4] WARNING Global:DisposeAsync (409) Process is exiting.
2021-08-24 16:06:55 [4] DEBUG Global:DisposeAsync (420) Waiting for initialization to complete.
2021-08-24 16:06:55 [35] DEBUG TorProcessManager:RestartingLoopAsync (135) User canceled operation.
2021-08-24 16:06:55 [4] INFO Global:DisposeAsync (436) WalletManager is stopped.
2021-08-24 16:06:55 [4] INFO Global:DisposeAsync (456) CoinJoinProcessor is disposed.
2021-08-24 16:06:55 [4] INFO Global:DisposeAsync (462) Disposed LegalChecker.
2021-08-24 16:06:55 [35] INFO HostedServices:StopAllAsync (84) Stopped Software Update Checker.
2021-08-24 16:06:55 [8] INFO HostedServices:StopAllAsync (84) Stopped System Awake Checker.
2021-08-24 16:06:55 [19] INFO HostedServices:StopAllAsync (84) Stopped TorMonitor.
2021-08-24 16:06:55 [4] INFO P2pNetwork:StopAsync (181) AddressManager is saved to `C:\Users\HOME\AppData\Roaming\WalletWasabi\Client\BitcoinP2pNetwork\AddressManagerTestNet.dat`.
2021-08-24 16:06:55 [8] INFO HostedServices:StopAllAsync (84) Stopped Bitcoin P2P Network.
2021-08-24 16:06:55 [36] INFO HostedServices:StopAllAsync (84) Stopped Blockstream.info Fee Provider.
2021-08-24 16:06:55 [19] INFO HostedServices:StopAllAsync (84) Stopped Third Party Fee Provider.
2021-08-24 16:06:55 [4] INFO HostedServices:StopAllAsync (84) Stopped Hybrid Fee Provider.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed Software Update Checker.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed System Awake Checker.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed TorMonitor.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed Bitcoin P2P Network.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed Blockstream.info Fee Provider.
2021-08-24 16:06:55 [4] INFO HostedServices:Dispose (143) Disposed Third Party Fee Provider.
2021-08-24 16:06:55 [4] INFO Global:DisposeAsync (470) Stopped background services.
2021-08-24 16:06:55 [32] ERROR WasabiSynchronizer:Start (269) System.NotSupportedException: Incomplete message. Expected length: 1372. Actual: 1303.
at WalletWasabi.Tor.Http.Helpers.HttpMessageHelper.ReadBytesTillLengthAsync(Stream stream, Int64 length, CancellationToken ctsToken) in WalletWasabi\Tor\Http\Helpers\HttpMessageHelper.cs:line 449
at WalletWasabi.Tor.Http.Helpers.HttpMessageHelper.GetDecodedChunkedContentBytesAsync(Stream stream, HttpRequestContentHeaders requestHeaders, HttpResponseContentHeaders responseHeaders, CancellationToken ctsToken) in WalletWasabi\Tor\Http\Helpers\HttpMessageHelper.cs:line 281
at WalletWasabi.Tor.Http.Helpers.HttpMessageHelper.GetDecodedChunkedContentBytesAsync(Stream stream, HttpResponseContentHeaders headerStruct, CancellationToken ctsToken) in WalletWasabi\Tor\Http\Helpers\HttpMessageHelper.cs:line 230
at WalletWasabi.Tor.Http.Helpers.HttpMessageHelper.GetContentBytesAsync(Stream stream, HttpResponseContentHeaders headerStruct, HttpMethod requestMethod, StatusLine statusLine, CancellationToken ctsToken) in WalletWasabi\Tor\Http\Helpers\HttpMessageHelper.cs:line 193
at WalletWasabi.Tor.Http.Extensions.HttpResponseMessageExtensions.CreateNewAsync(Stream responseStream, HttpMethod requestMethod) in WalletWasabi\Tor\Http\Extensions\HttpResponseMessageExtensions.cs:line 50
at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendCoreAsync(TorTcpConnection connection, HttpRequestMessage request, CancellationToken token) in WalletWasabi\Tor\Socks5\Pool\TorHttpPool.cs:line 276
at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, CancellationToken cancellationToken) in WalletWasabi\Tor\Socks5\Pool\TorHttpPool.cs:line 109
at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpMethod method, String relativeUri, HttpContent content, CancellationToken token) in WalletWasabi\Tor\Http\TorHttpClient.cs:line 62
at WalletWasabi.WebClients.Wasabi.WasabiClient.GetSynchronizeAsync(uint256 bestKnownBlockHash, Int32 count, Nullable`1 estimateMode, CancellationToken cancel) in WalletWasabi\WebClients\Wasabi\WasabiClient.cs:line 47
at System.Threading.Tasks.TaskExtensions.WithAwaitCancellationAsync[T](Task`1 me, CancellationToken cancel, Int32 waitForGracefulTerminationMilliseconds) in WalletWasabi\Extensions\TaskExtensions.cs:line 33
at System.Threading.Tasks.TaskExtensions.WithAwaitCancellationAsync[T](Task`1 me, CancellationToken cancel, Int32 waitForGracefulTerminationMilliseconds) in WalletWasabi\Extensions\TaskExtensions.cs:line 27
at WalletWasabi.Services.WasabiSynchronizer.<>c__DisplayClass66_0.<<Start>b__0>d.MoveNext() in WalletWasabi\Services\WasabiSynchronizer.cs:line 170
2021-08-24 16:06:55 [19] INFO Global:DisposeAsync (476) Synchronizer is stopped.
2021-08-24 16:06:55 [19] INFO Global:DisposeAsync (482) BackendHttpClientFactory is disposed.
2021-08-24 16:06:55 [19] INFO Global:DisposeAsync (500) TorManager is stopped.
2021-08-24 16:06:55 [19] INFO Global:DisposeAsync (506) Cache is disposed.
2021-08-24 16:06:55 [19] INFO Global:DisposeAsync (512) BitcoinStore is disposed.
2021-08-24 16:06:55 [1] INFO TerminateService:Terminate (132) Wasabi stopped gracefully (1e8e0cf4-bc49-422f-b004-b3be4506e1f8).
2021-08-24 16:06:55 [1] INFO Program:Main (111) Wasabi stopped gracefully (1e8e0cf4-bc49-422f-b004-b3be4506e1f8).
here is how that happened:
- I deleted all the files under the
WalletWasabi\Client\BitcoinStore\TestNet\IndexStorefolder to force the redownloading of the filters. - I set the Height to 0 in the wallet file
- I started Wasabi (fluent) and I loaded a wallet
- I closed Wasabi while it was downloading and processing the filters (the wallet was ofcourse not yet loaded)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (8 by maintainers)
@kiminuo Yes.
1- When I do the following:
WalletWasabi\Client\BitcoinStore\TestNet\IndexStorefolder.I get:
Click to expand and to see the logs!
2- I get the same error when I do the following:
WalletWasabi\Client\BitcoinStore\TestNet\IndexStorefolder.Click to expand and to see the logs!
I can’t reproduce it.
Cannot reproduce.
status update: I have found a lot of minor bugs when debugging this. So I think there is good progress on this. Given that I can’t still reproduce the issue locally, Yahia helps me with that.
btw: I have found a lot of allocations when reading/parsing HTTP responses. I think it would be worth it to improve it. @DanGould Do you possibly use
TorHttpPoolclass in your app?For me I can easily reproduce it like this:
WalletWasabi\Client\BitcoinStore\TestNet\IndexStorefolder.Sometimes I get different logs like:
Logs 1
Logs 2
I can’t really reproduce the exception but the log you provided still makes it clear what happens. I’m not entirely sure I’ll be able to write a unit-test for this but anyway it’s actually a notable bug because basically cancelling an HTTP request send operation can lead to
NotSupportedExceptionand that’s not what we promise in the API contract.