-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
SKUs environment should be configurable via brave://flags #20557
Comments
When one of option is selected except default, it's value is passed via --skus-env command line switch. fix brave/brave-browser#20557
Verified
Followed the steps to reproduce from the test plan at brave/brave-core#11894 (comment). Steps:
Verified
Followed the steps to reproduce from the test plan at brave/brave-core#11894 (comment). Steps:
|
This is apparently not available in Linux.
I see the same on my Ubuntu VM:
|
Confirmed with @bsclifton that #20557 (comment) is expected on Linux for now 👍🏻 |
Removed Please see revised test plan and re-check. |
QA-status update on this: I've started testing, but have run into two (related?) issues:
@evq has offered to help take a look; thread here: https://bravesoftware.slack.com/archives/C021S0FN3V1/p1645063771631899 Being honest and marking |
Still blocked, but by a new bug! Worked through 1) |
Updated test plan to mention just looking for |
Verified
|
Brave | 1.36.106 Chromium: 99.0.4844.45 (Official Build) (x86_64) |
---|---|
Revision | edbc0b8343c7b10fddb0e1b4efb280b0f6e38cab-refs/branch-heads/4844@{#788} |
OS | macOS Version 12.3 (Build 21E5222a) |
Steps:
- Fresh profile
- Visit
brave://flags/#skus-environment
- On Windows and macOS, there should be a value here (
Default
,production
,staging
,development
) and it should be configurable. Linux is not supported at this time - Enable
brave://flags/#skus-sdk
- set this new value (brave://flags/#skus-environment
) todevelopment
- Exit the browser. Start Brave via command line making sure to add logging arguments
--vmodule="*/skus/*"=1 --enable-logging=stderr
- Visit
https://account.brave.software
and log in (@bsclifton can help if basic auth is presented; creds are in 1PW4T or send a DM) - Once logged in, buy VPN
- You should see (in the console where you started Brave) lots of JSON and output from calls which include
refresh_order
Confirmed I was able to choose and purchase the Brave VPN Subscription
.
example | example | example |
---|---|---|
Also confirmed the call via debug logs to refresh_order
, below:
in skus::http::fetch with req.parts=Parts { method: GET, uri: https://payment.rewards.brave.software/v1/orders/fd546c79-fcbf-4b6e-86b6-21d46d7f1aed, version: HTTP/1.1, headers: {} }
in skus::sdk::orders::fetch_order with self=SDK order_id="fd546c79-fcbf-4b6e-86b6-21d46d7f1aed"
in skus::sdk::orders::refresh_order with self=SDK order_id="fd546c79-fcbf-4b6e-86b6-21d46d7f1aed"
[23487:259:0225/183920.112162:VERBOSE1:http.rs(181)] skus::http: recieved response, resp.parts: Parts { status: 200, version: HTTP/1.1, headers: {} }, resp.body: {
"allowedPaymentMethods": [
"stripe"
],
"createdAt": "2022-02-25T01:28:54.880453Z",
"currency": "USD",
"expiresAt": "2022-03-25T01:29:19.643192Z",
"id": "fd546c79-fcbf-4b6e-86b6-21d46d7f1aed",
"items": [
{
"createdAt": "2022-02-25T01:28:54.880453Z",
"credentialType": "time-limited",
"currency": "USD",
"description": "Brave Firewall + VPN",
"id": "c17ff71d-ed15-4b14-af17-bee1190afbe5",
"issuanceInterval": null,
"location": "vpn.brave.software",
<snip>
},
"orderId": "fd546c79-fcbf-4b6e-86b6-21d46d7f1aed",
"price": "9.99",
"quantity": 1,
"sku": "brave-firewall-vpn-premium",
<snip>
"status": "paid",
"totalPrice": "9.99",
"updatedAt": "2022-02-25T01:29:19.64124Z",
"validFor": 2419199999989529
}
Verified
|
Brave | 1.36.106 Chromium: 99.0.4844.45 (Official Build) (64-bit) |
---|---|
Revision | edbc0b8343c7b10fddb0e1b4efb280b0f6e38cab-refs/branch-heads/4844@{#788} |
OS | Windows 10 Version 21H2 (Build 19044.1566) |
Steps:
- Fresh profile
- Visit
brave://flags/#skus-environment
- On Windows and macOS, there should be a value here (
Default
,production
,staging
,development
) and it should be configurable. Linux is not supported at this time - Enable
brave://flags/#skus-sdk
- set this new value (brave://flags/#skus-environment
) todevelopment
- Exit the browser. Start Brave via command line making sure to add logging arguments
--vmodule="*/skus/*"=1 --enable-logging=stderr
- Visit
https://account.brave.software
and log in - Once logged in, buy VPN
- You should see (in the console where you started Brave) lots of JSON and output from calls which include
refresh_order
Confirmed I was able to choose and purchase the Brave VPN Subscription
(but not complete payment, due to #21314).
example | example | example |
---|---|---|
Also confirmed the call to refresh_order
in the logs:
in skus::sdk::orders::fetch_order with self=SDK order_id="7ba0d87b-cb67-44c9-967e-5a2d1d944a09"
in skus::sdk::orders::refresh_order with self=SDK order_id="7ba0d87b-cb67-44c9-967e-5a2d1d944a09"
[17168:12544:0227/162926.106:VERBOSE1:http.rs(181)] skus::http: recieved response, resp.parts: Parts { status: 200, version: HTTP/1.1, headers: {} }, resp.body: {
"allowedPaymentMethods": [
"stripe"
],
"createdAt": "2022-02-26T03:56:36.806886Z",
"currency": "USD",
"expiresAt": null,
"id": "7ba0d87b-cb67-44c9-967e-5a2d1d944a09",
"items": [
{
"createdAt": "2022-02-26T03:56:36.806886Z",
"credentialType": "time-limited",
"currency": "USD",
"description": "Brave Firewall + VPN",
"id": "c0697134-8b50-473a-9f10-ceb16ce7d9c1",
"issuanceInterval": null,
"location": "vpn.brave.software",
<snip>
"orderId": "7ba0d87b-cb67-44c9-967e-5a2d1d944a09",
"price": "9.99",
"quantity": 1,
"sku": "brave-firewall-vpn-premium",
<snip>
"status": "pending",
"totalPrice": "9.99",
"updatedAt": "2022-02-28T00:26:58.890252Z",
"validFor": 2419199999988986
}
Verified Steps:
Confirmed I was able to choose and purchase the Brave VPN Subscription (but not complete payment, due to #21314).
Confirmed the call to
|
Test plan
brave://flags/#skus-environment
Default
,production
,staging
,development
) and it should be configurable. Linux is not supported at this timebrave://flags/#skus-sdk
- set this new value (brave://flags/#skus-environment
) todevelopment
--vmodule="*/skus/*"=1 --enable-logging=stderr
https://account.brave.software
and log in (@bsclifton can help if basic auth is presented; creds are in 1PW4T or send a DM)refresh_order
There may still be environment issues preventing the credentials from being issued... but as long as the
refresh_order
has details, that means the environment specific part worked 😄Description
We already have brave://flags entries for both VPN and SKU (dependent on each other for Desktop)
But at the moment, environment is defaulting to
production
for an official build (otherwise, it usesdevelopment
).There is a command line flag
--skus-env
which accepts the following values:production
staging
development
It would be great to expose this in brave://flags. If
Default
, we can default to production. But if overridden, it can use the chosen environment.The text was updated successfully, but these errors were encountered: