almindor / etherwall

Ethereum QT5 Wallet
GNU General Public License v3.0
142 stars 59 forks source link

bail[hard]: Invalid params: expected a hex-encoded hash with 0x prefix. #110

Closed UGatgithub closed 5 years ago

UGatgithub commented 5 years ago

Have a similar issue for the light client with Etherwall 2.3.1 and the latest geth under Windows 10 where I get: bail[hard]: WS: Disconnected from websocket WS: Disconnected from websocket bail[hard]: WS: Unbekannter Fehler WS: Unbekannter Fehler bail[hard]: WS: Unbekannter Fehler WS: Unbekannter Fehler bail[hard]: Invalid params: expected a hex-encoded hash with 0x prefix. Received: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params: expected a hex-encoded hash with 0x prefix."},"id":18} Sent: {"id":18,"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["05112f62832bf9a0f05c12e2ef08ac2fff5dbb672599f8c8964d263d2e318290"]} Received: {"jsonrpc":"2.0","result":"0x0","id":17} Sent: {"id":17,"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x004adA05E434e87b70fE046012F486C00EB03500","latest"]} Received: {"jsonrpc":"2.0","result":"0x0","id":16} ...

Originally posted by @UGatgithub in https://github.com/almindor/etherwall/issues/107#issuecomment-473660468

almindor commented 5 years ago

Wait so you get this error only on light client setup or both?

UGatgithub commented 5 years ago

It was only in Thin Clint mode but gone now. Inbetween I updated EthereumWallet/Mist and when I tried to recheck now, the error was gone.

almindor commented 5 years ago

Are you using geth from Mist in Etherwall? I suspect when you updated geth they might've fixed something.

UGatgithub commented 5 years ago

I used Geth 1.8.23 which I downloaded separately. Mist runs with 1.8.21 but independent of the geth version I run now, the error is gone.

SnowLeopard71 commented 5 years ago

I just got the same error.

bail[hard]: WS: Disconnected from websocket WS: Disconnected from websocket bail[hard]: WS: Unknown error WS: Unknown error bail[hard]: WS: Unknown error WS: Unknown error bail[hard]: Invalid params: expected a hex-encoded hash with 0x prefix. Restored 1 transactions from etherdata server IPC ready, initializing poller Connected to IPC socket Connecting to IPC socket \.\pipe\geth.ipc Geth starting E:/Gary/Ethereum/Etherwall/geth.exe --syncmode=fast --cache 512 --datadir Z:/geth/Ethereum --nousb --maxpeers=0 --nodiscover --nat=none Connected to WS endpoint Checking to see if there is an already running geth... Etherwall starting Connecting to WS endpoint: wss://linde.etherwall.com Connecting to main Etherwall server

I was using 2.2.4 and sent some ether. Closed it and downloaded 2.3.1 which gave those errors on startup and when switching to Transactions screen. (I don't use Mist or separate copy of geth.) Restart gave same error, and block 7478051 (my send) shows up twice in the Transaction page.

almindor commented 5 years ago

Are you getting this consistently? Could you please switch log-level in the Logs tab to debug and restart, get the logs from that and paste them here (or as a file since it might be longer)?

SnowLeopard71 commented 5 years ago

Yes, error occurs whenever I start etherwall. Didn't notice until today as I only use it every month or so. I inserted a newline after the first six lines as these appear exactly 1 minute after the rest.

bail[hard]: WS: Disconnected from websocket
WS: Disconnected from websocket
bail[hard]: WS: Unknown error
WS: Unknown error
bail[hard]: WS: Unknown error
WS: Unknown error

bail[hard]: Invalid params: expected a hex-encoded hash with 0x prefix.
Received: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params: expected a hex-encoded hash with 0x prefix."},"id":14}
Sent: {"id":14,"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["bc2062aae990a9fddc037d291e840ad449b47eea850a107bf8bd53a06930b1bf"]}
Received: {"jsonrpc":"2.0","result":"0xe","id":13}
Sent: {"id":13,"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x8B94f2e86E3e61609A971dACe9A5262BD93fff50","latest"]}
Received: {"jsonrpc":"2.0","result":"0x13cc03b6cc33dc","id":12}
Sent: {"id":12,"jsonrpc":"2.0","method":"eth_getBalance","params":["0x8B94f2e86E3e61609A971dACe9A5262BD93fff50","latest"]}
Received: {"jsonrpc":"2.0","result":"0x2","id":11}
Sent: {"id":11,"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x17FEFEE98a5D215099E133d0009fA1d0998dF3f6","latest"]}
Received: {"jsonrpc":"2.0","result":"0x86f5a7c3c6d0","id":10}
Sent: {"id":10,"jsonrpc":"2.0","method":"eth_getBalance","params":["0x17FEFEE98a5D215099E133d0009fA1d0998dF3f6","latest"]}
Received: {"jsonrpc":"2.0","result":"0x0","id":9}
Sent: {"id":9,"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xCD0009D90A7B7B67a9D902C365299A1aCAe1E263","latest"]}
Received: {"jsonrpc":"2.0","result":"0x0","id":8}
HTTP Post reply: {"success":true,"result":[{"hash":"5fb6d932854c1ceef66bf78387c4d72a0aedaad6f1693ae415bcc671075c52d2","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x2998c6cbe10ba42","gas":"0xc350","blockNumber":"0x6b1bce","blockHash":"3c1d4d36ceda59122978b6ed91961a1657e0302fec788a31afcd3fb3c3221946","gasPrice":"0x3b9aca00"},{"hash":"e9c70c15362245681bbba4b501da95169ca14f36db78f225418b03d7e03ae89c","from":"8b94f2e86e3e61609a971dace9a5262bd93fff50","to":"e6111e0092084154c68c0251e652ec0ccc804b57","value":"0xd7d3cd9a1ae0000","gas":"0x5208","blockNumber":"0x6b2a1d","blockHash":"7b64e95452f0040d881daeb04afce7e1a92b6e9cc4c9492b529ad83fdb714920","gasPrice":"0x218711a00"},{"hash":"67d8d47f1ec619038ab62c0c1f1166cb2e882221c3c4169cf53ab4d8968321e6","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x2719c1d5cfc450e","gas":"0xc350","blockNumber":"0x6bb476","blockHash":"de851dc5ca143603c6190e1caa0340431de19a019ca3277042c9257a3a852a5a","gasPrice":"0x3b9aca00"},{"hash":"4f97e29ddd1c2278a40884ec8db9c82027ef7aee3e630b0ca3ff47edda0b5f24","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x29087fa915261ab","gas":"0xc350","blockNumber":"0x6c4dfd","blockHash":"9cecbf5033b403473d8e29bf908eff84cc431a9061e0e5e77cda150205ad6a81","gasPrice":"0x3b9aca00"},{"hash":"9ac36a607ccaa9bfb79f5afcbdd0cb64344c2c61ec148e626b802d4ac1b46734","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x2624525aa3de99d","gas":"0xc350","blockNumber":"0x6cd96c","blockHash":"1839bac0e1a58fca72f873276cfac3ecf272034a727a0728e9fedefe84dda1ce","gasPrice":"0x3b9aca00"},{"hash":"8817ae18775583c2d3a427a24ff12a939a2ffa79b9e0de400950ef0f70217bf2","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x2aa895b20fcae62","gas":"0xc350","blockNumber":"0x6d5fb4","blockHash":"dc27c3237a3c861591b1d0b12acb2eec92d812852c6ef2f7b86f5be73cf952af","gasPrice":"0x3b9aca00"},{"hash":"1963d3b5b0fd87f0bfc35312f7acbc24a845b42134f4ce12f606fb45306f72b8","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1c0b4ceb9003249","gas":"0xc350","blockNumber":"0x6de54b","blockHash":"f5ba6591282d1769a8422da390c4b50c5e4fb65672ae673d96a66bc4959a52bc","gasPrice":"0x3b9aca00"},{"hash":"5c6806f3e5868a205a73e1d0ffb1d0650912bdb94867d3257996db01b41e2f80","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x178fdabcbe2ff47","gas":"0xc350","blockNumber":"0x6e57f4","blockHash":"c6a8efad1ea2bf4b27f9e31a3679d6245f802229ef318ac4aa334f50c9e0bce2","gasPrice":"0x3b9aca00"},{"hash":"68931a4ad497c857d19635bd66f2a95637d514c9ecb809b305fb4c1cbb361534","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x16e131e7e5bafba","gas":"0xc350","blockNumber":"0x6ecc40","blockHash":"f858bf72ad5e63d3434057d9b790be4e2ce82651d80c776b5dee6f3caef05d94","gasPrice":"0x3b9aca00"},{"hash":"adaeb7519ad6585cdc09e180d4e71e5253760e14b72af46c8769851e04df8211","from":"52bc44d5378309ee2abf1539bf71de1b7d7be3b5","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1983ef50e8c6c10","gas":"0xc350","blockNumber":"0x6ee3c2","blockHash":"716f12b5089392f65ce1e804ec3ca3f75ea61054899f3ca34a654dc0a3944066","gasPrice":"0x2540be400"},{"hash":"5659a581a3b63495370a4fc54fa8c199b2a39978ec92c42285adb8271aa0fc2d","from":"8b94f2e86e3e61609a971dace9a5262bd93fff50","to":"8aca63af531a53c0a5c6e67a087dced0e4edfc63","value":"0x103caccd13350000","gas":"0x5208","blockNumber":"0x6f02c2","blockHash":"d1d07248b2e6177c3406075a2e41a86827ce9e2191ab091772cefcd95a342e1b","gasPrice":"0x3f5476a00"},{"hash":"80b46e1bb399dd6f7706230674cb4f1579993e66acd6c91be90908e770c87721","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1496cbde0864377","gas":"0xc350","blockNumber":"0x6f53f9","blockHash":"2c5fde4064eca436d5196cdca7884f0448c326310ecb598c4f6c2c113f3bd0f6","gasPrice":"0x3b9aca00"},{"hash":"08926ad14d63cecb8878f0bb1afcdab9524a95ea776f0a02519ea4d678abc2b3","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1392c61300ef05b","gas":"0xc350","blockNumber":"0x700344","blockHash":"cb73da081924cfd2ef68fcac50b26a0a6790d3f96d5468a1d1dbd6173103019a","gasPrice":"0x3b9aca00"},{"hash":"7431f6c868f3cd79e92ddb12789537b282d9f309cdbf63eaeac69ef97d8e286d","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x139236c0bb08732","gas":"0xc350","blockNumber":"0x70b349","blockHash":"bb94109f098719ed240de78cf4017268885f177c91790d7f07e0572f0fb8a8ec","gasPrice":"0x3b9aca00"},{"hash":"f0694a72ba5f9543a3a8b636290c1ae5fd10d5e3f2bfeb193bf8f238e9d5144f","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1442392944e787d","gas":"0xc350","blockNumber":"0x7162ce","blockHash":"f184a31483d6fe494a0eeb1a811b571afa4b1c00c1ee78ec61f146cdaec27763","gasPrice":"0x3b9aca00"},{"hash":"56a7b3c097d15c338f28e0a4deb452ff800b41f300ea55222db02f11b7fbbd8a","from":"52bc44d5378309ee2abf1539bf71de1b7d7be3b5","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x1634b5c90692070","gas":"0xc350","blockNumber":"0x71c1fb","blockHash":"ccc40e7273d947848cc3cb4f83878bfe7f475155b35a3cefa5299310b7ee88bd","gasPrice":"0x2540be400"},{"hash":"bc2062aae990a9fddc037d291e840ad449b47eea850a107bf8bd53a06930b1bf","from":"ea674fdde714fd979de3edf0f56aa9716b898ec8","to":"8b94f2e86e3e61609a971dace9a5262bd93fff50","value":"0x13fd39cb6d4628d","gas":"0xc350","blockNumber":"0x721186","blockHash":"6ac636914dc3067463bcda44c198d76aa1338b40c8f71ae56796d472528086b2","gasPrice":"0x3b9aca00"},{"hash":"c4ffb9ec714626f12bab370f054b6bd630b514754d5805f7b8d530c740cf0219","from":"8b94f2e86e3e61609a971dace9a5262bd93fff50","to":"c8f74a3a9ea1d4fda1525bd47707689fed07f4b4","value":"0x7a1fe1602770000","gas":"0x5208","blockNumber":"0x721b23","blockHash":"5a76f0c09c33a99b31530834bce08c57b626b1a1f76b9837e7174a43d5b15999","gasPrice":"0xb2d05e00"}],"version":"2.3.1"}
Sent: {"id":8,"jsonrpc":"2.0","method":"eth_getBalance","params":["0xCD0009D90A7B7B67a9D902C365299A1aCAe1E263","latest"]}
Received: {"jsonrpc":"2.0","result":"0xd693a400","id":7}
Sent: {"id":7,"jsonrpc":"2.0","method":"eth_gasPrice","params":[]}
Received: {"jsonrpc":"2.0","result":"0x721de7","id":6}
Sent: {"id":6,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}
HTTP Post request: {
    "accounts": [
        "0xCD0009D90A7B7B67a9D902C365299A1aCAe1E263",
        "0x17FEFEE98a5D215099E133d0009fA1d0998dF3f6",
        "0x8B94f2e86E3e61609A971dACe9A5262BD93fff50"
    ]
}

Received: {"jsonrpc":"2.0","id":5,"result":["0xcd0009d90a7b7b67a9d902c365299a1acae1e263","0x17fefee98a5d215099e133d0009fa1d0998df3f6","0x8b94f2e86e3e61609a971dace9a5262bd93fff50"]}
Sent: {"id":5,"jsonrpc":"2.0","method":"personal_listAccounts","params":[]}
IPC ready, initializing poller
Received: {"jsonrpc":"2.0","id":4,"result":"1"}
Sent: {"id":4,"jsonrpc":"2.0","method":"net_version","params":[]}
Received: {"jsonrpc":"2.0","id":3,"result":false}
Sent: {"id":3,"jsonrpc":"2.0","method":"eth_syncing","params":[]}
Received: {"jsonrpc":"2.0","result":"0x3d6","id":2}
Sent: {"id":2,"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[]}
Received: {"jsonrpc":"2.0","result":"0x721de7","id":1}
Sent: {"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}
Received: {"jsonrpc":"2.0","id":0,"result":"Geth/v1.8.21-stable-9dc5d1a9/windows-386/go1.11.4"}
Sent: {"id":0,"jsonrpc":"2.0","method":"web3_clientVersion","params":[]}
Connected to IPC socket
Connecting to IPC socket \\.\pipe\geth.ipc
Geth starting E:/Gary/Ethereum/Etherwall/geth.exe --syncmode=fast --cache 512 --datadir Z:/geth/Ethereum --nousb --maxpeers=0 --nodiscover --nat=none
Connected to WS endpoint
HTTP Post reply: {"success":true,"currencies":{"Response":"Success","Message":"Do not take life too seriously. You will never get out of it alive.","Data":[{"Symbol":"BTC","Price":0.03439,"Open24Hour":0.03467,"LastUpdateTS":1554069820,"Volume24Hours":2444464.75,"Volume24HoursTo":84197.55},{"Symbol":"USD","Price":141.86,"Open24Hour":143.12,"LastUpdateTS":1554069814,"Volume24Hours":130703.891,"Volume24HoursTo":18598574},{"Symbol":"CAD","Price":188.37,"Open24Hour":189,"LastUpdateTS":1554069171,"Volume24Hours":406.0789,"Volume24HoursTo":76512.0547},{"Symbol":"EUR","Price":125.42,"Open24Hour":126.58,"LastUpdateTS":1554069782,"Volume24Hours":44744.8164,"Volume24HoursTo":5615791.5},{"Symbol":"GBP","Price":108.1,"Open24Hour":109.25,"LastUpdateTS":1554069688,"Volume24Hours":2890.45264,"Volume24HoursTo":314189.25}],"Type":100,"date":1554070283892}}
HTTP Post reply: {"success":true,"result":"2.3.1"}
Checking to see if there is an already running geth...
Etherwall starting
Connecting to WS endpoint: wss://linde.etherwall.com
HTTP Post reply: {"success":true,"version":"2.3.1","endpoint":"wss://linde.etherwall.com","nodes":1}
Connecting to main Etherwall server
HTTP Post request: {
}

HTTP Post request: {
}

HTTP Post request: {
    "currencies": [
        "BTC",
        "EUR",
        "CAD",
        "USD",
        "GBP"
    ],
    "version": 2
}
almindor commented 5 years ago

Thanks, the issue is in Sent: {"id":14,"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["bc2062aae990a9fddc037d291e840ad449b47eea850a107bf8bd53a06930b1bf"]}

I thought this was fixed in the 2.3.1. will have to double check. It's supposed to prefix by 0x

almindor commented 5 years ago

Seems I lost this change somewhere in the ew-node module. I'll update and release a new version by EOD tomorrow.

UGatgithub commented 5 years ago

Good somebody else ran in the same issue and you found the root cause now! Also for me it was in Sent: {"id":18,"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["05112f62832bf9a0f05c12e2ef08ac2fff5dbb672599f8c8964d263d2e318290"]} Maybe you had overlooked that in my original post.

almindor commented 5 years ago

2.3.2 released with fix, re-open if you still get the issue.