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

Transfer.sendFunds() with invalid toAddress results in: "Node is not currently synced" #1564

Closed
tingwongsom opened this issue Dec 4, 2021 · 1 comment · Fixed by #1612
Closed
Assignees
Labels
needs-review issue/PR needs review from maintainer

Comments

@tingwongsom
Copy link

Code:

    TransactionReceipt transferReceipt = Transfer.sendFunds(
            web3j, credentials,
            "0x693a3D9278381B8EB2c6BEbd89880291E3a7E6b8\n",
            BigDecimal.ONE, Convert.Unit.WEI)  // 1 wei = 10^-18 Ether
            .send();

You see I paste address with newline backslash n by mistake. No good!

Stack trace:

Exception in thread "main" org.web3j.ens.EnsResolutionException: Unable to determine sync status of node
	at org.web3j.ens.EnsResolver.obtainPublicResolver(EnsResolver.java:78)
	at org.web3j.ens.EnsResolver.resolve(EnsResolver.java:88)
	at org.web3j.tx.Transfer.send(Transfer.java:79)
	at org.web3j.tx.Transfer.send(Transfer.java:56)
	at org.web3j.tx.Transfer.lambda$sendFunds$0(Transfer.java:94)
	at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42)
	at org.web3j.sample.Application.run(Application.java:81)
	at org.web3j.sample.Application.main(Application.java:50)
Caused by: org.web3j.ens.EnsResolutionException: Node is not currently synced
	at org.web3j.ens.EnsResolver.obtainPublicResolver(EnsResolver.java:73)
	... 7 more

This error verry confuse. Node (Ganache) is sync!

Using latest version:

    <dependency>
        <groupId>org.web3j</groupId>
        <artifactId>core</artifactId>
        <version>4.8.9</version>
    </dependency>
@tingwongsom tingwongsom added the needs-review issue/PR needs review from maintainer label Dec 4, 2021
@andrii-kl
Copy link
Contributor

@tingwongsom The problem is that if you have not valid address, system try to work with it like with a ENS name.
I have changed an exception message on "ENS resolver exception, unable to execute request:", so I think behavior should became more clear.

@andrii-kl andrii-kl linked a pull request Jan 27, 2022 that will close this issue
@andrii-kl andrii-kl self-assigned this Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review issue/PR needs review from maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants