Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cart keeps loading forever #7458

Closed
zkeducation opened this issue Sep 17, 2020 · 21 comments
Closed

Cart keeps loading forever #7458

zkeducation opened this issue Sep 17, 2020 · 21 comments

Comments

@zkeducation
Copy link

Describe the bug
<The cart loading icons keep cycling forever, everything else is working as normal.-->

To Reproduce

Screenshots
<
Screen Shot 2020-09-17 at 2 16 08 PM
-->

Desktop :

  • OS: Mac OS 10.14.5
  • Browser: Brave
  • Browser Version:0.63.55
@owocki
Copy link
Contributor

owocki commented Sep 17, 2020

heya @zkeducation do you see any errors in your console? @mds1 mind trying to reproduce this?

@mds1
Copy link
Contributor

mds1 commented Sep 17, 2020

Hey @zkeducation! Right now this can happen if (1) you don't have a wallet connected, or (2) if you're using MetaMask but it's locked. We're deploying a fix for both of those today.

If those aren't the cause in your case, like @owocki said any additional details you can provide to help reproduce it would be helpful!

@RockmanR
Copy link

Hi @mds1 ,

I'm facing the same issue here. Regarding:

  1. my wallet is connected
  2. I tried both, metamask add-on extension and the Wallet Connect (with MetaMask mobile)
    but still face the issue.

Here are screenshots from the console as suggested by @owocki

Screen Shot 2020-09-25 at 12 46 40 AM

Screen Shot 2020-09-25 at 12 46 51 AM

Screen Shot 2020-09-25 at 12 47 07 AM

I was working fine for the first check-out. Then the next day the issue popped up.

Let me know if you need any extra info.

Thanks guys

@mds1
Copy link
Contributor

mds1 commented Sep 24, 2020

@RockmanR Hmm, that's odd. I'll have to figure out how to reproduce this. You could try clearing the cart and re-adding them from the grants page. I believe there was a very recent upgrade to how cart items were handled so I'd guess this would fix it. It's possible you already had items in your cart, then the changes were deployed, putting things in a weird state

@RockmanR
Copy link

Maybe what you said is true. Probably it started when I clicked on Banteg's shared cart in twitter (https://twitter.com/bantg/status/1307707668409319426?s=20). I saw the list once, then the issue started the moment I added stuff to it (maybe). I'll try to clear it out and and add the projects again :(

@mds1
Copy link
Contributor

mds1 commented Sep 24, 2020

I just tried adding Banteg's items to my cart and it seemed to have worked, so that's good. Also as a sanity check make sure MetaMask is unlocked and on mainnet!

@mds1
Copy link
Contributor

mds1 commented Sep 24, 2020

One more thought — you could also try a hard refresh of the browser to make sure nothing is being cached since we just pushed that update

@octavioamu
Copy link
Contributor

Can you click on share cart and paste the link here?

@octavioamu
Copy link
Contributor

also are all the grants on your cart to dai? or is one with a diff token?

@RockmanR
Copy link

@RockmanR
Copy link

also are all the grants on your cart to dai? or is one with a diff token?

They are in Dai and Eth. as you will see from the link

@GriffGreen
Copy link

GriffGreen commented Sep 28, 2020

having the same issue... Its tragic too cause i made a bunch of comments in all the grants :-(
Screen Shot 2020-09-29 at 1 05 13 AM

Screen Shot 2020-09-29 at 1 06 36 AM

Screen Shot 2020-09-29 at 1 06 45 AM

@GriffGreen
Copy link

It definitely is happening when you delete grants from a preloaded cart

@mds1
Copy link
Contributor

mds1 commented Sep 30, 2020

Hey @GriffGreen sorry for the late response here. And sorry that all your comments are lost 😕

Can you elaborate a bit on the cause you found and how to reproduce this?

@octavioamu
Copy link
Contributor

I replicated the steps without luck the first time, but a second time gave me the error, I wonder if depends the grant you delete.

@octavioamu
Copy link
Contributor

@mds1 seems the problem is with the exchange calculation , as still trying to fetch data for something that doesn't exist
image

TO REPRODUCE THIS ERROR
Go to https://gitcoin.co/grants/cart/bulk-add/888;10;283,200;10;283,1122;10;283,170;10;283,1093;10;283,223;10;283,224;10;283,308;10;283,24;10;283,25;10;283,13;10;283,1127;10;283,1211;10;283,275;10;283,17;0.02639541574883473;3,149;10;283,:banteg
request go get_amount?denomination=DAI,ETH
localstorage showing the 0 to 15 grant (the last one is rotki)
Remove "brownie" grant (need to be that one)
without reloading keep an eyes on rotki the last one now without token informations
image
without reload you will see the problem happening exchange trying to fetch get_amount?denomination=DAI,ETH,
/sync
Reload the page and the card will never load again until you clear it.

So the problem is on the removal is removing the grant but also data from the last one.

@octavioamu
Copy link
Contributor

octavioamu commented Sep 30, 2020

Ok @GriffGreen @RockmanR @zkeducation I have a quick dirty snipped if you not cleared your cart and want to recover the data. this code will just remove the last one you had on your cart.

Open console, paste this and hit enter:

var test = JSON.parse(window.localStorage['grants_cart'])
test.pop()
window.localStorage['grants_cart']=JSON.stringify(test)

Reload window.
Then everything should be there except the last grant (probably rotki)

@GriffGreen
Copy link

Hey @GriffGreen sorry for the late response here. And sorry that all your comments are lost 😕

Can you elaborate a bit on the cause you found and how to reproduce this?

I was trying to take out the DAI grants in this cart in a brave browser:

If you delete 1 or 2 of them the front end looks fine... I think, but delete the third and then the grant still just sits there.

And even if i just delete 1 of them, and then try to share the cart... the cart wont load... it keeps loading forever.

https://gitcoin.co/grants/cart/bulk-add/1127;2000;316,899;1000;316,539;1000;316,277;1000;316,1155;1000;316,308;1000;316,1141;1000;316,798;800;316,522;800;316,816;800;316,795;800;316,517;800;316,1262;600;316,1297;600;316,524;600;316,191;600;316,63;600;316,184;500;316,213;500;316,1086;500;316,86;500;316,347;40;283,1093;400;316,237;400;316,1198;400;316,1118;400;316,1158;400;316,143;400;316,1325;400;316,500;300;316,329;300;316,366;200;316,40;100;316,1278;100;316,1139;100;316,855;1000;316,615;400;316,484;100;316,1110;200;316,936;200;316,711;200;316,540;200;316,490;200;316,296;20;283,275;10;283,274;500;316,246;100;316,235;50;283,202;800;316,149;300;316,159;300;316,224;400;316,1173;200;316,1166;300;316,1005;200;316,961;300;316,565;500;316,238;100;316,223;100;316,198;1000;316,285;200;316,281;5;283,444;1000;316,943;200;316,775;10;283,1174;500;316,12;300;316,211;100;283,543;20;283,864;300;316,827;500;316,1296;300;316,1211;200;316,779;30;283,1101;500;316,270;100;316,1052;200;316,212;1000;316,1143;500;316,1183;300;316,515;200;316,1250;1000;316,231;500;316,1170;400;316,845;500;316,1175;200;316,1167;400;316,1071;400;316,1310;300;316,1031;200;316,1114;400;316,1266;500;316,618;50;283,:griffgreen

@octavioamu
Copy link
Contributor

wow that is a lot of grants, probably is the same problem, something on the function to delete grants is not working properly.

@mds1
Copy link
Contributor

mds1 commented Oct 1, 2020

Fix ready in #7573!

@GriffGreen If you haven't cleared your cart, the page will now load and the buggy cart entries will default to 0.001 ETH, and all your comments will be saved

@octavioamu
Copy link
Contributor

@GriffGreen @RockmanR @zkeducation fix was deployed, just tested and is working fine!!! Sorry for the inconvenience.

thelostone-mc added a commit that referenced this issue Oct 2, 2020
* Fix bugs in #7458 that happen when items are removed from cart (#7573)

* hide events when no calendar id is associated (#7575)

* round end

* calendar

* fixes timer on /grants

* send ga on edit profile

* onboard darkmode

* missing dark mode

* track related grants, useful for sybil resistence

Co-authored-by: Matt <[email protected]>
Co-authored-by: Miguel Angel Gordián <[email protected]>
Co-authored-by: owocki <[email protected]>
Co-authored-by: octavioamu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants