Return nil on tx.call() (was not there few days ago)
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
I got the same issue, i did not change anything and it was working nicely a few days ago. I did not yet found any solution, but i'm still looking, let me know if you find anything.
Looks like some changes in Infura protocol. I will check it.
@skywinder Hey. Any update on this?
hello, @iHamzaaK . I'm currently busy with other tasks.
btw, worth to mention, we recently found money to support the library from the community. I would be glad to make a bounty for someone, who willing to investigate with this issue.
@TheCodewr can you provide full code example to debug it?
Very simple, I was using this exact code https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md It was working fine, until not ...
@TheCodewr It may be an Infura problem similar to this. Try something similar on the local dev node
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 0.045 ETH (12.69 USD @ $282.09/ETH) attached to it as part of the Matter Labs fund.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin Slack
- $92,634.43 more funded OSS Work available on the Gitcoin Issue Explorer
I'm investigating, it appears that it is an update to geth-1.9, continuing to look for the best solution, reporting to go-ethereum.
thanks, @aranhaagency please, let me know if you find any details, what cause the problem
I am using version 2.2 and found this problem when send Eth or sned Erc20 token
I am using version 2.2 and found this problem when send Eth or sned Erc20 token
2.2 version or what ?
I am using version 2.2 and found this problem when send Eth or sned Erc20 token
2.2 version or what ?
2.2.1
I did some tests with the infura api and it does not deliver the balance on all requests, not if there is a similar service on the mainet I am researching.
I thought of a solution, if infura answer is null, our api hits the xxXx service which will have a new answer with the correct balance. If there are 3 services we can make a switch case.
that's an idea, I accept suggestions on that too.
update on other issue: https://github.com/ethereum/go-ethereum/issues/20685
Can I make a balance call through Alchemy's api? was added to the project by this pull here https://github.com/matter-labs/web3swift/pull/193
You should be able to instantiate a generic JsonRPCProvider using either https or websocket transport and use it with alchemy
Perfect, @shamatar thanks!
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
The problem is on geth old versions @TheCodewr ?
How can we prevent something from breaking our lib, we can make a release system what do you think @skywinder ?
Version 2.2.1 All other functions are available, except that the transfer fails, send eth or send erc20 token got that error
aaand the same issue is back again .... (no environement changes or code changes on my side)
The problem is on geth old versions @TheCodewr ?
I don't know
Thanks @TheCodewr in all my apoton searches for geth failure, the behavior is normal by alchmyst
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Workers have applied to start work.
These users each claimed they can complete the work by 3 hours from now. Please review their action plans below:
1) baldyash has applied to start work (Funders only: approve worker | reject worker).
Find what's wrong and fix this issue
Learn more on the Gitcoin Issue Details page.
@TheCodewr hi, could you provide a complete failed case (with addresses)?
Because I've tried it by myself and I am unable to reproduce your problem, also this test passes.
For now, I will close this issue, but feel free to reopen it.
Same issue... Is there any solution? Who can share, please?
@i-Roma What a "Heisenbug" Can't reproduce it. can you provide nore details?
Keep in mind that enchantments & pull requests to this repo are eligible for the GitCoin grant program that we received. So if you are willing to contribute - don't hesitate to do this. I will make a bounty (by ETH or Dai) to reward your contribution!