Comments (4)
The above should also take care of the failures that show unfriendly errors such as
$ ./dcrcli balance
Error executing command 'balance'
error fetching accounts: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transpor
t: Error while dialing dial tcp: missing address"
from godcr-old.
I've had that error even with dcrcli properly configured but without dcrwallet actually running... There might be another way to prevent that error. Will look into that
from godcr-old.
The above should also take care of the failures that show unfriendly errors such as
$ ./dcrcli balance
Error executing command 'balance'
error fetching accounts: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transpor
t: Error while dialing dial tcp: missing address"
I want to create a separate issue for this as it does not relate to the absence or presence of dcrcli configuration. The error is due to invalid rpc configuration values. Want to keep this issue and the associated PR #64 focused on just taking care of scenarios where dcrcli is not configured.
EDIT: The error missing address
represents cases where dcrwallet rpc server address is not set in config and not passed in command-line. This can happen even if dcrcli.conf
exists and is configured (partly)
A similar error occurs when the dcrwallet rpc server address is set but dcrcli cannot connect to that address either because it is completely incorrect/invalid or because dcrwallet was not running at the time the connection attempt was made.
For simplicity and focus, this issue and the associating PR should focus on detecting the absence of dcrcli.conf
file and providing the user with a means to create the config file or advising the user to pass required drcwallet configuration values via the command-line. This would hopefully also take care of the scenario where dcrwallet rpc server address is not set, but not necessarily.
If a user manually creates a config file, a value for dcrwallet rpc server address may not be set in the config file and may not be passed in command-line options. dcrcli.conf
exists but dcrwallet rpc server address does not. Or the server address could exist but does not point to an actively running dcrwallet daemon. These scenarios will be taken care of in #77
from godcr-old.
This planetdecred/godcr#64 (comment) explains why this issue isn't actually an issue - or shouldn't have been an issue.
In summary,
When running ./dcrcli with no commands, currently the simple dcrcli usage cmds are shown. But these commands are not yet available if the user does not have dcrcli.conf set with the correct rpc login information
True
So this should be detected, and a msg displayed to let the user know that they need to specify this information. The simple usage commands would not be displayed, and instead instructions would be displayed to set edit the config file or to specify the appropriate rpc command line options (-h).
Not really. The rpc connection information we need are rpcAddress
and rpcCert
. For the latter case, if a value isn't present i config or command-line options, an error message isn't displayed. Instead a default value is used. This same pattern has been introduced in #80 - thus, we no longer need to show the user any message about missing rpc information.
Additionally, we could autoconfigure by looking for the default dcrwallet config and auto parsing the needed settings, asking the user if they would like to use these values.
This however is something that we could and prolly should do. Will make this into a separate low-priority issue.
from godcr-old.
Related Issues (20)
- change spending password settings
- Implement toggle notification
- remove wallet
- gio: add create and restore wallet pages
- bug: data race from multiple go routines. HOT 1
- Dynamic contents ignore refresh call on fyne interface HOT 2
- Implement staking page with dummy data
- clean up code and directory structure
- stop emptying pages when navigating between them
- Implement exit page to godcr-fyne
- Implement live data for summary in staking page
- Implement ticket purchase on staking page
- Implement wallet page to godcr-fyne
- installation for the newbie HOT 2
- Update godcr to use the master branch of dcrlibwallet
- Use pkger instead of packr2
- Interfaces in godcr don't build due to go mod
- Invalid nucular indirect import version on godcr-nuklear
- All commands should have a version command line flag
- Mention the new godcr in the README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godcr-old.