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

Program is failing on WSL #1480

Open
daniel1302 opened this issue Apr 22, 2024 · 1 comment
Open

Program is failing on WSL #1480

daniel1302 opened this issue Apr 22, 2024 · 1 comment

Comments

@daniel1302
Copy link

I am using amd64. I am working on Windows 11 Pro with WSL2(Ubuntu)

I am getting the following error:

Received new price feed update from Pyth price service: SOL/USD ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d
Received new price feed update from Pyth price service: USDT/USD 2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b
Received new price feed update from Pyth price service: LDO/USD c63e2a7f37a04e5e614c07238bedb25dcc38927fba8fe890597a593c0b2fa4ad
Received new price feed update from Pyth price service: ENA/USD b7910ba7322db020416fcac28b48c01212fd9cc8fbcbaf7d30477ed8605f6bd4
Received new price feed update from Pyth price service: ETH/USD ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace
Received new price feed update from Pyth price service: PEPE/USD d69731a2e74ac1ce884fc3890f7ee324b6deb66147055249568869ed700882e4
An unidentified error has occured:
undefined
/home/node/price_pusher/lib/evm/evm.js:190
            throw err;
            ^

Error: ALREADY_EXISTS: already known
    at /home/node/node_modules/web3-provider-engine/subproviders/provider.js:19:36
    at /home/node/node_modules/web3-providers-http/lib/index.js:127:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.13.0
npm ERR! Lifecycle script `start` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @pythnetwork/[email protected] 
npm ERR!   at location: /home/node/price_pusher 

I am sending prices to the gnosis.

This is the command I am using:

/usr/bin/docker run \
    --name pyth-price-pusher-primary \
    -v $(pwd)/config:/config \
    public.ecr.aws/pyth-network/xc-price-pusher:v6.6.0 \
    -- \
    evm \
    --endpoint "https://rpc.ankr.com/gnosis/XXXXXXXXXXX" \
    --mnemonic-file "/config/mnemonic" \
    --pyth-contract-address "0x2880aB155794e7179c9eE2e38200202908C17B43" \
    --price-service-endpoint "https://hermes.pyth.network" \
    --price-config-file "/config/price-config.yaml" \
    --polling-frequency 5
@rout-horizon
Copy link

rout-horizon commented May 23, 2024

I'm failing the same issue in WSL. Produces an axios error, seems like there's a connectivity/network problem but making other http requests works fine.

My code
`const { EvmPriceServiceConnection } = require("@pythnetwork/pyth-evm-js"); // version - ^1.44.0
const pythConnection = new EvmPriceServiceConnection("https://hermes.pyth.network");
const offchainPriceFeedId = "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace";

const test = async () => {
try {
let priceUpdateData = await pythConnection.getPriceFeedsUpdateData([offchainPriceFeedId]);
console.log('priceUpdateData', priceUpdateData);
} catch (error) {
console.log('error', error);
}
}

test()`

Error produced
error AxiosError: timeout of 5000ms exceeded at RedirectableRequest.handleRequestTimeout (/home/godfather/HorizonWSL/new-perps-keepers/node_modules/axios/dist/node/axios.cjs:3123:16) at RedirectableRequest.emit (node:events:514:28) at Timeout.<anonymous> (/home/godfather/HorizonWSL/new-perps-keepers/node_modules/follow-redirects/index.js:210:12) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) at Axios.request (/home/godfather/HorizonWSL/new-perps-keepers/node_modules/axios/dist/node/axios.cjs:3876:41) at runNextTicks (node:internal/process/task_queues:60:5) at listOnTimeout (node:internal/timers:540:9) at process.processTimers (node:internal/timers:514:7) at async EvmPriceServiceConnection.getLatestVaas (/home/godfather/HorizonWSL/new-perps-keepers/node_modules/@pythnetwork/price-service-client/lib/PriceServiceConnection.js:99:26) at async EvmPriceServiceConnection.getPriceFeedsUpdateData (/home/godfather/HorizonWSL/new-perps-keepers/node_modules/@pythnetwork/pyth-evm-js/lib/EvmPriceServiceConnection.js:15:28) at async test (/home/godfather/HorizonWSL/new-perps-keepers/test/testPyth.js:8:31) { code: 'ECONNABORTED', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 5000, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, */*', 'Content-Type': undefined, 'User-Agent': 'axios/1.6.8', 'Accept-Encoding': 'gzip, compress, deflate, br' }, baseURL: 'https://hermes.pyth.network', params: { ids: [Array] }, method: 'get', url: '/api/latest_vaas', 'axios-retry': { retries: 3, retryCondition: [Function: isNetworkOrIdempotentRequestError], retryDelay: [Function: exponentialDelay], shouldResetTimeout: false, onRetry: [Function: onRetry], retryCount: 0, lastRequestTime: 1716456909980 }, data: undefined }, request: <ref *1> Writable { _writableState: WritableState { highWaterMark: 16384, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0, [Symbol(kState)]: 34357356, [Symbol(kBufferedValue)]: null }, _events: [Object: null prototype] { response: [Function: handleResponse], error: [Function: handleRequestError], socket: [Array] }, _eventsCount: 3, _maxListeners: undefined, _options: { maxRedirects: 21, maxBodyLength: Infinity, protocol: 'https:', path: '/api/latest_vaas?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', method: 'GET', headers: [Object: null prototype], agents: [Object], auth: undefined, family: undefined, beforeRedirect: [Function: dispatchBeforeRedirect], beforeRedirects: [Object], hostname: 'hermes.pyth.network', port: '', agent: undefined, nativeProtocols: [Object], pathname: '/api/latest_vaas', search: '?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace' }, _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [TLSSocket], _header: 'GET /api/latest_vaas?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'User-Agent: axios/1.6.8\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: hermes.pyth.network\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/latest_vaas?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', _ended: false, res: null, aborted: false, timeoutCb: [Function: emitRequestTimeout], upgradeOrConnect: false, parser: [HTTPParser], maxHeadersCount: null, reusedSocket: false, host: 'hermes.pyth.network', protocol: 'https:', _redirectable: [Circular *1], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, _currentUrl: 'https://hermes.pyth.network/api/latest_vaas?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', _timeout: null, [Symbol(kCapture)]: false } }

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

2 participants