Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Error: "PrintToPDF is not implemented" #146

Closed
seangransee opened this issue Aug 2, 2017 · 5 comments · May be fixed by #192
Closed

Error: "PrintToPDF is not implemented" #146

seangransee opened this issue Aug 2, 2017 · 5 comments · May be fixed by #192

Comments

@seangransee
Copy link
Contributor

As mentioned in #84 (comment), the error "PrintToPDF is not implemented" gets raised when trying to use the .pdf() method.

Everything worked fine when this feature was first implemented. It's possible that something else got merged into master in the past few days that's incompatible with the PDF feature (#84).

My best guess is that there's some incompatibility with chrome-launcher (#120).

@adieuadieu
Copy link
Collaborator

adieuadieu commented Aug 2, 2017

Is the Chrome that chrome-launcher is launching the same version as what you were launching manually before? Have you tried running the browser first, and then trying to run .pdf() ?

edit: never mind. I have same issue using latest Canary.

@seangransee
Copy link
Contributor Author

Ah, you're right. When I run the headless browser first, it works fine.

According to the README:

By default, chromeless will start Chrome automatically and will default to the most recent version found on your system if there's multiple.

Is it possible that this isn't working correctly? I have Chrome 60 installed on my system, but the PDF feature isn't working unless I start chrome manually.

Closing this issue since the issue appears to be related to my system, not the library itself.

@adieuadieu
Copy link
Collaborator

adieuadieu commented Aug 2, 2017

Weird. Same behaviour here. In non-headless mode I get the PrintToPDF is not implemented error. In headless mode it works fine. Maybe an issue in Chrome itself—Or, it's possible this API is not available in non-headless mode. Unless someone beats me to it, I'll ask about it on headless-dev (please someone beat me to it 😉 ).

@willypt
Copy link

willypt commented Aug 6, 2017

[--disable-extensions]
is possibly active when chrome-launcher runs the headless chrome, pretty much disabling the PDF capability of Chrome.
That's why when being run with "heady" Chrome it runs

I've tried running my chrome using this command
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --disable-translate --disable-background-networking --safebrowsing-disable-auto-update --disable-sync --metrics-recording-only --disable-default-apps --no-first-run --remote-debugging-port=9222 --user-data-dir=/var/folders/n6/h3prs0p54db03sv1rms8klv40000gp/T/lighthouse.XXXXXXX.2S5cFhwC about:blank

And it seems it still can't pick up the PDF extension to do PrintToPDF command

@agarciagan
Copy link

I have managed to get it working lauinching Chrome with the --disable-extensions options
chrome --remote-debugging-port=9222 --disable-gpu --headless --disable-extensions

gorangajic added a commit to gorangajic/chromeless that referenced this issue Aug 7, 2017
gorangajic added a commit to gorangajic/chromeless that referenced this issue Aug 7, 2017
- fixes schickling#146 pdf only works in headless mode
- fixes schickling#184 Add chromePath and chromeFlags to ChromelessOptions
webpolis pushed a commit to webpolis/yb-chromeless that referenced this issue Oct 5, 2017
- fixes schickling#146 pdf only works in headless mode
- fixes schickling#184 Add chromePath and chromeFlags to ChromelessOptions
felixfbecker pushed a commit to gorangajic/chromeless that referenced this issue Jan 18, 2018
Fixes schickling#146 pdf only works in headless mode
Fixes schickling#184 Add chromePath and chromeFlags to ChromelessOptions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants