question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return nil on tx.call() (was not there few days ago)

See original GitHub issue

when using let tokenBalance = try! tx.call() Xcode returns :

Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a dictionary instead.", underlyingError: nil))

using ‘web3swift’, ‘~> 2.1.2’ I tried InfuraRopstenWeb3, InfuraRinkebyWeb3 I tried erc20 get balance and ETH get balance Do you get the same issue ? thank you


update from @skywinder:

So I will be ready to assign this bounty for this fix

Requirements to succeed this bounty:

  • add internal code-check for this error: that user uses public node and send explicit warning, about public node limitation and suggestion to use private node.
  • add documentation instruction how to do this

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:34 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
TheCodewrcommented, Feb 18, 2020

Hi All, So somehow, using same swift 2.2.1 looks like system is back on game again. Now I get the balance value using same code and ropsten, or rinkeby Note that I DID NOT do any change from the date of the disclaim Have a good one

1reaction
TheCodewrcommented, Sep 25, 2020

Guy’s, please make sure you are using your own endpoint. Chances are high you are using Maininfura() wich is a global pool limited by 10000 calls/ day Use your own end point URL + infura key and you will have your own cotas of 10000 calls / day (free), solving the error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ruby check if nil before calling method - null - Stack Overflow
Ruby 2.3.0 added a safe navigation operator ( &. ) that checks for nil before calling a method. s&.strip. If s is nil...
Read more >
Transactions | GORM - GORM
To perform a set of operations within a transaction, the general flow is as below. db.Transaction(func(tx *gorm.DB) error {
Read more >
Why do all of my examples return `nil`? - Codecademy
Answer 52a1981d52f863d3de00013c. Since the Ruby Console always shows the value of the last statement or expression in your code, if that last statement...
Read more >
The Go Programming Language Specification
Introduction. This is the reference manual for the Go programming language. The pre-Go1.18 version, without generics, can be found here.
Read more >
TeleFile - Texas Comptroller
TeleFile takes the place of filing a paper return for those with no taxable sales to report. ... TeleFile is available 24 hours...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found