Web: zkSync checkout issue

Created on 30 Sep 2020  Â·  6Comments  Â·  Source: gitcoinco/web

Hey folks! Having some trouble paying out my Gitcoin Grants donations.

Describe the bug

First attempt (9/26):

  • Tried checking out via zkSync. I left my computer while waiting for the transaction to process. It may have gone to sleep. Came back to this console error:
Issues detected. The new Issues tab displays information about deprecations, breaking changes and other potential problems.Go to IssuesLearn more
cart.9f24020c0f77.js:1188 Uncaught (in promise) TypeError: clr_prediction_curve_2d.map is not a function
    at a.predictCLRMatch (cart.9f24020c0f77.js:1188)
    at a.handler (cart.9f24020c0f77.js:2507)
app.brightid.org/node/v5/verifications/Gitcoin/3e9fea3d-d89d-4394-bf88-108e13b84f06:1 Failed to load resource: the server responded with a status of 404 (Not Found)
raven.js:58 Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.0.7)
    at t.makeError (ethers-5.0.umd.min.js:1)
    at t.throwError (ethers-5.0.umd.min.js:1)
    at t.throwArgumentError (ethers-5.0.umd.min.js:1)
    at Function.t.from (ethers-5.0.umd.min.js:1)
    at a.checkZkSyncBalances (cart.9f24020c0f77.js:1762)
    at async https:/s.gitcoin.co/static/v2/js/cart.9f24020c0f77.js:2642
a.<computed> @ raven.js:58
raven.js:58 Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.0.7)
    at t.makeError (ethers-5.0.umd.min.js:1)
    at t.throwError (ethers-5.0.umd.min.js:1)
    at t.throwArgumentError (ethers-5.0.umd.min.js:1)
    at Function.t.from (ethers-5.0.umd.min.js:1)
    at a.checkZkSyncBalances (cart.9f24020c0f77.js:1762)
    at async a.startZkSyncCheckoutProcess (cart.9f24020c0f77.js:1926)
a.<computed> @ raven.js:58
raven.js:58 Error: Network Error
    at T (main.js:1)
    at XMLHttpRequest.E.o.onerror (main.js:1)
    at XMLHttpRequest.d (raven.js:445)
a.<computed> @ raven.js:58
api.zksync.io/jsrpc:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED

Second attempt (9/29):

  • Went back to my cart. Your application alerted me "You started checking out with zkSync but never completed the process. You must complete this checkout before proceeding with any other checkouts. Please follow the prompts below to complete the process.", so I tried to continue. It's now been hanging here for >20 minutes:

Looks to be a similar BigNumber error. Here's from my browser console:

Failed to load resource: the server responded with a status of 404 (Not Found)
raven.min.js:2 Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.0.7)
    at t.makeError (ethers-5.0.umd.min.js:1)
    at t.throwError (ethers-5.0.umd.min.js:1)
    at t.throwArgumentError (ethers-5.0.umd.min.js:1)
    at Function.t.from (ethers-5.0.umd.min.js:1)
    at a.checkZkSyncBalances (cart.9f24020c0f77.js:1762)
    at async https:/s.gitcoin.co/static/v2/js/cart.9f24020c0f77.js:2642
a.<computed> @ raven.min.js:2
raven.min.js:2 Error: JRPC response error
    at t.HTTPTransport.<anonymous> (main.js:3)
    at Generator.next (<anonymous>)
    at s (main.js:3)

To Reproduce

  • Attempt to checkout via zkSync

Expected behavior

  • "Estimated processing time: 2m–4m"

Screenshots

Image 2020-09-29 at 4 20 49 PM

Desktop (please complete the following information):

  • OS: MacOS Catalina Version 10.15.5
  • Browser: Brave
  • Browser Version: v 1.13.82

Additional context

Here's my MetaMask address: https://etherscan.io/address/0x06DbFdbFdA84eABAea177760092Dc22ab1D8f372

Looking at my recent transactions, it looks like the DAI has been withdrawn from my wallet, but I don't think it's been successfully paid out 😕

All 6 comments

thanks @samajammin for the detailed issue report :)

@mds1 can u take a look? iirc we've had issues in brave in the past, metamask/their native web3 walllet dont play nice togetehr

Like @owocki said, thank you for all the details! Made it much easier to figure out what went wrong here.

For Brave, make sure that in settings > Extensions, if you want to use MetaMask, that it looks like this:

However, looking at your transactions on zkScan I don't think that is the issue. Here's what it seems happened:

  1. You had 10 items in your cart, plus a tip to Gitcoin, giving 11 contributions total
  2. On 9/26, the computer was left alone and your first 7 contributions were successful
  3. Either your computer went to sleep, or the the zkSync server briefly had some issues (as indiciated by the Network Error and api.zksync.io/jsrpc:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED messages)
  4. Because of this, the final 4 contributions did not go through

At this point, your account is in an incomplete state that the site is not setup to handle. So then what happened is:

  1. You revisited the cart to complete checkout
  2. Gitcoin thought you never started any zkSync contributions (this is my fault, since I never added in smarter logic to account for this situation), so it starts repeating your contributions from the beginning.
  3. The first item in your cart went through again, and then you ran into a zkSync server issue (JRPC response error), which is why it hung

The long term solution here is to make the cart smart enough to recognize these situations. For now, I'll give you instructions for a hacky fix:

  1. Go to the cart page and close the modal
  2. Remove the first 7 items from your cart. Optionally, to be on the safe side and ensure you're removing the correct ones, view the Grant Details page of each grant and remove the ones with the following addresses. They received their donations

    • 0x19dE91Af973F404EDF5B4c093983a7c6E3EC8ccE (this one received a double donation)

    • 0x85cab7143ff3c01b93e88f5b017692374bb939c2

    • 0xfDaaE0c5a7A56C8265b9f86cF8cd934A494E3733

    • 0xA19FCDaD77C1F0fd184689aca88BabCF68010347

    • 0xA3f83326cE7BD51fB6FDFC3D1c7fA76Dc9d52aee

    • 0x4BF66E52f3009Cd138e48f142D47661037160001

    • 0x9C2D119C158Db2A02621bbD44770b0715b1dfCc6

  3. At this point you have two options, here's both:
  4. Option 1 (cheaper for you, worse for the grant recipients):

    1. You have ~13.5 DAI in your Gitcoin zkSync account. Give the remaining 3 grants 3.33 DAI each, and you should have sufficient balance to pay for all fees and checkout successfully.

    2. Now, refresh the page and walk through the "Complete checkout" modal

  5. Option 2 (more expensive for you, better for the grant recipients):

    1. Remove one more item from your cart. Give 5 DAI to the remaining two

    2. Now, refresh the page and walk through the "Complete checkout" modal

    3. Add that final item back to your cart and do one more checkout

In either case @owocki you might want to update the Contributions to fix the amounts (Option 1) or remove duplicates (Option 2), since they won't be automatically updated.

@samajammin I know this is a weird solution, so please feel free to message me on Telegram @msolomon4 or Twitter @msolomon4 if you me to help you complete checkout or run in to further issues when doing the above steps

Thanks @mds1! Went with option 1. I believe I'm all set here - could you please confirm my remaining contributions went through? If so, I think we can call this a success & close the issue.

Confirmed the contributions went through so you are all set!

@mds1 i just received an email about incomplete checkout: image

Are you certain all of my contributions have gone through? If so there may be errors around your email alert logic. Thanks.

Thanks for flagging! Since in your case we resolved this by changing contribution amounts, the backend was looking for a different amount than the amount actually sent, which is why you got the email. We'll resolve that manually

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thelostone-mc picture thelostone-mc  Â·  4Comments

wizzfile picture wizzfile  Â·  3Comments

Skyge picture Skyge  Â·  3Comments

NukeManDan picture NukeManDan  Â·  3Comments

mbeacom picture mbeacom  Â·  4Comments