brave / browser-laptop

[DEPRECATED] Please see https://github.com/brave/brave-browser for the current version of Brave
https://www.brave.com
Other
7.95k stars 976 forks source link

Claim my free tokens button is not responding quickly #15054

Closed GeetaSarvadnya closed 6 years ago

GeetaSarvadnya commented 6 years ago

Description

Due to delay in Response, click on Claim my free tokens is not responding immediately. After sometimes it keeps opening the catcha pop ups continuously

Description

Claim my free tokens button is not responding quickly

Steps to Reproduce

  1. Launch Brave with clean profile from CLI
  2. Make the payment switch ON
  3. Select Claim my free token option from the notification
  4. Click on Claim my free tokens
  5. Observe the Captcha pop up
  6. Close the Captcha pop up
  7. Click on Claim my free tokens

Actual result: Click on Claim my free tokens button is not responding immediately. There is a delay in server response.

delay in response - claim my free tokens

Expected result: Claim my free tokens button should respond quickly

Reproduces how often: Always

Brave Version

0.23.102 about:brave info: Brave: 0.23.102 V8: 6.8.275.24 rev: 43eb6673e6601527129f3f9f96aade08d15bc671 Muon: 8.0.8 OS Release: 10.0.17134 Update Channel: Release OS Architecture: x64 OS Platform: Microsoft Windows Node.js: 7.9.0 Brave Sync: v1.4.2 libchromiumcontent: 68.0.3440.84

Reproducible on current live release: NA

Additional Information

cc: @kjozwiak @LaurenWags @srirambv @btlechowski

NejcZdovc commented 6 years ago

For me this is quite hard to reproduce. I needed to click quite a lot of time to claim button to see this delay. This delay happens because we get 503 from the server

[ response for GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/e9458300-ff77-4cae-b2f4-b47dcc4762fd ]
>>> HTTP/1.1 503
>>> cache-control: no-cache, no-store
>>> connection: keep-alive
>>> content-length: 506
>>> content-type: text/html; charset=utf-8
>>> date: Mon, 20 Aug 2018 03:52:37 GMT
>>> server: Cowboy
>>>
>>> ...
srirambv commented 6 years ago

I can reproduce this easily when i dnd on wrong colour. Here's the recording https://drive.google.com/file/d/1VZ632KMsQZKdF3wYWefaUEeG834v6wzI/view?usp=sharing

LaurenWags commented 6 years ago

Using STR from description able to reproduce on macOS. Using steps from https://github.com/brave/browser-laptop/issues/15054#issuecomment-414304717 able to reproduce on macOS. Looks like if the user is quickly trying to dnd onto a color sometimes the captcha doesn't refresh and appears stuck. Saw {"statusCode":403,"error":"Forbidden","message":"must first request captcha"} in terminal.

srirambv commented 6 years ago
[ response for GET https://balance-staging.mercury.basicattentiontoken.org/v2/wallet/55a0e143-2783-4f99-b67c-470d81e59e4b/balance ]
>>> HTTP/1.1 200
>>> accept-ranges: bytes
>>> cache-control: private
>>> connection: keep-alive
>>> content-length: 452
>>> content-type: application/json; charset=utf-8
>>> date: Mon, 20 Aug 2018 16:14:30 GMT
>>> server: Cowboy
>>> vary: accept-encoding
>>> via: 1.1 vegur
>>> x-rate-limit-limit: 60
>>> x-rate-limit-remaining: 57
>>> x-rate-limit-reset: 1534781675
>>>
>>> {"altcurrency":"BAT","probi":"0","balance":"0.0000","unconfirmed":"0.0000","rates":{"ETH":0.0007341295599117227,"LTC":0.0038187957231288687,"BCH":0.00038682226255420835,"BTG":0.011063649406547542,"DASH":0.0014491948917268185,"XRP":0.6437108708025042,"BTC":0.00003247,"USD":0.2199860370441363,"EUR":0.1923375319503649},"parameters":{"adFree":{"currency":"BAT","fee":{"BAT":20},"choices":{"BAT":[10,15,20,30,50,100]},"range":{"BAT":[10,100]},"days":30}}}

getBalance refreshes ledger info: 0

WalletProperties refreshes payment info
+++ busyP=false

ledger client run: clientP=true delayTime=0
          publisher                                      blockedP                                       stickyP                                      verified                                      excluded                                     eligibleP                                      visibleP                                      contribP                                      duration                                        visits
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
<<< GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b
<<< content-type: application/json; charset=utf-8
<<< user-agent: Brave/0.23.102 Chrome/68.0.3440.84 Muon/8.0.8 Microsoft Windows x64
<<< accept-encoding:
<<<
[ response for GET https://ledger-staging.mercury.basicattentiontoken.org/v2/captchas/55a0e143-2783-4f99-b67c-470d81e59e4b ]
>>> HTTP/1.1 200
>>> accept-ranges: bytes
>>> cache-control: private
>>> captcha-hint: blue
>>> connection: keep-alive
>>> content-length: 24708
>>> content-type: image/png
>>> date: Mon, 20 Aug 2018 16:15:10 GMT
>>> server: Cowboy
>>> via: 1.1 vegur
>>>
>>> ...

I see these messages when the claim button doesn't show up the CAPTCHA immediately

evq commented 6 years ago

there was a timeout at 30s resulting in 503 from heroku lb - the root cause should now be resolved

GeetaSarvadnya commented 6 years ago

Verified on Windows x64 with • 0.23.102 43eb6673e6601527129f3f9f96aade08d15bc671 • Muon 8.0.8 • libchromiumcontent 68.0.3440.84

Verified with macOS 10.12.6 using

Verified on Ubuntu 17.10 x64