Transaction failure when using Stellar Go SDK

Transaction failure when using Stellar Go SDK

Manage alerts

Loading saved threads...

abhinav garg · External communityPost link
External question — Stellar Stack Exchange Author: abhinav garg Original post: https://stellar.stackexchange.com/questions/2477 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. receiving the following errors related to horizon server: handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:180: [ERR] Horizon error: "Transaction Failed". Check horizon.Error.Problem for more information. handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:188: [ERR] mutator:2 failed: couldn't load account for auto sequence: load account failed: Horizon error: "Resource Missing". Check horizon.Error.Problem for more information. Apr 25 12:03:24 handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:195: [ERR] mutator:2 failed: couldn't load account for auto sequence: load account failed: Horizon error: "Resource Missing". Check horizon.Error.Problem for more information. // Send transaction from a server account to a new account. if _, err = stellarClient.CreateWallet(public, DefaultAmount); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } // Add server account at a signer to a new account. if _, err = stellarClient.AddServerToSigners( private, stellarClient.ClientAccountAddress()); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } // Create trust line to asset for a new account. if _, err = stellarClient.CreateTrustLine(private, DefaultAsset); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } Please explain why these three stellar commands do not work.
Quote
Report
ire_and_curses · External communityPost link
External answer — Stellar Stack Exchange Author: ire_and_curses Original post: https://stellar.stackexchange.com/a/2480 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. From what you've provided I can't tell you why those commands don't work, since they are your custom code, not part of the standard SDK. First error: It seems pretty clear that the account is not being created for some reason. You need to follow the advice and check horizon.Error.Problem to find out what you did wrong. Second and third error: Since the account didn't get created, these will fail (you can't load an account that doesn't exist).
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External question — Stellar Stack Exchange Author: abhinav garg Source score (net votes, not local likes): 0 Original post: https://stellar.stackexchange.com/questions/2477 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. receiving the following errors related to horizon server: handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:180: [ERR] Horizon error: "Transaction Failed". Check horizon.Error.Problem for more information. handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:188: [ERR] mutator:2 failed: couldn't load account for auto sequence: load account failed: Horizon error: "Resource Missing". Check horizon.Error.Problem for more information. Apr 25 12:03:24 handshake-1 env.sh[19791]: 2019/04/25 12:03:24 handlers.go:195: [ERR] mutator:2 failed: couldn't load account for auto sequence: load account failed: Horizon error: "Resource Missing". Check horizon.Error.Problem for more information. // Send transaction from a server account to a new account. if _, err = stellarClient.CreateWallet(public, DefaultAmount); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } // Add server account at a signer to a new account. if _, err = stellarClient.AddServerToSigners( private, stellarClient.ClientAccountAddress()); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } // Create trust line to asset for a new account. if _, err = stellarClient.CreateTrustLine(private, DefaultAsset); err != nil { log.Println("[ERR]", err) c.Status(http.StatusInternalServerError) return } Please explain why these three stellar commands do not work.

Cancel quote

Checking account access…