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

Issue 696358 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

FrameResource.lastModified is null if server didn't return Last-Modified header

Reported by fastest...@gmail.com, Feb 26 2017

Issue description

Steps to reproduce the problem:
1. Load http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
2. Call Page.getResourceTree
3. Observe that lastModified on that resource is null

What is the expected behavior?
I expect it to be undefined or 0.

What went wrong?
null is returned which isn't a "number" and breaks statically typed languages interacting with the debugging protocol

Did this work before? N/A 

Chrome version: 58.0.3018.3  Channel: dev

 
Labels: Needs-Triage-M58
Cc: sureshkumari@chromium.org
Labels: Needs-Feedback
Tested the issue on Ubuntu 14.04 using chrome version 58.0.3018.3 with below steps

1. navigated to provided URL and saved the file in js format.
2. Loaded the js file and typed the "Page.getResourceTree"command in console
3. Got the following error "Uncaught ReferenceError: Page is not defined" 

Could you please let us know any steps i have missed while reproducing the scenario.

Thank You...


Comment 3 Deleted

Labels: Proj-Headless
#2: This is about the DevTools command - when used in headless mode.
Which DevTools bindings are you using? C++ or Javascript? Which page are you navigating to -- this looks like just a standalone js file?

In any case, FrameResource.lastModified is an optional field, so the bindings should make it clear that it's not there when the server didn't provide one.
I'm using the Javascript bindings and yeah navigating to that page made it easy to expose the issue but actually I'm just going to any page with that script on it. It's an internal page so I can't really share but here's an example: http://gobin.io/YRpy that page loads http://pagead2.googlesyndication.com/pagead/show_ads.js that doesn't send a Last-Modified header.

Ideally the lastModified would be undefined or 0.
Cc: lushnikov@chromium.org
@skyostil: are these your js bindings? i don't think we could have passed null through our backend codegen.

Btw, as per our code, it is not optional, but rather 0-able. + @lushnikov to fix the protocol file and document behavior.
Owner: skyos...@chromium.org
Status: Assigned (was: Unconfirmed)
Hmm, we (headless team) don't provide Javascript DevTools bindings so I'm not sure what we're talking about here :) Do you mean https://github.com/cyrus-and/chrome-remote-interface? I know those bindings do very little validation.
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22e8735948a7c60d393250be79c9959d218faafe

commit 22e8735948a7c60d393250be79c9959d218faafe
Author: lushnikov <lushnikov@chromium.org>
Date: Fri Mar 03 05:25:35 2017

DevTools: fix FrameResource.lastModified to be optional when not present

This patch fixes FrameResource.lastModified to be optional when not
returned by server.

BUG= 696358 

Review-Url: https://codereview.chromium.org/2727393002
Cr-Commit-Position: refs/heads/master@{#454516}

[modify] https://crrev.com/22e8735948a7c60d393250be79c9959d218faafe/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Status: Fixed (was: Assigned)
Hopefully the patch fixes the issue.

Sign in to add a comment