wevote / WebApp

We Vote's javascript (client-side) mobile website built with React/Flux. Twitter: @WeVote Apple Store: https://itunes.apple.com/us/app/we-vote-voter-guide/id1347335726 Android: https://play.google.com/store/apps/details?id=org.wevote.cordova&hl=en_US
95 stars 301 forks source link

App Freezes Browser from Donate Page #834

Closed pertrai1 closed 7 years ago

pertrai1 commented 7 years ago

Please describe the issue (What happens? What do you expect?)

DaleMcGrew commented 7 years ago

Thank you @pertrai1 for reporting this. I am not able to reproduce this. Can you share the browser and computer you were using? Do you have any tips of what might be happening from the console log? cc'ing @SailingSteve

pertrai1 commented 7 years ago

Yes it is Edge on Microsoft Surface. No issues that are showing in the console.

SailingSteve commented 7 years ago

Hi, There is an "known" issue where maybe, if you donate without logging in or if Watchify refreshes the app while you are on the donation, you get an endless stream of retrieveVoter requests from the browser (~ 2 per second), until the browser freezes up. I think I saw it from the beginning of my working on the project, on Chrome. I'll dig into it tomorrow.

Steve Podell

On 5/13/17 1:16 PM, Rob Simpson wrote:

Yes it is Edge on Microsoft Surface. No issues that are showing in the console.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wevote/WebApp/issues/834#issuecomment-301272209, or mute the thread https://github.com/notifications/unsubscribe-auth/AGmlhQOjHKBGAjq8kwqCceXXGHja-MDKks5r5g-lgaJpZM4NaFUo.

pertrai1 commented 7 years ago

@SailingSteve @DaleMcGrew This seems to be a edge case that happened yesterday while I was playing around with the app. Right now I am trying to reproduce in Edge on the Surface and I am not able to reproduce. I am going to go ahead and close.

Looking at it more, it looks like Stripe was the cause of the problem and the time of the response from the network requests. Just keep an eye on that if it you see this in the future.

DaleMcGrew commented 7 years ago

Thank you Rob, but I think it is enough of an issue that we should fix it. I appreciate you reporting it!

SailingSteve commented 7 years ago

Not sure, but the endless loop of "/apis/v1/voterRetrieve/" calls with a bad voter_device_id seems to happen when you are transpiling with Watchify and BrowserSync updates the running JavaScript.

SailingSteve commented 7 years ago

We were deleting cookies by setting "" for a payload, and -1 for a expiration. But it was taking too long to take effect, putting us in a tight endless loop. Changed over to cookies.js's cookies.removeItem("voter_device_id"); which appears to work instantly. Solved the problem.

SailingSteve commented 7 years ago

Fixed in pull request #878

DaleMcGrew commented 7 years ago

Thank you @SailingSteve! I am marking this as Verify Fix so we can do some more testing before calling this closed.

pertrai1 commented 7 years ago

@SailingSteve - How does the one time donation fit in with this issue? Would be great if you could do a PR against this issue and separate donations into another PR if there is no relevance. If there is, great.

DaleMcGrew commented 7 years ago

Hi @pertrai1, we checked in a fix for this issue (I merged code that fixes this, and pushed it to the live site.) Would you be willing to try to recreate the case where you saw this problem, and verify it is fixed?

pertrai1 commented 7 years ago

@DaleMcGrew 👍