GithubHelp home page GithubHelp logo

Comments (7)

ndizazzo avatar ndizazzo commented on August 17, 2024

Hey @wixvii - can you provide the code you're using (along with the account ID you're requesting), or a sample code snippet that generates the same failure?

from stellar-ios-mac-sdk.

yildirimatcioglu avatar yildirimatcioglu commented on August 17, 2024

here is my code:
sdk.accounts.getAccountDetails(accountId: accountId) { (accountResponse) -> (Void) in switch accountResponse { case .success(let account): print(account) case .failure(let error): print(error.localizedDescription) } }

and sample account is yours account for donate :)
"GANSYJ64BTHYFM6BAJEWXYLVSZVSHYZFPW4DIQDWJL5BOT6O6GUE7JM5"

from stellar-ios-mac-sdk.

ndizazzo avatar ndizazzo commented on August 17, 2024

Which URL did you configure the SDK object with? The follow snippet (which is close to yours) yields the correct response for me...

let sdk = StellarSDK.init(withHorizonUrl: "https://horizon.stellar.org")
let account = "GANSYJ64BTHYFM6BAJEWXYLVSZVSHYZFPW4DIQDWJL5BOT6O6GUE7JM5"

sdk.accounts.getAccountDetails(accountId: account) { response -> Void in
    switch response {
    case .success(let details):
        print(details.balances)
        print(details.accountId)
    case .failure(let error):
        print(error)
    }
}

Can you also provide the output of the following terminal command: cat Podfile.lock | grep stellar?

from stellar-ios-mac-sdk.

yildirimatcioglu avatar yildirimatcioglu commented on August 17, 2024

yeah its work!
Sorry its my fault, I did not think about test-live horizon sdk :(
but maybe you can add it to readME file. default sdk is test you can add it to readME. Maybe someone like me can miss it. Thank you.

from stellar-ios-mac-sdk.

ndizazzo avatar ndizazzo commented on August 17, 2024

No problem - happy it's solved!

from stellar-ios-mac-sdk.

iospaveldev avatar iospaveldev commented on August 17, 2024

Hi, Nick, I need Your help !

I'm created account in test net and checking it - he exists.
When I using getAccountDetails with "https://horizon-testnet.stellar.org" - I have error "The data couldn’t be read because it is missing."
When "https://horizon.stellar.org" as in the example above -

notFound(message: "{\n "type": "https://stellar.org/horizon-errors/not_found\",\n "title": "Resource Missing",\n "status": 404,\n "detail": "The resource at the url requested was not found. This is usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided."\n}", horizonErrorResponse: Optional(<stellarsdk.NotFoundErrorResponse: 0x281e3fe30>))

my account "GB33EPYLVRLD6GTCRLSBCXET35TZKJJCQDRQZHLR5UNNNWWTHMD4IL4B".

And I using

let sdk = StellarSDK.init(withHorizonUrl: "https://horizon.stellar.org")
let account = "GB33EPYLVRLD6GTCRLSBCXET35TZKJJCQDRQZHLR5UNNNWWTHMD4IL4B"

sdk.accounts.getAccountDetails(accountId: account) { response -> Void in
switch response {
case .success(let details):
print(details.balances)
print(details.accountId)
case .failure(let error):
print(error)
}
}

But it's not works for me.
Thank You !

from stellar-ios-mac-sdk.

ndizazzo avatar ndizazzo commented on August 17, 2024

@PavelSakhanko - your issue is that GB33EPYLVRLD6GTCRLSBCXET35TZKJJCQDRQZHLR5UNNNWWTHMD4IL4B exists on Testnet but not on production. Your SDK initialization seems to be configured for production based on the debug output you've provided.

Change "https://horizon.stellar.org" to "https://horizon-testnet.stellar.org" in your SDK initialization and you'll be all set.

Testnet is a completely different Stellar environment and will not have the same accounts, ledgers, and transactions as production.

from stellar-ios-mac-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.