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

Issue 766956 link

Starred by 4 users

Issue metadata

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



Sign in to add a comment

Headless Chrome is capturing only white screenshot for intranet sites.

Reported by snpanigr...@gmail.com, Sep 20 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36

Example URL:
https://pfo-18422.dev.upoint.hewitt.com/web/hmorg/client-tooling-login

Steps to reproduce the problem:
package demo1;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class Headless {

public static void main(String[] args) throws InterruptedException, IOException
{ 

	System.setProperty("webdriver.chrome.driver", "C:\\MyWorkspace\\Demo\\chromedriver.exe");
	ChromeOptions chromeOptions = new ChromeOptions();
	chromeOptions.addArguments("--headless");
	chromeOptions.addArguments("window-size=1280,1696");
	WebDriver driver = new ChromeDriver(chromeOptions);
	driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
	driver.get("https://pfo-18422.dev.upoint.hewitt.com/web/hmorg/client-tooling-login");
	Thread.sleep(10000);
	System.out.println(driver.getTitle());

File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenshotFile, new File("C:\\Users\\A0705286\\Desktop\\ScreenShot\\first.bmp"));

What is the expected behavior?
It should capture the page screenshot exactly same as it appears.

What went wrong?
It is capturing only white screenshot.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.91  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

I was automating my company's internal site with headless chrome. But it is not capturing screenshot properly.
Same code is working fine with headless firefox and chrome regular mode.
 

Comment 1 by kochi@chromium.org, Sep 20 2017

Components: -Blink Internals>Headless
Routing to headless chrome team for confirm/triage.
Labels: Needs-Triage-M61
This sounds like it could be related to headless not handling properly a network cert error (e.g., https://bugs.chromium.org/p/chromium/issues/detail?id=757181)

Could you indicate if you are getting any errors in the console?
Labels: Needs-Feedback
In console, its not displaying any error.
same code is working fine with headless firefox.

Project Member

Comment 6 by sheriffbot@chromium.org, Oct 3 2017

Cc: dvallet@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
can you add --enable-logging and perhaps --v=99 as arguments

I'm trying to see if there's any SSL or certificate error being logged
hii Dvallet

As per your suggestion,i added those arguments.
Now getting below logs.


Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a) on port 48798
Only local connections are allowed.
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Oct 03, 2017 11:01:33 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS

401 - Unauthorized: Access is denied due to invalid credentials.
Project Member

Comment 9 by sheriffbot@chromium.org, Oct 3 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label.

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

Actually that logs are coming for another URL.

After adding those flags still its not displaying any logs.
Thanks for digging into it. 

I still feel like it could be this issue:  https://crbug.com/741872 , but please let me know if you feel that's not the case
Hi

Thanks for your quick reply..
I am not sure.But that may be the cause..
Let's check after that issue got fixed.
Cc: irisu@chromium.org
CC'ing  irisu@chromium.org from  issue 741872  for more info.

Thanks.
Cc: kkaluri@chromium.org
Labels: TE-NeedsTriageHelp
Unable to triage this issue from TE end, since it is related to selenium automation tool, hence adding TE-NeedsTriageHelp for further triage.
Project Member

Comment 15 by sheriffbot@chromium.org, Oct 11

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