Comments (10)
Just releases 1.11.0
that should resolve that issue, let me know if you still have any issues
from chrome-headless-render-pdf.
@Szpadel
Hello, I think that I found the solution.
It seems that CDP can't connect to debug port of chrome without any starter URL. So if you add any URL at spawn time, it will be ok.
you can fix with the code below. I have chosen about:blank as URL.
const commandLineOptions = [
'--headless',
--remote-debugging-port=${this.port}
,
'--disable-gpu',
...this.options.chromeOptions,
'about:blank'
];
@AlexAltea if you want quick fix. just copy the uncompiled index.js from node_molues\chrome-headless-render-pdf\index.js to node_molues\chrome-headless-render-pdf\dist folder. And add ,'about:blank' to commandLineOptions in the file like above.
Note: my fix is just tested under ubuntu.
from chrome-headless-render-pdf.
@fethigurcan you could also pass it in chromeOptions
:)
That way you don't need to alter source code
from chrome-headless-render-pdf.
Updating to Chrome v110.0.5481.78 (Official Build) (64-bit) still does not fix the issue.
from chrome-headless-render-pdf.
Temporary workaround: Use Microsoft Edge to render documents
$ chrome-headless-render-pdf --url http://google.com --pdf test.pdf --chrome-binary 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
Using C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Waiting for chrome to became available
Chrome port open!
Connected to HeadlessEdg/109.0.1518.70, protocol 1.3
Opening http://google.com
Wait for load took 170ms
Wait for js execution took 1ms
Wait for animations took 102ms
Saved test.pdf
from chrome-headless-render-pdf.
Same problem has started yesterday. I also tested on ubuntu beside the windows. same sympthoms.
Edge workaround does not work for me :(
@AlexAltea did you find a solution?
from chrome-headless-render-pdf.
I'll try to reproduce this on Monday
from chrome-headless-render-pdf.
@AlexAltea did you find a solution?
No I haven't. Currently my Edge version (which still works) is 109.0.1518.70 (Official build) (64-bit).
However, I'm getting update reminders so I will try to keep my computer/browser running until this issue is fixed.
Otherwise my invoicing system will break. 😄
I'll try to reproduce this on Monday
@Szpadel Thank you very much. Your library is really helpful.
from chrome-headless-render-pdf.
you are right. it is surely more simple workaround. thanks
the way that I dig the problem came to that solution though :))
from chrome-headless-render-pdf.
@Szpadel I'm on mentioned version 1.11.0
and still having this issue. Only on a small subset of hosts, even though they should be configured the same way, which is very interesting. They all use the same chromium version, same OS, same patch level of the OS, i cannot explain why this only happens on some hosts.
The hotfix adding --chrome-option=about:blank
seems to work though, so it seems as though this fix is maybe not released yet?
from chrome-headless-render-pdf.
Related Issues (20)
- Input/Output Issue
- leaflet maps are missing in the pdf HOT 1
- PDF is blank HOT 1
- CSS is ignored HOT 2
- How to set cookies using chrome-headless-render-pdf?
- How can I update the node version dependency? HOT 1
- --chromeBinary vs. --chrome-binary HOT 1
- Can't find Chrome on Ubuntu HOT 1
- Add support for custom page header and footer and page margins HOT 1
- In header-template background-image-url not loading HOT 1
- Multi pdf example not working HOT 1
- RenderPDF generateSinglePdf does not work in docker at times HOT 1
- Force Chrome to wait before PDF print HOT 4
- TypeError: net.createServer is not a function HOT 1
- Use an existing instance of Chromium HOT 2
- Please tag release version commit, add registry version button
- Question: does this support Chrome 111+ ? HOT 1
- Please tag released version commit
- Starting chrome via `chrome-headless-render-pdf` fails (2023)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome-headless-render-pdf.