-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put BlockClock into an error state if node init fails #383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested: error is displayed when reindex
is need, instead of infinite loading on master.
nit: would it be easy to remove HandCursor when there is the error?
as there is nothing to click on
Yeah I noticed that as well. Should probably do that until the pop up view with the details is sorted out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Is it possible to add some small text/ description within the BlockClock? Like what kind of error... "init"? With a tooltip perhaps to show an extended description. As in the brainstorming issue #348 where you can see "No Wifi" within the "Paused" BlockClock state.
57a82cd
to
03a8725
Compare
We have some mock-ups for different error types in the design docs (half-way down the page). Ideally, we can always know what the problem was and show a respective icon & message. Maybe not exactly, but the general error source is already helpful. For errors that cannot be recognized, the mock-ups show "Error" and "Tap for details". If we want to go this route, we need to figure out what is shown when tapping. A full screen with a proper explanation, error log, tips to resolve, etc, like here? |
This is ultimately the goal. In this PR, I've just implemented the portion that I'm certain about and would likely want to follow up afterwards with the description/details portion.
What to show when tapping is what I'm uncertain about at the moment and was feeling like it might be a chance for me to pretend to be a designer a bit and play with figma. The mobile design looked good and just need to get a basic design for the Desktop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 03a8725
I've 2 issues running bitcoin-qt
with this change:
1. As soon the app starts up I got these 2 errors regarding qml components
QVariant::load: unknown user type with name BitcoinUnits::Unit.
Running initialization in thread
qrc:/qml/components/BlockClock.qml:33:5: Unable to assign [undefined] to QString
2. After the above, since I got an instance on a pruned node with some corrupted index (due to some break during loadtxoutset
) and bitcoin.conf
still referencing blockfilterindex=1
and coinstatsindex=1
. So, when I remove those indexing settings I got what @MarnixCroes described above -> "infinite loading on master". Should I not get the error icon also in this case? How I can validate this change? @johnny9 could you please add repro instructions on the description?
Error: basic block filter index best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
Error: Failed to start indexes, shutting down.
Complete terminal error logs
~/workspace/bitcoin-core-gui-qml$ ./src/qt/bitcoin-qt
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QVariant::load: unknown user type with name BitcoinUnits::Unit.
Running initialization in thread
qrc:/qml/components/BlockClock.qml:33:5: Unable to assign [undefined] to QString
Error: basic block filter index best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
Error: Failed to start indexes, shutting down.
Co-authored-by: thebagmaster <thebagmaster>
03a8725
to
2b61d22
Compare
I removed the invalid property in the latest update which resolved that error
This won't catch all errors and there will need to be an effort to categorize all of these possible error states as well as render a description of what happened to the user. This change triggers when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 2b61d22
I've managed to reproduce the errored BlockClock picture when there's another instance of Bitcoin Core running:
Also the error reported in previous review regarding the error on BlockClock.qml
component doesn't show anymore:
./src/qt/bitcoin-qt -signet
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Running initialization in thread
Error: Unable to bind to 0.0.0.0:38333 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this
Related, but probably not essential to this PR, here's an idea for handling errors. So on the left, we have this old mock-up for a tooltip that appears when hovering the peers dots, to give you slightly more info about connectivity. Clicking would take you to the peers page. Now, we can take a similar approach to errors. Based on the type of error, a click can either show the tooltip or take you to the page relevant to this error (the page then needs to show appropriate information). What do you make of this pattern? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on Ubuntu 22.04 and Android (Galaxy A13)
Was able to reproduce error on Ubuntu 22.04 by deleting the index
directory located at .bitcoin/signet/block
For android used Android Studio IDE and deleted the index
folder using the device explorer
Suggestion (echoing @GBKS): it would be nice if there was an error message in the GUI similar to what is displayed in terminal, i.e.:
: Error initializing block database. Please restart with -reindex or -reindex-chainstate to recover.
Is there a way to automatically restart with these options so the user can just click a button? |
it's possible, best would be to do it as a follow up imo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 2b61d22
Initial step for adding error states to the NodeRunner
Link to github actions build artifacts.