Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

wrong surveyor link being used under linux #14302

Closed
kjozwiak opened this issue Jun 1, 2018 · 5 comments
Closed

wrong surveyor link being used under linux #14302

kjozwiak opened this issue Jun 1, 2018 · 5 comments

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Jun 1, 2018

Description

When attempting to contribute/reconcile under Mint 18.3 x64, I keep receiving the following error message every time I try to contribute/reconcile: (this doesn't happen on Win/macOS)

[ response for POST https://ledger-staging.mercury.basicattentiontoken.org/v2/batch/surveyor ]
>>> HTTP/1.1 404 
>>> cache-control: no-cache
>>> connection: keep-alive
>>> content-length: 60
>>> content-type: application/json; charset=utf-8
>>> date: Fri, 01 Jun 2018 00:34:58 GMT
>>> server: Cowboy
>>> vary: accept-encoding
>>> via: 1.1 vegur
>>>
>>> {"statusCode":404,"error":"Not Found","message":"Not Found"}

ledger client callback: clientP=true errP=true resultP=false delayTime=undefined
ledger client error(1): {}
Error: HTTP response 404 for POST /v2/batch/surveyor
    at request.request (/usr/lib/brave/resources/app.asar/app/browser/api/ledger.js:1617:9)
    at Function.defaultSession.webRequest.fetch (/usr/lib/brave/resources/app.asar/js/lib/request.js:75:5)

Steps to Reproduce

  1. launch brave 0.22.724 using LEDGER_VERBOSE=true LEDGER_ENVIRONMENT=staging brave
  2. enable Payments via about:preferences#payments and accept a UGP grant
  3. add several websites into the Payments table (I used the heart under the URL bar)
  4. once you've populated the Payments table, close brave.
  5. edit reconcileStamp under ledger-state.json so it's ~15 days back in the past
  6. launch brave using LEDGER_NO_DELAY=true LEDGER_NO_FUZZING=true LEDGER_VERBOSE=true LEDGER_ENVIRONMENT=staging brave

You'll notice that the contribution process will start but after ~1min, you'll notice the above errors being spammed in the terminal.

Actual result:

When attempting to contribute/reconcile, brave is returning:

[ response for POST https://ledger-staging.mercury.basicattentiontoken.org/v2/batch/surveyor ]
>>> HTTP/1.1 404 
>>> cache-control: no-cache
>>> connection: keep-alive
>>> content-length: 60
>>> content-type: application/json; charset=utf-8
>>> date: Fri, 01 Jun 2018 00:34:58 GMT
>>> server: Cowboy
>>> vary: accept-encoding
>>> via: 1.1 vegur
>>>
>>> {"statusCode":404,"error":"Not Found","message":"Not Found"}

ledger client callback: clientP=true errP=true resultP=false delayTime=undefined
ledger client error(1): {}
Error: HTTP response 404 for POST /v2/batch/surveyor
    at request.request (/usr/lib/brave/resources/app.asar/app/browser/api/ledger.js:1617:9)
    at Function.defaultSession.webRequest.fetch (/usr/lib/brave/resources/app.asar/js/lib/request.js:75:5)

Expected result:

Contribution/Reconcilement should work under Linux without any issues.

Reproduces how often:

100% reproducible using the above STR.

Brave Version

about:brave info:

Brave: 0.22.724 
V8: 6.6.346.32 
rev: 1f07e939c72de545bb7a402dad57ce0f576c2261 
Muon: 6.0.12 
OS Release: 4.13.0-43-generic 
Update Channel: Release 
OS Architecture: x64 
OS Platform: Linux 
Node.js: 7.9.0 
Brave Sync: v1.4.2 
libchromiumcontent: 66.0.3359.170

Reproducible on current live release:

Haven't tried on it on the release version of Brave but I'm assuming this is due to changes that are being added for the 0.22.x Release 5 release.

Additional Information

@evq mentioned that the URL should be

  • POST https://ledger-staging.mercury.basicattentiontoken.org/v2/batch/surveyor/voting

and NOT:

  • POST https://ledger-staging.mercury.basicattentiontoken.org/v2/batch/surveyor

CCing @NejcZdovc & @evq

@NejcZdovc
Copy link
Contributor

@kjozwiak this probably happens because we have bat-client version ready for this new endpoint. This new version is not pulled into bl yet, but apparently it was pulled when doing linux build

@kjozwiak
Copy link
Member Author

kjozwiak commented Jun 1, 2018

@NejcZdovc gotcha, makes sense 👍 Can we get this fixed by tomorrow morning? This basically blocks Linux QAing as you can't contribute/reconcile, which means we can't verify a lot of the fixed issues that require a successful contribution/reconcilement.

@NejcZdovc
Copy link
Contributor

server endpoint added brave-intl/bat-ledger#306

this new version of bat-client will fix discrepancy brave-intl/bat-client#83

@NejcZdovc
Copy link
Contributor

should be fixed with the new build

@kjozwiak
Copy link
Member Author

kjozwiak commented Jun 1, 2018

Verified on Mint 18.3 x64 & Ubuntu 18.04 x64 using the following build:

  • 0.22.725 e6dd17f
  • muon: 6.0.12
  • libchromiumcontent: 66.0.3359.170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.