New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771175 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Oct 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

onBeforeNavigate has bad timestamp compared to onBeforeRequest

Reported by nn1436...@gmail.com, Oct 3 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

Steps to reproduce the problem:
There is no on demand reproduction but what we see is that onBeforeNavigate has timestamp much greater than onBeforeRequest and even bigger than Date.now() in page after page is loaded.

What is the expected behavior?
onBeforeNavigate has more or less same timestamp as onBeforeRequest and greater than page loaded timestamp.

What went wrong?
Timestamp is invalid.
As a workaround I am thinking to use onBeforeRequest timestamp as more accurate.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 27.0 r0
 

Comment 1 by woxxom@gmail.com, Oct 3 2017

This is working as intended according to the documentation:

https://developer.chrome.com/extensions/webNavigation#timestamps

>It's important to note that some technical oddities in the OS's handling of distinct Chrome processes can cause the clock to be skewed between the browser itself and extension processes. That means that WebNavigation's events' timeStamp property is only guaranteed to be internally consistent. Comparing one event to another event will give you the correct offset between them, but comparing them to the current time inside the extension (via (new Date()).getTime(), for instance) might give unexpected results.

https://developer.chrome.com/extensions/webRequest#timestamps

>The timestamp property of web request events is only guaranteed to be internally consistent. Comparing one event to another event will give you the correct offset between them, but comparing them to the current time inside the extension (via (new Date()).getTime(), for instance) might give unexpected results.


Thanks.
Any explanation why WebRequest has always correct timestamp and WebNavigation doesn’t and even not consistent with WebRequest while both are running in background script.
Cc: sc00335...@techmahindra.com
Components: Platform>Extensions
Labels: Triaged-ET TE-NeedsTriageHelp Needs-Triage-M61
This issue seems to be out of TE-scope. Hence, adding label TE-NeedsTriageHelp for further investigation from dev team.

Comment 4 by nn1436...@gmail.com, Oct 19 2017

After more extensive tests the conclusion is that both onBeforeRequest and onBeforeNavigate are fired with late timestamp almost 1.3 seconds difference !
For instance user navigated at 12:00:00.000 and timestamp of event is 12:00:01.300 .
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 19

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment