New issue
Advanced search Search tips

Issue 828640 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Segmentation fault on wrong json command for method Page.printToPDF

Reported by puretech...@gmail.com, Apr 3 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Steps to reproduce the problem:
1. start headless chromium:
chromium  --disable-gpu --disable-extensions  --remote-debugging-port=9222 --headless

2. get web socket debugger url:
curl http://localhost:9222/json

3. connect to web socket with your favorite client 

4. send commands:
{"id":1,"method":"Page.navigate","params":{"url":"http://example.com/"}}
{"id":2,"method":"Page.printToPDF"}

What is the expected behavior?
Error message is send over socket. 

What went wrong?
Segmentation fault (core dumped)

Did this work before? N/A 

Chrome version: Version 65.0.3325.181 (Official Build) Arch Linux (64-bit)  Channel: stable
OS Version: 4.15.13-1-ARCH #1 SMP PREEMPT
Flash Version: 

Application works fine when empty object is send as params: "params":{} but IMHO Segmentation fault is not a proper way and indicates a bug.

It should work like for example Page.navigate, where error is send:
{"id":1,"method":"Page.navigate"}
{"error":{"code":-32602,"message":"Invalid parameters","data":"url: string value expected"},"id":1}

All parameters for Page.printToPDF are optional so maybe some validation is skipped.
 
Components: Internals>Headless
Labels: Proj-Headless Triaged-ET
Status: Fixed (was: Unconfirmed)

Sign in to add a comment