hirosystems / explorer

Explore transactions and accounts on the Stacks blockchain. Clone any contract and experiment in your browser with the Explorer sandbox.
https://explorer.hiro.so/
MIT License
141 stars 102 forks source link

Read only function call - Application error: a client-side exception has occurred #787

Closed BowTiedDeployer closed 2 years ago

BowTiedDeployer commented 2 years ago

Describe the bug A clear and concise description of what the bug is. Stacks Explorer throws error on read only function calls. Happens to multiple NFT contracts such as Miami Degens, Megapont, Bitcoin Monkeys and others. Was working a few weeks before.

Transaction ID Address Block#
Time stamp

To Reproduce

  1. Go to https://explorer.stacks.co/sandbox/contract-call?chain=mainnet
  2. Paste miami-degens contract SP1SCEXE6PMGPAC6B4N5P2MDKX8V4GF9QDE1FNNGJ.miami-degens
  3. Click on Get contract
  4. Scroll down to get-owner (read_only function)
  5. Write a token id
  6. Click on Call function
  7. See error

Expected behavior It should show the address of the owner for the specific NFT id.

Screenshots console.log:

instrument.js:109
[debug] pageProps.dehydratedState undefined
-----------------------------------------------------------------------
instrument.js:109
TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at ln (recoil.js:5279:36)
    at recoil.js:5328:41
    at Array.map (<anonymous>)
    at ln (recoil.js:5328:4)
    at recoil.js:5289:32
    at Array.map (<anonymous>)
    at ln (recoil.js:5289:18)
    at recoil.js:5328:41
    at Array.map (<anonymous>)
    at ln (recoil.js:5328:4)
    at dn (recoil.js:5362:10)
    at mi._keyMapper (recoil.js:7105:21)
    at mi.get (recoil.js:7047:31)
    at recoil.js:7234:42
    at fn ([...param]-1b9891ff8f74023c.js:1:121082)
    at ro (react-dom.production.min.js:157:137)
    at Hu (react-dom.production.min.js:267:460)
    at Pi (react-dom.production.min.js:250:347)
    at _i (react-dom.production.min.js:250:278)
    at xi (react-dom.production.min.js:250:138)
    at vi (react-dom.production.min.js:243:163)
    at react-dom.production.min.js:123:115
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Wl (react-dom.production.min.js:122:325)
    at Ql (react-dom.production.min.js:123:61)
    at D (scheduler.production.min.js:16:224)
    at w.port1.onmessage (scheduler.production.min.js:12:346)
-----------------------------------------------------------------------
instrument.js:109
Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError%3A%20Do%20not%20know%20how%20to%20serialize%20a%20BigInt for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at ka (react-dom.production.min.js:140:47)
    at react-dom.production.min.js:150:265
    at Io (react-dom.production.min.js:176:171)
    at Hu (react-dom.production.min.js:271:134)
    at Pi (react-dom.production.min.js:250:347)
    at _i (react-dom.production.min.js:250:278)
    at xi (react-dom.production.min.js:250:138)
    at vi (react-dom.production.min.js:243:163)
    at react-dom.production.min.js:123:115
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Wl (react-dom.production.min.js:122:325)
    at Ql (react-dom.production.min.js:123:61)
    at D (scheduler.production.min.js:16:224)
    at w.port1.onmessage (scheduler.production.min.js:12:346)

screen shot: image

Desktop (please complete the following information):

dartman10 commented 2 years ago

+1.

Getting same error with: Contract: SP213KNHB5QD308TEESY1ZMX1BP8EZDPG4JWD0MEA.web4 Function: get-by-id

OS: macOS 12.4 Browser: Brave 1.42.86

dantrevino commented 2 years ago

@diwakergupta @markmhx who do we ping to get some attention on this? Very basic funcitonality has been broken for a month.

markmhendrickson commented 2 years ago

@andresgalante can you help here? 🙏

andresgalante commented 2 years ago

thanks, @markmhx and @dantrevino for bringing it up. We'll work on it soon

whoabuddy commented 2 years ago

@andresgalante this would be the related issue per our conversation in Discord.

On my end, testing with citycoins-tardis-v3, I am unable to call the read-only functions, e.g. total-supply-mia

Screenshot from 2022-08-23 17-37-53

This results in the same message:

Screenshot from 2022-08-23 17-38-03

Which when inspecting the console reveals:

instrument.js:109 TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)

instrument.js:109 Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError%3A%20Do%20not%20know%20how%20to%20serialize%20a%20BigInt for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
blockstack-devops commented 2 years ago

:tada: This issue has been resolved in version 1.36.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: