truebit-eth icon indicating copy to clipboard operation
truebit-eth copied to clipboard

More clear error messages for solver/verifier

Open smfang opened this issue 4 years ago • 0 comments

Issue: Error messages from clients are not clear for Geth not fully synced.

After I saw geth was synching fine I started truebit-os, and this error confused me a bit. I think any of these two behaviours would be more clear:

Suggested:

  • print "Geth is not fully synced, please restart the client when it finishes" (and exit)

  • print "Waiting for Geth to finish catching up..." (and wait before showing prompt)

  • Running truebit-os before geth finishes initializing truebit-os:> (node:67142) UnhandledPromiseRejectionWarning: Error: getDeleteStateObject (388a

3bd8f54f305266898e77b126609ec6265f1e) error: no suitable peers available

at Object.InvalidResponse (/snapshot/truebit/node_modules/truffle-contract/node_modules/w

eb3/lib/web3/errors.js)

at Object.<anonymous> (/snapshot/truebit/node_modules/truffle-contract/node_modules/web3/

lib/web3/requestmanager.js)

at callback (/snapshot/truebit/node_modules/web3-providers-ipc/lib/index.js)             

at Array.forEach (<anonymous>)                                                           

at Socket.<anonymous> (/snapshot/truebit/node_modules/web3-providers-ipc/lib/index.js)   

at Socket.emit (events.js:315:20)                                                        

at addChunk (_stream_readable.js:302:12)                                                 

at readableAddChunk (_stream_readable.js:278:9)                                          

at Socket.Readable.push (_stream_readable.js:217:10)                                     

at Pipe.onStreamRead (internal/stream_base_commons.js:186:23)                            

(Use truebit-os --trace-warnings ... to show where the warning was created)

(node:67142) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error origin

ated either by throwing inside of an async function without a catch block, or by rejecting a

promise which was not handled with .catch(). To terminate the node process on unhandled promi

se rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cl

i.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:67142) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In th

e future, promise rejections that are not handled will terminate the Node.js process with a n

on-zero exit code.

  • Stopping the verifier (stop verify) truebit-os:> ps

SOLVERS

VERIFIERS

  1. Account 0: 0xXXXXXXXXXXXXX

truebit-os:> stop verify 1

TypeError: Cannot read property 'exit' of undefined

at Object.stopProcesses (/snapshot/truebit/cli/cliLib.js)

at CommandInstance.<anonymous> (/snapshot/truebit/cli/index.js)

at Session.execCommandSet (/snapshot/truebit/node_modules/vorpal/dist/session.js:470:20)

at Vorpal._exec (/snapshot/truebit/node_modules/vorpal/dist/vorpal.js:960:18)

at Vorpal._execQueueItem (/snapshot/truebit/node_modules/vorpal/dist/vorpal.js:751:17)

at Vorpal._queueHandler (/snapshot/truebit/node_modules/vorpal/dist/vorpal.js:735:10)

at Vorpal.exec (/snapshot/truebit/node_modules/vorpal/dist/vorpal.js:682:10)

at /snapshot/truebit/node_modules/vorpal/dist/vorpal.js:625:10

at Object.completed (/snapshot/truebit/node_modules/vorpal/dist/ui.js:220:13)

at Object.onCompletion (/snapshot/truebit/node_modules/inquirer/lib/ui/prompt.js:57:10)

at AnonymousObserver.completed (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:1550:12)

at AnonymousObserver.onCompleted (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:1489:14)

at Subject.onCompleted (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:5871:19)

at Subject.tryCatcher (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:63:31)

at AutoDetachObserver.completed (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:5796:56)

at AutoDetachObserver.onCompleted (/snapshot/truebit/node_modules/rx-lite/rx.lite.js:1489:14)

smfang avatar May 10 '21 19:05 smfang