dashevo / js-dash-sdk

DEPRECATED Dash client-side library for wallet payment/signing and application development. (Wallet, DAPI, Primitives, BLS, ...)
https://dashevo.github.io/platform/SDK/
MIT License
36 stars 21 forks source link

Error: Request failed with status code 502 #298

Closed dashameter closed 2 years ago

dashameter commented 2 years ago

During registering contracts encountered error:

(node:324279) UnhandledPromiseRejectionWarning: Error: Request failed with status code 502
    at createError (dashpay-wallet/node_modules/axios/lib/core/createError.js:16:15)
    at settle (dashpay-wallet/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (dashpay-wallet/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:324279) 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: 2)
(node:324279) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
dashameter commented 2 years ago

Appears to happen during wallet init

SamKirby22 commented 2 years ago

As discussed on Discord, moved from Priority 2 to Priority 1.

dashameter commented 2 years ago

passed retest, new rate limiter settings work :+1:

dashameter commented 2 years ago

I still get 502 Bad Gateway Errors using the sdk. These errors are in the browser creating a wallet: https://gist.github.com/dashameter/1e0a1db67ce2e6961858370086bc1067

This script running in terminal will eventually throw the 502 error: https://gist.github.com/dashameter/abfd6313853a67222576610f01d49fd4

dashameter commented 2 years ago

retest:

upgraded to DAPI Client v0.21.3, not seen a 502 so far, but 503 and 504:

VM6798:1 POST http://35.166.57.113:3000/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs 504 (Gateway Time-out)
VM6798:1 POST http://54.244.141.192:3000/org.dash.platform.dapi.v0.Platform/getIdentityIdsByPublicKeyHashes 503 (Service Unavailable)
VM6798:1 POST http://54.244.141.192:3000/org.dash.platform.dapi.v0.Platform/getIdentityIdsByPublicKeyHashes net::ERR_CONTENT_LENGTH_MISMATCH 503 (Service Unavailable)
VM6798:1 POST http://54.244.41.15:3000/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs 504 (Gateway Time-out)
VM6798:1 POST http://54.218.251.43:3000/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs 504 (Gateway Time-out)
VM6798:1 POST http://54.244.141.192:3000/org.dash.platform.dapi.v0.Platform/getIdentityIdsByPublicKeyHashes 503 (Service Unavailable)
VM6798:1 POST http://54.244.141.192:3000/org.dash.platform.dapi.v0.Platform/getIdentityIdsByPublicKeyHashes net::ERR_CONTENT_LENGTH_MISMATCH 503 (Service Unavailable)
VM6798:1 POST http://54.189.162.193:3000/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs 504 (Gateway Time-out)
SamKirby22 commented 2 years ago

Thanks @dashameter i've marked this as failed retest on the triage sheet

dash-maverick commented 2 years ago

Could we possibly open a new issue for that since the 502 Bad Gateway problem has been solved and it's just a different (though related) problem ?

dashameter commented 2 years ago

passed retest