polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 354 forks source link

TypeError: Converting circular structure to JSON - Uploading Contract #5698

Open AlexD10S opened 1 year ago

AlexD10S commented 1 year ago

I want to upload an ink! Smart contract using the PolkadotJS UI portal in a local node that runs with the pallet contracts on it. To replicate this issue the Substrate Contracts Node can be used.

When I click the button Upload & deploy code and upload the files the screen keeps loading, and in the Developer Console the following error appears:

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'r'
    |     property '_events' -> object with constructor 's'
    |     property 'ready' -> object with constructor 'i'
    --- property 'context' closes the circle
    at JSON.stringify (<anonymous>)

I can upload the contract using other alternatives using Contracts UI and using the tool cargo-contract.

ganesh1997oli commented 1 year ago

any update in this issue @AlexD10S @jacogr?

forgetso commented 1 year ago

Also hitting this issue.

wottpal commented 1 year ago

The issue is still persisting. Something crucial like this shouldn't be unfixed for 2months+.

TarikGul commented 1 year ago

The issue is still persisting. Something crucial like this shouldn't be unfixed for 2months+.

If its that crucial, I would suggest you help out and open a PR then.