Comments (14)
@0x62 Do you have macOS Sierra?
The default phantomjs doesn't work there and you need to use phantomjs2
https://github.com/pofider/phantom-html-to-pdf#phantomjs2
from phantom-html-to-pdf.
I am on macOS Sierra and I get this error occasionally, and I am also using phantomjs2.
from phantom-html-to-pdf.
@chevin99 I've updated readme to mentioned this. Don't hesitate to send PR next time :)
from phantom-html-to-pdf.
@mcrowder65 same for me, did you end up fixing that?
from phantom-html-to-pdf.
Hi, just tried your piece of code with express and works for me on windows and ubuntu as well.
- Aren't you working on some kind of a shared hosting environment?
- does
../temp
exist?
from phantom-html-to-pdf.
Hi,
I'm working on a local Windows PC,
../temp exists. If I remove it, I've got another error.
Is there something to run before launching tests ? A phantomJS server or something like that ?
JM.
from phantom-html-to-pdf.
Hum I notice that this error appears only on the first call. Subsequent call are OK. Maybe it is due to start time or start time synchro (my PC is relatively slow).
JM.
from phantom-html-to-pdf.
Oh, that is the problem probably. It is waiting just 500ms for phantomjs.exe to start what could be not enough for slower computer.
I will think about smarter implementation here.
from phantom-html-to-pdf.
OK. Maybe you van tell me where is this timeout set. I will change
manually waiting for your smarter implémentation.
Le 31 mars 2015 20:23, "Jan Blaha" [email protected] a écrit :
Oh, that is the problem probably. It is waiting just 500ms for
phantomjs.exe to start what could be not enough for slower computer.I will think about smarter implementation here.
—
Reply to this email directly or view it on GitHub
#1 (comment)
.
from phantom-html-to-pdf.
I think it should be here
https://github.com/pofider/phantom-workers/blob/master/lib/phantomWorker.js#L42
from phantom-html-to-pdf.
Now it is fixed in the dependent package.
https://github.com/pofider/phantom-workers/releases/tag/0.1.2
from phantom-html-to-pdf.
I'm having exactly this error at the moment, running on a 2015 Macbook Pro.
{ Error: connect ECONNREFUSED 127.0.0.1:54363
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 54363 }
Code:
const phantomExport = require('phantom-html-to-pdf')();
phantomExport({ html: "<h3>Hello world</h3>" }, (err, pdf) => {
console.log(err);
})
$ node -v
v6.9.0
from phantom-html-to-pdf.
I am on Sierra. Thank's for the heads up.
from phantom-html-to-pdf.
@pofider it would be helpful to mention in the readme/docs that phantomjs2 is required on macOS Sierra. Thankfully searching around and finding this issue helped me figure that out, but I imagine others may be having the same problem when trying to run the 'hello world' example. Thanks for your work on this 😄.
from phantom-html-to-pdf.
Related Issues (20)
- Blurred, overlapping text when generating a PDF HOT 1
- PDF image not shown and format issue HOT 1
- Module not found: Can't resolve 'cluster' in... HOT 1
- Table Header HOT 1
- "file" argument must be a non-empty string HOT 3
- is this repo dead HOT 1
- phantomjs in electron
- occasionally I get "phantom manager could not start all workers" error HOT 4
- error occurs in electron (workerErrors) HOT 1
- Local Language Support
- fix footer
- Background color with gradient isn't working when generating via Mobile
- No support for phantom debug option
- No support for specifying TLS version
- Error: spawn EACCES HOT 5
- Cant render chinese character HOT 2
- How to do the page break in the pdf? HOT 1
- This library doesn't seem to support OnResourceRequested HOT 1
- Custom Headers is not working
- Update lodash version
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 phantom-html-to-pdf.