With the latest SDK update with Javascript I'm running into this error. From my understanding there's something going on with what piece of the connection is being passed as I've confirmed that the connection.rpcUrl is being passed correctly with https, so not sure where to dig in further.
Happy to discuss / dig in. This wasn't an error in 2.0.0.
2023-07-18 14:15:19.686 ERROR /src/connectors/phoenixConnector.ts:83
TypeError Only HTTP(S) protocols are supported
error stack:
• index.js getNodeRequestOptions
/node_modules/node-fetch/lib/index.js:1331
• index.js
/node_modules/node-fetch/lib/index.js:1454
•
• index.js fetch
/node_modules/node-fetch/lib/index.js:1451
• zstddec.ts Q.E.init
/node_modules/zstddec/zstddec.ts:41
• index.js
/node_modules/@ellipsis-labs/phoenix-sdk/dist/index.js:1
•
• index.js s
/node_modules/@ellipsis-labs/phoenix-sdk/dist/index.js:1
• task_queues processTicksAndRejections
internal/process/task_queues:95
/Users/~/Development/mev/src/connectors/phoenixConnector.ts:84
throw new Error(`Error connecting to Phoenix Client SDK ${error}`)
^
Error: Error connecting to Phoenix Client SDK TypeError: Only HTTP(S) protocols are supported
at PhoenixConnector.connect (/Users/~/Development/mev/src/connectors/phoenixConnector.ts:84:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async simpleMarketMaker (/Users/~/Development/mev/src/index.ts:67:3)
error Command failed with exit code 1.
Here's the function in my code where the error is originating:
connect = async () => {
try {
// @ts-ignore
this.client = await Client.create(this.web3Connection)
} catch (error) {
log.error(error)
throw new Error(`Error connecting to Phoenix Client SDK ${error}`)
}
}
With the latest SDK update with Javascript I'm running into this error. From my understanding there's something going on with what piece of the connection is being passed as I've confirmed that the
connection.rpcUrlis being passed correctly with https, so not sure where to dig in further.Happy to discuss / dig in. This wasn't an error in 2.0.0.
2023-07-18 14:15:19.686 ERROR /src/connectors/phoenixConnector.ts:83 TypeError Only HTTP(S) protocols are supported error stack: • index.js getNodeRequestOptions /node_modules/node-fetch/lib/index.js:1331 • index.js /node_modules/node-fetch/lib/index.js:1454 • • index.js fetch /node_modules/node-fetch/lib/index.js:1451 • zstddec.ts Q.E.init /node_modules/zstddec/zstddec.ts:41 • index.js /node_modules/@ellipsis-labs/phoenix-sdk/dist/index.js:1 • • index.js s /node_modules/@ellipsis-labs/phoenix-sdk/dist/index.js:1 • task_queues processTicksAndRejections internal/process/task_queues:95 /Users/~/Development/mev/src/connectors/phoenixConnector.ts:84 throw new Error(`Error connecting to Phoenix Client SDK ${error}`) ^ Error: Error connecting to Phoenix Client SDK TypeError: Only HTTP(S) protocols are supported at PhoenixConnector.connect (/Users/~/Development/mev/src/connectors/phoenixConnector.ts:84:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async simpleMarketMaker (/Users/~/Development/mev/src/index.ts:67:3) error Command failed with exit code 1.Here's the function in my code where the error is originating: