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

Ledger timer resetting #3696

Closed
msp1111111 opened this issue Sep 3, 2016 · 30 comments
Closed

Ledger timer resetting #3696

msp1111111 opened this issue Sep 3, 2016 · 30 comments

Comments

@msp1111111
Copy link

My ledger timer resets every once in a while, so some of the time I've spent on certain sites is gone. Also, some of the sites that I marked to not include are back. I don't see an obvious pattern to the sites that have been reset and the sites that are not.
Win7
ver 0.11.6

Did you search for similar issues before submitting this one?

Describe the issue you encountered:

Expected behavior:

  • Platform (Win7, 8, 10? macOS? Linux distro?):
  • Brave Version:
  • Steps to reproduce:
    1.
    2.
    3.
  • Screenshot if needed:
  • Any related issues:
@da2x
Copy link
Contributor

da2x commented Sep 5, 2016

I can confirm this issue. (Have been screenshotting my ledger to keep an eye on changes.)

I’ve only seen it happen to websites with less than 1 minute on record. Not sure if that is significant. It started happening right after midnight local time (CEST). Some of the sites I’d visited the previous day started dropping out on subsequent visits. No clear pattern.

Update: It seems to be related to aborting page loads, or navigating away from a page very quickly after it has been loaded.
Update 2: It is now happening to websites with more than 1 minute on record.
Update 3: Sites disappear on the second visit and don’t reappear even if you click on links to other pages on that site. You have to close that tab and reopen the site in a new tab to start up the ledger timer again.
Update 4: Almost all sites are tracked with 1 visit regardless of how many times I visit them or how many pages I view on them. Some sites go all the vay up to 2 visits, but no site has ever been tracked higher.

@msp1111111
Copy link
Author

For me, there is one site that I visit a lot. It should have a few hours on the timer, but right now it's showing 48 seconds. There is another site that I visited once a couple days ago, but then put my computer to sleep with the site open for a couple hours. That one is still there, showing 2h 23min.

@mrose17 mrose17 added this to the 0.12.1dev milestone Sep 5, 2016
@mrose17
Copy link
Member

mrose17 commented Sep 5, 2016

@msp1111111 & @Aeyoun -- hmmm. i think i may have tracked that down. when we push a new beta, is it OK to point you both at it to try it out? thanks!

@da2x
Copy link
Contributor

da2x commented Sep 6, 2016

I’m glad to hear that. Hope you’ll release a new beta soon.

I’m game for a 64-bit RPM build. Can dig up a Mac or Win PC if need be, but it will get less testing.

@mrose17
Copy link
Member

mrose17 commented Sep 6, 2016

we have a linux build too!

@mrose17 mrose17 self-assigned this Sep 6, 2016
@mrose17
Copy link
Member

mrose17 commented Sep 6, 2016

@Aeyoun & @msp1111111 - can you check out the builds on https://github.com/brave/browser-laptop/releases/tag/0.12.0dev and see if you are still seeing this issue?

@Aeyoun - can you also see if #3716 is addressed by this as well?

thanks and good luck!

@msp1111111
Copy link
Author

Yes, thanks for the super-quick response!

Date: Tue, 6 Sep 2016 12:32:20 -0700
From: notifications@github.com
To: browser-laptop@noreply.github.com
CC: mspmusic@hotmail.com; mention@noreply.github.com
Subject: Re: [brave/browser-laptop] Ledger timer resetting (#3696)

@Aeyoun & @msp1111111 - can you check out the builds on https://github.com/brave/browser-laptop/releases/tag/0.12.0dev and see if you are still seeing this issue?

@Aeyoun - can you also see if #3716 is addressed by this as well?

thanks and good luck!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@mrose17
Copy link
Member

mrose17 commented Sep 6, 2016

@msp1111111 - sorry, couldn't quite parse your note. just checking:

are you able to run the new release?
if so, does it fix this issue?

thanks (and sorry for the confusion)

@da2x
Copy link
Contributor

da2x commented Sep 6, 2016

Oh, look at that. I’ve seen mentions of favicons in the code, but now they show up on the ledger list too. It also counts +1 view per page view, didn’t do that before (wasn’t sure it was expected to either!)

I don’t like that it’s counting every time I switch back and forth between two tabs a “view”. “A pageview” in every other context is one loaded page, and not literally how many times the loaded page is displayed in a tab without a round-trip to a server. Maybe I’m old fashioned that way.

#3716 seems to be resolved as well.

@mrose17
Copy link
Member

mrose17 commented Sep 6, 2016

@Aeyoun - thanks. i am sensitive to your issue about whether switch tabs back and forth should count as a view or not (though i suspect we agree that the timer should keep running). let me look into that...

@alexwykoff
Copy link
Contributor

alexwykoff commented Sep 6, 2016

Please make sure to add a concise outline of the steps for QA to confirm any changes. Thanks!

@msp1111111
Copy link
Author

I have just a few moments ago updated to 0.12.0. I'll keep an eye on the site timer and see if anything gets reset again.
Thanks!

Date: Tue, 6 Sep 2016 15:00:55 -0700
From: notifications@github.com
To: browser-laptop@noreply.github.com
CC: mspmusic@hotmail.com; mention@noreply.github.com
Subject: Re: [brave/browser-laptop] Ledger timer resetting (#3696)

@msp1111111 - sorry, couldn't quite parse your note. just checking:

are you able to run the new release?

if so, does it fix this issue?

thanks (and sorry for the confusion)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@da2x
Copy link
Contributor

da2x commented Sep 6, 2016

@Aeyoun - thanks. i am sensitive to your issue about whether switch tabs back and forth should count as a view or not (though i suspect we agree that the timer should keep running). let me look into that...

@mrose17 , the timer should run when the tab is in the foreground, and the view count counter should only increment once after the page has loaded when the tab becomes focused for the first time.

I.e. load Site 1 in Tab A, and Site 2 in Tab 2. That should be one view per tab regardless of how often I switch between them. Only count views on load. Background tabs should only be counted as a view when/if they’re brought to the foreground. (I may close a background tab without ever activating it if I change my mind about reading it.) The same goes for session restores during start-up, I think. Don’t count tabs from a restored session as an additional view.

How people think of this stuff may be different from person to person, but the above seems logical to me and how I use the browser.

@da2x
Copy link
Contributor

da2x commented Sep 7, 2016

Hm, noticing a problem but not sure if it’s the same, new, or different issue.

So I have 29 sec on record and 1 visit for NPR.org. When I visit NPR.org and wait a 50 seconds, and then go back to check the ledger it will still display 29 sec and 1 visit. I can restart Brave and try again, but NPR.org remains listed with just that one visit of 29 seconds regardless of how many times I visit them and how long I stay. LEDGER_PUBLISHER_DEBUG output provided here.

I’ve noticed the same issue with six other domains. The majority of websites seems to work now, however.

@msp1111111
Copy link
Author

As far as I can tell, the timer is working for me now correctly on the blogs that I visit. There is a video site, viki.com, that I watch entire hour-long episodes on and that doesn't time correctly. Perhaps the timer excludes media playing?

@mrose17
Copy link
Member

mrose17 commented Sep 7, 2016

@msp1111111 - thanks. i am able to watch a video on viki -- dramaworld -- and it looks like that it is being counted...

1

still investigating.

@mrose17
Copy link
Member

mrose17 commented Sep 7, 2016

also, just fyi: if you want to check to see if a URL is considered a publisher, go here and enter the URL.

@mrose17
Copy link
Member

mrose17 commented Sep 7, 2016

@msp1111111 - just a thought (that @bridiver can confirm). i believe that tabs have a maximum duration associated with them (akin to an inactivity timer).

so here's my question: did viki.com show up at all or just for 30s or something like that? thanks!

@bsclifton
Copy link
Member

bsclifton commented Sep 7, 2016

@msp1111111 can you set an environment variable to help collect more info?

We need to set: LEDGER_PUBLISHER_DEBUG=true

You probably already know how to set environment variables, but just in case:

  • Hit Windows key, type environment
  • Pick "Edit the system environment variables" from the list
  • Click the "Environment Variables" button
  • Under "System variables" click "New..." button
  • enter the variable (in this case, name=LEDGER_PUBLISHER_DEBUG, value=true)
  • close all instances of Brave, re-open (if it doesn't work, try a reboot)

Thanks 😄

@bridiver
Copy link
Collaborator

bridiver commented Sep 7, 2016

there is an idle timer that stops the clock if you lock your computer or have no mouse/keyboard activity for 15 minutes. The inactivity monitor applies to the entire OS, not just Brave

@mrose17
Copy link
Member

mrose17 commented Sep 7, 2016

@bridiver - so, we'd expect 15m to be the maximum unless the mouse is being moved?

@bridiver
Copy link
Collaborator

bridiver commented Sep 7, 2016

Yep, but we may want to increase that time if the page is displaying video and only stop the timer on screen lock

@mrose17
Copy link
Member

mrose17 commented Sep 7, 2016

@Aeyoun - thanks, so there is one very interesting thing going on here. when i go to that URL, my logging looks like this:

    locations[http://www.npr.org/2011/08/04/138719111/microstyle-marketing-slogans-for-the-self]={
      "timestamp": 1473286993249,
      "protocol": "http:",
      "publisher": "npr.org"
    } duration=895 msec

which indicates that the URL was recognized as being associated with a publisher. your logging doesn't show that. since (i know) that we haven't changed the status of NPR on the ledger, and since this shows that NPR is considered a publisher, the only explanation is that the javascript that does the publisher lookup is blowing up. we can check for that!

let's try an experiment: run your test again, do an 'inspect element' in that tab and look at the console. any errors there relating to pageInformation.js ?

if you see NOT a string as a console entry, that means that the code ran fine, but the ledger says it's not a publisher... sorry for the back-and-forth, thanks!

@msp1111111
Copy link
Author

@mrose17 I watched viki yesterday for about an hour total. The timer shows about 5 min. I believe the page count is correct, however.

@bsclifton I set that environment variable as you instructed, but am not sure how to access the log, sorry.

Also, just a thought -- viki shows their ads within their videos (which are blocked by Brave), not on the page in general, if that makes any difference.

@da2x
Copy link
Contributor

da2x commented Sep 7, 2016

I’ve seen the 15 minute idle timer, and haven’t said anything. I personally feel no more than 3–5 minuets inactivity of Brave (except when in fullscreen API for media playback) should stop the counter.

I feel like I have to actively open a new blank tab before going to the bathroom or change to another program. Stressful micro-management that I really shouldn’t have to deal with.

(I’ve worked with and made several browser extensions that tracker users activity per-domain in the past. User feedback was always that the timer should stop after no more than 90 seconds of tab inactivity.)

@da2x
Copy link
Contributor

da2x commented Sep 7, 2016

let's try an experiment: run your test again, do an 'inspect element' in that tab and look at the console. any errors there relating to pageInformation.js ?

No such error. pageInformation.js doesn’t show up in the devtools:source tab either, but it doesn’t for any other tab either. Assuming it’s been hidden or something.

@mrose17
Copy link
Member

mrose17 commented Sep 8, 2016

well, i don't know why "it works for me, but not for you". the "tell" is the lack of publisher information in the logging. i'll add some more logging to the next version and perhaps we can get a better understanding.

@mrose17
Copy link
Member

mrose17 commented Sep 8, 2016

i like the idea of 90s timer.

@bridiver
Copy link
Collaborator

bridiver commented Sep 8, 2016

the 15 minute timer only applies if Brave is in the foreground so it's basically a Brave activity timer. We're not set on 15 minutes either, it just seemed like a reasonable place to start

@mrose17 mrose17 modified the milestones: 0.12.2dev, 0.12.1dev Sep 8, 2016
@mrose17 mrose17 removed their assignment Sep 10, 2016
@bbondy bbondy modified the milestones: 0.12.3dev, 0.12.2dev Sep 17, 2016
@bbondy bbondy removed this from the 0.12.3dev milestone Sep 27, 2016
@mrose17 mrose17 added the bug label Oct 11, 2016
@mrose17 mrose17 self-assigned this Nov 29, 2016
@mrose17
Copy link
Member

mrose17 commented Jan 19, 2017

closed due to lack of focus.

@mrose17 mrose17 closed this as completed Jan 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants