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

SKUs: First credential refresh after upgrade to current nightly fails #35158

Closed
evq opened this issue Jan 5, 2024 · 9 comments · Fixed by brave/brave-core#21505
Closed

SKUs: First credential refresh after upgrade to current nightly fails #35158

evq opened this issue Jan 5, 2024 · 9 comments · Fixed by brave/brave-core#21505

Comments

@evq
Copy link
Member

evq commented Jan 5, 2024

The first automatic refresh after upgrading to current nightly (1.63.x) is likely to fail in the case that credentials were locally generated in an older version since they would be persisted without a request_id parameter. Currently if request_id is not set it is backfilled with a random value, instead it should backfill to the item_id to match server behavior.

Steps to Reproduce

  1. Purchase Premium Leo on older nightly ( say 1.62.x to be safe )
  2. Wait three days to be prompted to refresh credentials
  3. Upgrade to current nightly
  4. Attempt to refresh credentials, likely to fail

Actual result:

Credential refresh fails / may take several tries to succeed.

Expected result:

Credential refresh should succeed.

Reproduces how often:

Desktop Brave version:

Android Device details:

  • Install type (ARM, x86):
  • Device type (Phone, Tablet, Phablet):
  • Android version:

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the nightly channel?

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Miscellaneous Information:

@stephendonner
Copy link

cc @MadhaviSeelam

@stephendonner stephendonner added premium All issues related to Brave Premium feature/SKUs labels Jan 11, 2024
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Jan 31, 2024
@stephendonner
Copy link

While testing/trying to verify this, I believe I hit #35742.

@stephendonner
Copy link

While testing/trying to verify this, I believe I hit #35742.

After further investigation with @evq, this is more-probably likely brave-intl/bat-go#2281 related.

@stephendonner stephendonner added QA/Blocked and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Feb 1, 2024
@stephendonner
Copy link

While testing/trying to verify this, I believe I hit #35742.

After further investigation with @evq, this is more-probably likely brave-intl/bat-go#2281 related.

And after that landed, we had brave-intl/bat-go#2331 😉

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue and removed QA/Blocked QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Feb 6, 2024
@Uni-verse Uni-verse added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Feb 8, 2024
@MadhaviSeelam
Copy link

MadhaviSeelam commented Feb 9, 2024

Verification PASSED using

Brave | 1.63.149 Chromium: 121.0.6167.164 (Official Build) beta (64-bit)
-- | --
Revision | 16509c04a66afcc00d180c0b62a887b9fc4776a2
OS | Windows 11 Version 23H2 (Build 22631.3085)

Steps:

  1. installed https://github.com/brave/brave-browser/releases/tag/v1.62.161
  2. launched using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected] into the textfield and clicked Get login link
  6. clicked on the Log in to Brave link in the resulting email
  7. clicked on Browse plans
  8. clicked on Buy now for Leo Premium
  9. completed checkout using test Stripe credentials
  10. ensured working Premium credentials
  11. steps 1-10 were completed a week prior and confirmed the Brave account session has expired has shown
  12. closed Brave
  13. installed 1.63.149
  14. renamed Brave-Browser to Brave-Browser-Beta
  15. relaunched Brave using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  16. clicked Leo and Brave account session has expired still shown
  17. clicked Refresh Leo button

Confirmed the Brave account session has expired no longer shown

example example example example example example example
Screenshot leo3brave35742rel Screenshot leo3brave35742rel Screenshot leo3brave35742rel Screenshot leo3brave35742rel Screen Shot 2024-01-31 at 1 59 02 PM Screen Shot 2024-01-31 at 1 59 02 PM Screen Shot 2024-01-31 at 1 59 02 PM

@MadhaviSeelam MadhaviSeelam added QA Pass-Win64 and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Feb 9, 2024
@stephendonner
Copy link

Verified PASSED using

Brave | 1.63.154 Chromium: 121.0.6167.184 (Official Build) beta (x86_64)
-- | --
Revision | f35267209b18bcda22c64916148c654e7d5b19ca
OS | macOS Version 11.7.10 (Build 20G1427)

Steps:

  1. installed https://github.com/brave/brave-browser/releases/tag/v1.62.165
  2. launched using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected] (this was pre-seeded with a Leo Premium subscription purchased in preparation for this issue, over 5 days ago) into the textfield and clicked Get login link
  6. clicked on the Log in to Brave link in the resulting email
  7. clicked on Refresh Leo
  8. confirmed current Leo Premium subscription showed with Your Brave account session has expired.. messaging
  9. shut down Brave
  10. relaunched Brave using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  11. confirmed Your Brave account session has expired... messaging, along with Premium status
  12. shut down Brave
  13. installed 1.63.139
  14. renamed Brave-Browser-Nightly to Brave-Browser-Beta
  15. relaunched Brave using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  16. clicked on Leo in the sidebar
  17. confirmed Premium badging/status
  18. confirmed no Your Brave account session... message

Confirmed otherwise-expired session credentials (from before) were automatically renewed after restarting using 1.63.134 (without a button or needing to Refresh Leo)

example example example example example example example
Screen Shot 2024-02-14 at 5 14 46 PM Screen Shot 2024-02-14 at 5 22 47 PM Screen Shot 2024-02-14 at 5 26 01 PM Screen Shot 2024-02-14 at 5 26 06 PM Screen Shot 2024-02-14 at 5 26 44 PM Screen Shot 2024-02-14 at 5 27 21 PM Screen Shot 2024-02-14 at 5 27 27 PM
example example example example example example example
Screen Shot 2024-02-14 at 5 27 38 PM Screen Shot 2024-02-14 at 5 28 20 PM Screen Shot 2024-02-14 at 5 28 36 PM Screen Shot 2024-02-14 at 5 28 47 PM Screen Shot 2024-02-14 at 5 35 35 PM Screen Shot 2024-02-14 at 5 35 42 PM Screen Shot 2024-02-14 at 5 35 47 PM

@stephendonner
Copy link

stephendonner commented Feb 15, 2024

Verification PASSED using

Brave	1.63.157 Chromium: 122.0.6261.43 (Official Build) (64-bit) 
Revision	5fbb7c60cc44e15a910a39a349e632f1b904c58e
OS	Linux

Steps:

  1. installed https://github.com/brave/brave-browser/releases/tag/v1.62.165
  2. launched using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  3. loaded account.bravesoftware.com
  4. entered basic-auth credentials
  5. entered [email protected] (this was pre-seeded with a Leo Premium subscription purchased in preparation for this issue, over 5 days ago) into the textfield and clicked Get login link
  6. clicked on the Log in to Brave link in the resulting email
  7. clicked on Refresh Leo
  8. confirmed current Leo Premium subscription showed with Your Brave account session has expired.. messaging
  9. shut down Brave
  10. relaunched Brave using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  11. confirmed Your Brave account session has expired... messaging, along with Premium status
  12. shut down Brave
  13. installed 1.63.139
  14. relaunched Brave using --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev --enable-logging=stderr --v=2
  15. clicked on Leo in the sidebar
  16. confirmed Premium badging/status
  17. confirmed no Your Brave account session... message

Initial setup:

Screen Shot 2024-02-15 at 10 25 52 AM
example example example example example example
Screen Shot 2024-02-20 at 3 06 18 PM Screen Shot 2024-02-20 at 3 06 42 PM Screen Shot 2024-02-20 at 3 07 30 PM Screen Shot 2024-02-20 at 3 07 40 PM Screen Shot 2024-02-20 at 3 08 55 PM Screen Shot 2024-02-20 at 3 09 31 PM

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Feb 15, 2024
@Uni-verse
Copy link
Contributor

Verified on Samsung Galaxy Tab S7 using version:

Brave	1.63.161 Chromium: 122.0.6261.57 (Official Build) (64-bit) 
Revision	37b02b4a373f40114e70cc034e491bcc8380f23a
OS	Android 13; Build/TP1A.220624.014; 33; REL
  • Ensured first credential refresh is successful
Example Example Example
Screenshot 2024-02-22 at 11 59 24 AM Screenshot 2024-02-22 at 11 59 34 AM Screenshot 2024-02-22 at 12 01 38 PM

@Uni-verse
Copy link
Contributor

Verified on Samsung Galaxy S21 using version:

Brave	1.63.161 Chromium: 122.0.6261.57 (Official Build) (64-bit) 
Revision	37b02b4a373f40114e70cc034e491bcc8380f23a
OS	Android 13; Build/TP1A.220624.014; 33; REL
  • Ensured first credential refresh is successful
Example Example Example
Screenshot 2024-02-22 at 12 18 12 PM Screenshot 2024-02-22 at 12 18 27 PM Screenshot 2024-02-22 at 12 18 58 PM

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