When executing any call to via the Connection
object I keep getting the error TypeError: fetch failed
even though the RPC is up. How do I fix this?
import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";const connection = new Connectio(clusterApiUrl("devnet"));const addr = new PublickKey('<SOME PUBKEY>');const balance = await connection.getBalance(address);
I would like to know how I can fix this one, is it because of my internet problem? Why can't I just connect to the rpc network, I can pick up airdrops.