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

Unattended Listener Error #1221

Closed
EvilJordan opened this issue Dec 31, 2020 · 3 comments
Closed

Unattended Listener Error #1221

EvilJordan opened this issue Dec 31, 2020 · 3 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@EvilJordan
Copy link

I wrote a listener for my contract that's always up and running. Everything is still in testing so there's not a lot of transactions happening. I left the listener running for a few hours and came back to this (just one of many that are basically the same):

(node:30426) UnhandledPromiseRejectionWarning: Error: bad response (status=302, headers={"date":"Thu, 31 Dec 2020 04:11:07 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"close","set-cookie":"__cfduid=d73076d79159381bf848f0fff560f193f1609387867; expires=Sat, 30-Jan-21 04:11:07 GMT; path=/; domain=.etherscan.io; HttpOnly; SameSite=Lax","location":"//api.etherscan.io/apierror.html?aspxerrorpath=/api","access-control-allow-origin":"*","access-control-allow-headers":"Content-Type","access-control-allow-methods":"GET, POST, OPTIONS","x-frame-options":"SAMEORIGIN","cf-cache-status":"DYNAMIC","cf-request-id":"075897139200000dbe4d8b8000000001","expect-ct":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"","server":"cloudflare","cf-ray":"60a12798ed800dbe-IAD"}, body="<html><head><title>Object moved</title></head><body>\n<h2>Object moved to <a href=\"//api.etherscan.io/apierror.html?aspxerrorpath=/api\">here</a>.</h2>\n</body></html>\n", requestBody=null, requestMethod="GET", url="https://api-rinkeby.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey=REDACTED", code=SERVER_ERROR, version=web/5.0.5)
    at Logger.makeError (/node_modules/@ethersproject/logger/lib/index.js:179:21)
    at Logger.throwError (/node_modules/@ethersproject/logger/lib/index.js:188:20)
    at /node_modules/@ethersproject/web/lib/index.js:223:36
    at step (/node_modules/@ethersproject/web/lib/index.js:33:23)
    at Object.next (/node_modules/@ethersproject/web/lib/index.js:14:53)
    at fulfilled (/node_modules/@ethersproject/web/lib/index.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:30426) 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: 227

I assume I can fix this myself by wrapping the listener in a try/catch, but thought I'd mention in case it's something you'd like to be aware of.

HAPPY NEW YEAR!!

@ricmoo ricmoo added investigate Under investigation and may be a bug. on-deck This Enhancement or Bug is currently being worked on. labels Jan 12, 2021
@ricmoo ricmoo added bug Verified to be an issue. and removed investigate Under investigation and may be a bug. labels Jan 13, 2021
@ricmoo
Copy link
Member

ricmoo commented Jan 13, 2021

I do believe this is the same problem as #1208. Please see that issue for updates. :)

@ricmoo
Copy link
Member

ricmoo commented Jan 14, 2021

This should be addressed in 5.0.26. Please try it out and let me know. :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jan 15, 2021
@ricmoo
Copy link
Member

ricmoo commented Jan 19, 2021

Closing this now, as I think the problem has been resolved. If not, please re-open.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants