frame icon indicating copy to clipboard operation
frame copied to clipboard

got ratelimited by coingecko (cloudflare) and then crashed out of memory

Open aerth opened this issue 4 years ago • 3 comments

first it was acting weird (not popping up tx when i click swap for example) so i looked at the logs and its coingecko,

[scanWorker] 20:06:27 unable to load coin data FetchError: invalid json response body at https://api.coingecko.com/api/v3/coins/list?include_platform=true reason: Unexpected token < in JSON at position 0
    at /opt/Frame/resources/app.asar/node_modules/node-fetch/lib/index.js:273:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async handleJsonResponse (/opt/Frame/resources/app.asar/compiled/main/externalData/coingecko/index.js:11:18)
    at async loadCoins (/opt/Frame/resources/app.asar/compiled/main/externalData/rates/index.js:30:23)
    at async loadRates (/opt/Frame/resources/app.asar/compiled/main/externalData/rates/index.js:73:25)
    at async Object.ratesScan [as updateRates] (/opt/Frame/resources/app.asar/compiled/main/externalData/worker.js:82:29)

so i opened the endpoint in browser and got it with this

image

THEN i disabled mainnet and all the other networks than the network i am testing on (mumbai) and then it starts bugging out because Ethereum network disconnected

[scanWorker] 20:06:56 multicall error (batch 2000-4000), chainId: 1, first call: {"target":"0xsomething","call":["function balanceOf(address address) returns (uint256 value)","0xmyAddress"],"returns":[null]} 
{ message: 'Not connected to Ethereum network', code: -1 }

also

scanWorker] 20:07:38 could not fetch assets 0xmyAddress FetchError: request to https://proxy.pylon.link/?type=api&target=https%3A%2F%2Fapi.opensea.io%2Fapi%2Fv1%2Fassets%3Fowner%3D0xmyAddress%26order_direction%3Ddesc%26limit%3D50 failed, reason: Client network socket disconnected before secure TLS connection was established
    at ClientRequest.<anonymous> (/opt/Frame/resources/app.asar/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:394:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

a bunch of these

20:07:13.482 › Could not load block Error: Not connected
    at Timeout._onTimeout (/opt/Frame/resources/app.asar/node_modules/ethereum-provider/index.js:226:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
20:07:13.483 › Could not load block Error: Not connected
    at Timeout._onTimeout (/opt/Frame/resources/app.asar/node_modules/ethereum-provider/index.js:226:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
20:07:14.079 › Could not load block Error: Not connected
    at Timeout._onTimeout (/opt/Frame/resources/app.asar/node_modules/ethereum-provider/index.js:226:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
20:07:14.079 › Could not load block Error: Not connected
    at Timeout._onTimeout (/opt/Frame/resources/app.asar/node_modules/ethereum-provider/index.js:226:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
20:07:14.901 › Could not load block Error: Not connected
    at Timeout._onTimeout (/opt/Frame/resources/app.asar/node_modules/ethereum-provider/index.js:226:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

then finally it crashes

    at ClientRequest.<anonymous> (/opt/Frame/resources/app.asar/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:394:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[scanWorker] 20:09:03 no heartbeat received in 60 seconds, worker exiting

<--- Last few GCs --->

[1246680:xxx]   186113 ms: Scavenge 3828.7 (3966.2) -> 3823.4 (3967.4) MB, 6.2 / 0.0 ms  (average mu = 0.782, current mu = 0.623) allocation failure 
[1246680:xxx]   186618 ms: Scavenge 3829.8 (3967.4) -> 3824.6 (3968.4) MB, 474.9 / 0.0 ms  (average mu = 0.782, current mu = 0.623) allocation failure 
[1246680:xxx]   186663 ms: Scavenge 3831.2 (3968.4) -> 3826.1 (3968.4) MB, 15.5 / 0.0 ms  (average mu = 0.782, current mu = 0.623) allocation failure 


<--- JS stacktrace --->

[1246680:0316/200909.046382:ERROR:node_bindings.cc(143)] Fatal error in V8: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory

aerth avatar Mar 16 '22 20:03 aerth

Thanks for reporting @aerth! We will be removing coingecko calls in the next release to solve this

floating avatar Mar 17 '22 16:03 floating

@aerth i think i have same problem. How can i have logs/crash report access please ?

daodevinc avatar Apr 07 '22 16:04 daodevinc

This has been fixed and these calls have been removed in v0.5.0-beta.14

floating avatar Apr 19 '22 13:04 floating