Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

getBalance() method got error: fetch failed #2327

Closed
blockchainlee opened this issue Mar 16, 2024 · 3 comments
Closed

getBalance() method got error: fetch failed #2327

blockchainlee opened this issue Mar 16, 2024 · 3 comments
Labels
question Add this to close an issue with instructions on how to repost as a question on Stack Exchange

Comments

@blockchainlee
Copy link

blockchainlee commented Mar 16, 2024

I tried to use getBalance() method, but I got an error:
Error: failed to get balance of account GAcD...Di9xp: TypeError: fetch failed
I found that I call any method under Connection, I got the same error.
image
image

I guess maybe I should use agent, so I change my code to
const connection = new Connection(clusterApiUrl('devnet'), {httpAgent: agent})
But I got another error:
image
image

What should I do? Please help me, thanks.

@steveluscher steveluscher added the question Add this to close an issue with instructions on how to repost as a question on Stack Exchange label Mar 18, 2024
Copy link
Contributor

Hi @blockchainlee,

Thanks for your question!

We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of the Solana JavaScript SDK itself.

Questions like yours deserve a purpose-built Q&A forum. Unless there exists evidence that this is a bug with the Solana JavaScript SDK itself, please post your question to the Solana Stack Exchange using this link: https://solana.stackexchange.com/questions/ask


This automated message is a result of having added the ‘question’ tag.

@yarcowang
Copy link

Yes, I do have similar problem.
anza-xyz/agave#311
And for now, axio seems the only solution.

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Add this to close an issue with instructions on how to repost as a question on Stack Exchange
Projects
None yet
Development

No branches or pull requests

3 participants