Skip to content
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

Upgrade from v. 0.7.13 results is monero.common.MoneroError: Wallet is not connected to daemon #71

Open
udhishthirahakuntiputro opened this issue Oct 17, 2024 · 1 comment

Comments

@udhishthirahakuntiputro

Call to: MoneroWalletFull.openWallet(config);
results in:
monero.common.MoneroError: Wallet is not connected to daemon
at monero.wallet.MoneroWalletFull.startSyncing(MoneroWalletFull.java:636) ~[monero-java-0.8.33.jar:na]

with following config:
wallet.xmr.open.serverUsername=superuser
wallet.xmr.open.serverPassword=abctesting123
wallet.xmr.open.serverUri=http://localhost:18081

Upon further investigation, the error is caused by changes in monero.wallet.model.MoneroWalletConfig as follows:
serverUsername and serverPassword and server.serverCredentials are all reset to null:

it looks from the code the intent was: one of the calls - setServerUsername() or setServerPassword() will set credentials on the server. However, a call to setServerUri() comes in between these two calls and resets both serverPassword and serverUsername to null by calling setServer() and passing the server that was only constructed with serverUri but not serverUsername and serverPassword. Thus configuration does not work anymore. Additianally, there is no way to set serverUsername and serverPassword from configuration anymore.

@woodser
Copy link
Owner

woodser commented Oct 18, 2024

However, a call to setServerUri() comes in between these two calls

Just confirming that you can set the credentials after setting the server URI in order to fix the connection issue.

Looking at the code, setting the username, then URI to non-null value, then setting the password, should also work, because the URI will initialize the server connection without credentials, and then setting the password will update the server connection credentials with both username and password. Please let me know if you see otherwise.

AFAICT, the only way the credentials are nullified, is if a null URI is passed, or if the URI is set after the credentials are set. To improve this, setServerUri could be modified to set the username and password if they're both provided, and not nullify the username and password if null URI is passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants