New issue
Advanced search Search tips

Issue 809863 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Download throws exception in ChromeHeadless

Reported by aarumuga...@gmail.com, Feb 7 2018

Issue description

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

Steps to reproduce the problem:
Jasmine test cases to validate blob download fails in ChromeHeadless from latest version

downloadLink.download = fileName;
var dataUrl_1 = window.URL.createObjectURL(buffer);
downloadLink.href = dataUrl_1;
var event_1 = document.createEvent('MouseEvent');
event_1.initEvent('click', true, true);

What is the expected behavior?
It should work well

What went wrong?
Failed to create a temp dir at C:\Users\ARUMUG~1\AppData\Local\Temp\karma-87812328

Did this work before? Yes 63

Chrome version: 64.0.3282.140  Channel: stable
OS Version: 10.0
Flash Version: 

If this is security related exception, how to overcome this?
 
Sorry, i missed this statement

downloadLink.dispatchEvent(event_1);

which causes ChromeHeadless to crash in Karma
Labels: Needs-Triage-M64
Components: -Blink UI>Browser>Downloads Internals>Headless

Comment 4 by ad...@jabelone.com, Feb 8 2018

I'm experiencing what I think is a related issue. I'm using chromeless (via the aws lambda proxy) and started having weird timeouts recently. When I initiate a click event on a download link, the chromeless lambda proxy stops communicating with the headless chrome instance. Perhaps unrelated here, but chromeless stops responding for roughly 30 minutes then appears to "reset" and works normally again until a download is started.

The chromium binary is running in a Linux like environment inside an aws lambda instance. From what I can tell the chromium binary is the latest stable release. I ran a headless chrome session on my local machine (Ubuntu 17.10, Chrome 64.0.3282.140 (Official Build)) and got a segfault when the download link is clicked.

tldr; looks like this happens on linux too.
Cc: shaktisahu@chromium.org
Labels: OS-Linux
Owner: qin...@chromium.org
Status: Assigned (was: Unconfirmed)
It's not clear what the specific error here is. Can you post some logs and perhaps a more reduced test case?
Sample Test script:

var buffer = new Blob(['hello world']);
var downloadLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
downloadLink.download = 'sample.txt';
var dataUrl = window.URL.createObjectURL(buffer);
downloadLink.href = dataUrl;
var clickEvent = document.createEvent('MouseEvent');
clickEvent.initEvent('click', true, true);
downloadLink.dispatchEvent(clickEvent);
setTimeout(function () {
    window.URL.revokeObjectURL(dataUrl);
    dataUrl = undefined;
});

When running this test script using karma, below error thrown in ChromeHeadless v64

Failed to create a temp dir at C:\Users\ARUMUG~1\AppData\Local\Temp\karma-87812328

Whereas there was no issues in v63
Status: Unconfirmed (was: Assigned)
That error message seems to be coming from Karma. Maybe a problem similar to this? https://github.com/karma-runner/karma-opera-launcher/issues/10
Labels: Needs-Feedback
With all configurations intact, the issue reproduces in chrome v64 but not in v63 (downgraded the chrome version in same machine to get this worked). I am not sure how this problem is related to Karma. Anyways thank you for the help.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 5 2018

Cc: dtrainor@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Pri-2 Pri-3
Status: Assigned (was: Unconfirmed)

Sign in to add a comment