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

superagent very old deprecated version #648

Closed
scholtz opened this issue Sep 9, 2022 · 3 comments
Closed

superagent very old deprecated version #648

scholtz opened this issue Sep 9, 2022 · 3 comments
Labels
new-bug Bug report that needs triage Team Lamprey Team Scytale

Comments

@scholtz
Copy link

scholtz commented Sep 9, 2022

Subject of the issue

Please upgrade superagent library. Version 6 is deprecated. https://www.npmjs.com/package/superagent

I am facing issues superagent crashing the typescript app.. Unable to catch error in try catch.

Error: Network request error. Received status 400: TransactionPool.Remember: txn dead: round 1742449 outside of 1741200--1742200
at Request.callback (node_modules/algosdk/node_modules/superagent/src/node/index.js:879:15)
at fn (node_modules/algosdk/node_modules/superagent/src/node/index.js:1130:18)
at IncomingMessage. (node_modules/algosdk/node_modules/superagent/src/node/parsers/image.js:8:5)
at IncomingMessage.emit (node:events:402:35)
at IncomingMessage.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1340:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Or better upgrade to something tested by millions of people eg axios

Your environment

latest

Steps to reproduce

  1. start app ts-node main.ts
  2. wait till application crashes

Expected behaviour

App running

Actual behaviour

App crashes

@scholtz scholtz added the new-bug Bug report that needs triage label Sep 9, 2022
@jasonpaulos
Copy link
Contributor

Yes, superagent has many drawbacks. However, I believe the error you are receiving is completely irrelevant.

Algorand transactions have a first valid and last valid round. If a transaction is submitted after its last valid round has passed, it's no longer valid. It looks like you generated and signed a transaction, then waited too long to submit it, so it's now invalid.

@scholtz
Copy link
Author

scholtz commented Sep 9, 2022

actually it is the application use case that i am getting that error, but i need the superagent not to crash the app

@michaeldiamant michaeldiamant linked a pull request Oct 11, 2022 that will close this issue
@jasonpaulos
Copy link
Contributor

This was solved by #676 by migrating to fetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey Team Scytale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants