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

getTransaction: Error: Number can only safely store up to 53 bits #5703

Closed
1 task done
Sotatek-TuanNguyen7 opened this issue Dec 12, 2022 · 6 comments
Closed
1 task done
Assignees
Labels
1.x 1.0 related issues Bug Addressing a bug

Comments

@Sotatek-TuanNguyen7
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Transaction: 0xa648ab6d55adad2cc0df5c43499710cf010d58cacb16195d5338ade168d9e20c
calling getTransaction for this transaction fails with: "Error: Number can only safely store up to 53 bits"

Expected Behavior

get success transaction success

Steps to Reproduce

web3.eth.getTransaction('0xa648ab6d55adad2cc0df5c43499710cf010d58cacb16195d5338ade168d9e20c')

Web3.js Version

1.8.1

Environment

  • Operating System:
  • Browser:
  • Node.js Version:
  • NPM Version:

Anything Else?

No response

@Sotatek-TuanNguyen7 Sotatek-TuanNguyen7 added the Bug Addressing a bug label Dec 12, 2022
@spacesailor24 spacesailor24 added the 1.x 1.0 related issues label Dec 13, 2022
@spacesailor24
Copy link
Contributor

Hi, thank you for bringing this to our attention. Could you provide what chain this transaction exists on? Doesn't seem to be on ETH mainnet, any of the testnets, or Binance chain

Most likely there is a property of the transaction object that web3 is attempting to convert from hex to a number and is causing an overflow. We've seen this issue before and have introduced a fix in rewrite of the library (v4.x)

@spacesailor24 spacesailor24 added the Needs Clarification Requires additional input label Dec 13, 2022
@Sotatek-TuanNguyen7
Copy link
Author

Sotatek-TuanNguyen7 commented Dec 13, 2022

Hi, thank you for bringing this to our attention. Could you provide what chain this transaction exists on? Doesn't seem to be on ETH mainnet, any of the testnets, or Binance chain

Most likely there is a property of the transaction object that web3 is attempting to convert from hex to a number and is causing an overflow. We've seen this issue before and have introduced a fix in rewrite of the library (v4.x)

i'm use bsc testnet: https://testnet.bscscan.com/tx/0xa648ab6d55adad2cc0df5c43499710cf010d58cacb16195d5338ade168d9e20c

@nikoulai
Copy link
Contributor

Hey @Sotatek-TuanNguyen7,

As a workaround, you can pass the string hex as the last parameter and get the result in hex.
Please see #5432

@Sotatek-TuanNguyen7
Copy link
Author

0xa648ab6d55adad2cc0df5c43499710cf010d58cacb16195d5338ade168d9e20c

Hi @nikoulai ,
My problem is getTransaction not getTransactionReceipt

@nikoulai
Copy link
Contributor

0xa648ab6d55adad2cc0df5c43499710cf010d58cacb16195d5338ade168d9e20c

Hi @nikoulai , My problem is getTransaction not getTransactionReceipt

👍 my bad

@Muhammad-Altabba
Copy link
Contributor

This is possibly the same as #5761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

5 participants