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

Assertion on startup when using old ads history JSON data #5623

Closed
emerick opened this issue Aug 12, 2019 · 3 comments · Fixed by brave/brave-core#3152
Closed

Assertion on startup when using old ads history JSON data #5623

emerick opened this issue Aug 12, 2019 · 3 comments · Fixed by brave/brave-core#3152

Comments

@emerick
Copy link
Contributor

emerick commented Aug 12, 2019

@tmancey mentioned that the ads history related changes are throwing an assertion with his profile due to a JSON-related problem. Upon investigating, noticed that the old ads_shown_history format was an array of timestamps (vs. the new format which is an array of objects). Unfortunately, document.Parse wasn't returning an error and instead a later call to HasMember was asserting.

Spoke with @tmancey and we decided to just look explicitly for a uint64_t and, if found, move on to the next member (as it was always expected that a user's ad history would reset with this upgrade anyway).

@btlechowski
Copy link

@emerick This issue is set to QA/Blocked. I am not sure why. If it is something that can not be tested by QA, just add QA/No label.

@emerick emerick added QA/Yes and removed QA/Blocked labels Sep 25, 2019
@emerick
Copy link
Contributor Author

emerick commented Sep 25, 2019

@btlechowski Sorry, must have hit the wrong tag - fixed now!

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Sep 26, 2019

Verification passed on

Brave 0.69.129 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Windows 10 OS Version 1803 (Build 17134.1006)

old profile which has ads_shown_history
image

Launched old profile and viewed an ad in new launch removed old profile ads_shown_history
image

Open an old profile is removing Ads panel. Unable to test ads panel ads viewed data in the panel due to #6148.

image

Verification passed on

Brave 0.69.131 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Ubuntu 18.04 LTS

0.68.x profile which has ads_shown_history after viewing 1 ad
Verified ads_shown_history is present
image
Verified 1 ad viewed in brave://rewards
image

Upgraded Brave to 0.69.x and viewed an ad.
Verified ads_shown_history was removed and not assertion is thrown
image
Verified 2 ads viewed in brave://rewards
image

Verified passed with

Brave 0.69.131 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS macOS Version 10.13.6 (Build 17G5019)

Screen Shot 2019-10-02 at 10 40 32 AM

Upgraded to 0.69.x:
Screen Shot 2019-10-02 at 10 44 13 AM

Verified Ads panel shows same info from 0.68.x:
Screen Shot 2019-10-02 at 10 44 55 AM

When an Ad was served after upgrade, this is how adsShownHistory was populated:
Screen Shot 2019-10-02 at 10 47 06 AM

Ads panel incremented as expected:
Screen Shot 2019-10-02 at 10 47 58 AM

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