graphprotocol / mission-control-indexer

Technical indexer documentation and infrastructure templates for the Mission Control testnet
21 stars 4 forks source link

Indexer-Agent: Unhandled Promise Rejection Warning #241

Open joesixpack opened 3 years ago

joesixpack commented 3 years ago

{"level":30,"time":1607401378260,"pid":1,"hostname":"7bc592f89ca7","name":"IndexerAgent","component":"Network","indexer":"0x01c3Fc5A376D592D2167E8C0A89C4fA3bcAf832a","operator":"0x01c3Fc5A376D592D2167E8C0A89C4fA3bcAf832a","allocation":"0x3B1aB191831a939b5b988097507243BaF6A5e0Ee","deployment":{"bytes32":"0x4aa96124dfa60f011579a7384967f65ec717eb64ae3e0a7d4f5641a7f04c0a5c","ipfsHash":"QmTN6gMCBCYTgbis33eSvr6sLsQoQ3R6a2KzR7CqmMABQP"},"createdAtEpoch":319,"poi":"0xc0ffeec0ffeec0ffeec0ffeec0ffeec0ffeec0ffeec0ffeec0ffeec0ffeeeeee","createdAtBlockHash":"0x7c5dcb44a0b14606b3bb3fb177ca3a94b0fb5b5888245d91c7538af181c59a58","action":"close","tx":"0xde27b08e8d8fd2139b62bf86c52a8c1b662de17ade6208bb240088dafc26f6a8","msg":"Transaction pending"} (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:39:30 at Generator.next () at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:8:71 at new Promise () at awaiter (/opt/indexer/packages/indexer-common/dist/indexer-management/server.js:4:12) at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:37:66 at Layer.handle [as handle_request] (/opt/indexer/node_modules/express/lib/router/layer.js:95:5) at next (/opt/indexer/node_modules/express/lib/router/route.js:137:13) at /opt/indexer/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/opt/indexer/node_modules/raw-body/index.js:224:16) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 51) (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:39:30 at Generator.next () at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:8:71 at new Promise () at awaiter (/opt/indexer/packages/indexer-common/dist/indexer-management/server.js:4:12) at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:37:66 at Layer.handle [as handle_request] (/opt/indexer/node_modules/express/lib/router/layer.js:95:5) at next (/opt/indexer/node_modules/express/lib/router/route.js:137:13) at /opt/indexer/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/opt/indexer/node_modules/raw-body/index.js:224:16) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 52)

Jannis commented 3 years ago

@joesixpack This suggests there was an invalid POST / request sent to the indexer agent's management API, without a { "query": ... } in the body. Do you have a health check set up that posts to / or did you run graph indexer at the time?

joesixpack commented 3 years ago

Nope, wasn't doing anything. Fortunately, it's not crashing. This just came in out of nowhere:

{"level":30,"time":1607770164961,"pid":1,"hostname":"a11d6bc49fec","name":"IndexerAgent","deployment":{"bytes32":"0xfec6c9b0bc353ccb0d3cb47d9c6939f3a36efff8af79fb9cd604b1550aa84f59","ipfsHash":"QmfVC5EMxkkyh6tLt94o8Kh239WVNppDP6jLJncviCSK4k"},"epoch":344,"allocationAmount":"100000.0","totalActiveAllocationAmount":"100000.0","desiredNumberOfAllocations":1,"activeNumberOfAllocations":1,"activeAllocations":[{"id":"0xB96e43394767D1a5396C8E12F4C8bA6CD5BB9155","createdAtEpoch":341,"amount":"100000.0"}],"msg":"Reconcile deployment allocations"} (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:39:30 at Generator.next () at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:8:71 at new Promise () at awaiter (/opt/indexer/packages/indexer-common/dist/indexer-management/server.js:4:12) at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:37:66 at Layer.handle [as handle_request] (/opt/indexer/node_modules/express/lib/router/layer.js:95:5) at next (/opt/indexer/node_modules/express/lib/router/route.js:137:13) at /opt/indexer/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/opt/indexer/node_modules/raw-body/index.js:224:16) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 245) (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:39:30 at Generator.next () at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:8:71 at new Promise () at awaiter (/opt/indexer/packages/indexer-common/dist/indexer-management/server.js:4:12) at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:37:66 at Layer.handle [as handle_request] (/opt/indexer/node_modules/express/lib/router/layer.js:95:5) at next (/opt/indexer/node_modules/express/lib/router/route.js:137:13) at /opt/indexer/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/opt/indexer/node_modules/raw-body/index.js:224:16) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 246) (node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:39:30 at Generator.next () at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:8:71 at new Promise () at __awaiter (/opt/indexer/packages/indexer-common/dist/indexer-management/server.js:4:12) at /opt/indexer/packages/indexer-common/dist/indexer-management/server.js:37:66 at Layer.handle [as handle_request] (/opt/indexer/node_modules/express/lib/router/layer.js:95:5) at next (/opt/indexer/node_modules/express/lib/router/route.js:137:13) at /opt/indexer/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/opt/indexer/node_modules/raw-body/index.js:224:16) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 247) {"level":20,"time":1607770259158,"pid":1,"hostname":"a11d6bc49fec","name":"IndexerAgent","component":"IndexerManagementServer","msg":"POST / - - - - ms"}