Comments (7)
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.
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.
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.
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.
No problem - happy it's solved!
from stellar-ios-mac-sdk.
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.
@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)
- SEP-10 Client Attribution Support (from the SDF) HOT 2
- CAP-38 AMM Changes HOT 1
- Issues with LedgerKeyXDR parsing. HOT 3
- SEP-10: muxed account and memo support (SDF) HOT 2
- SEP-10: apply grace period to minTime constraint (SDF) HOT 2
- CAP-38 AMM Changes HOT 2
- Issue with OperationResultXDR parsing. HOT 1
- The issue with TransactionResultXDR parsing in Protocol 18. HOT 2
- Muxed accounts should now be enabled by default. HOT 1
- Issue with OperationResultXDR parsing HOT 6
- Claimable Balance ID changes after signing XDR with Claim Claimable Balance operation. HOT 3
- Protocol 19 SDK Support HOT 4
- SEP-12 Support HOT 2
- Soroban Preview 10 Support HOT 2
- SEP 10, Error Retrieving JWT HOT 4
- Soroban simulateTransaction method HOT 3
- Support for Protocol 20: Soroban HOT 1
- Updating the SDKs to the stable Protocol 20 release HOT 2
- Updating the SDKs to the stable Protocol 20 release HOT 3
- Protocol 20: Add support for resource leeway in `simulateTransaction` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stellar-ios-mac-sdk.