Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The endpoint can only be paired with an https.Agent. You have, instead, supplied an http.Agent through httpAgent #4

Open
rajgoesout opened this issue Jun 29, 2023 · 11 comments

Comments

@rajgoesout
Copy link

When I run yarn start, I'm facing this error:

/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:6192
          throw new Error('The endpoint `' + url + '` can only be paired with an `https.Agent`. You have, instead, supplied an ' + '`http.Agent` through `httpAgent`.');
                ^

Error: The endpoint `https://frankfurt.mainnet.rpc.jito.wtf` can only be paired with an `https.Agent`. You have, instead, supplied an `http.Agent` through `httpAgent`.
    at createRpcClient (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:6192:17)
    at new Connection (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:7132:23)
    at new JitoRpcConnection (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/dist/sdk/rpc/connection.js:258:9)
    at file:///Users/rajdeep/dev/jito-mev-bot/build/src/clients/rpc.js:122:18
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)
@mazgalesc
Copy link

read the error again pls.. you will figure it out

@Wiger123
Copy link

I meet the same problem, it seems like mev-bot misunderstood the url of https to http

@ocoderr
Copy link

ocoderr commented Jan 18, 2024

I meet the same problem

@staccDOTsol
Copy link

I meet the same broblem

@akSolkhatri
Copy link

Anyone got the solution?

@zzxn
Copy link

zzxn commented Mar 9, 2024

Anyone got the solution?

Just delete the code that checks agent type...

@smilesmile191
Copy link

read the error again pls.. you will figure it out

Please tell me how to solve it

@yahdielo
Copy link

read the error again pls.. you will figure it out

Please tell me how to solve it

change the endpoint https: to http:
that should do it.

@fabiankaeser82
Copy link

Please can someone help me tu run this ?

@Whitence
Copy link

easy,just comment out the agent

like this:

if (RPC_REQUESTS_PER_SECOND > 0) {
connection = new Connection(RPC_URL, {
commitment: 'processed',
fetch: coalesceFetch(),
disableRetryOnRateLimit: true,
// httpAgent: keepaliveAgent,
});
} else {
connection = new Connection(RPC_URL, {
// httpAgent: keepaliveAgent,
disableRetryOnRateLimit: true,
commitment: 'processed',
});
}

@yangzongru-jpg
Copy link

why you can comment out httpAgent, is that any problem? because you comment out something......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests