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

Error when calling NewAccountCreateTransaction #581

Closed
asimlqt opened this issue Sep 28, 2022 · 5 comments
Closed

Error when calling NewAccountCreateTransaction #581

asimlqt opened this issue Sep 28, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@asimlqt
Copy link

asimlqt commented Sep 28, 2022

Description

I'm following the getting started tutorial and getting an error on Step 3 of Create an account:

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/hashgraph/hedera-sdk-go/v2.(*Transaction).GetTransactionHashPerNode(0xc0001fac60)
	/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/v2@v2.17.4/transaction.go:422 +0x2d5
github.com/hashgraph/hedera-sdk-go/v2.(*Transaction).GetTransactionHash(0xc0001fac60)
	/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/v2@v2.17.4/transaction.go:393 +0x33
github.com/hashgraph/hedera-sdk-go/v2.(*AccountCreateTransaction).Execute(0xc0001fac60, 0xc0001f2a00)
	/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/v2@v2.17.4/account_create_transaction.go:490 +0x525
main.main()
	/home/asim/labs/hedera/hedera-go-examples/hedera_examples.go:50 +0x805
exit status 2

I copied and pasted the code from the tutorial and haven't made any changes to it.

After debugging a little further I can see the following error status: StatusInvalidNodeAccount

Steps to reproduce

  1. Follow the getting started tutorial until the end of https://docs.hedera.com/guides/getting-started/create-an-account
  2. Execute go run hedera_examples.go

Additional context

No response

Hedera network

testnet

Version

v2

Operating system

Linux

@asimlqt asimlqt added the bug Something isn't working label Sep 28, 2022
@andrix10
Copy link
Contributor

Yes, I will have pr for this soon, for now u can solve it by manually setting node account ids.

@andrix10 andrix10 reopened this Sep 28, 2022
@asimlqt
Copy link
Author

asimlqt commented Sep 28, 2022

Thanks, got it working now by manually setting the node account id.

@zolmine
Copy link

zolmine commented Oct 3, 2022

@asimlqt can uu please share the line code, or documentation.. thank you!

@SimiHunjan SimiHunjan added this to the 2.17.6 milestone Oct 3, 2022
@Kalina-Todorova
Copy link

Hi @zolmine this should be resolved with #582
Can you try with the latest version of the SDK and following the docs: https://docs.hedera.com/guides/getting-started/create-an-account
Please let us know if this works for you

@Kalina-Todorova
Copy link

Hi @zolmine, closing this for now as resolved. Feel free to reopen if you face this issue again or file another ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants