remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

TypeError during conversions #26

Closed szepeshazi closed 9 years ago

szepeshazi commented 11 years ago

Using node v0.9.9, npm v1.2.18, inliner v0.1.14 under Debian Squeeze, I get the following TypeError exception for several urls:

url.js:118 throw new TypeError("Parameter 'url' must be a string, not " + typeof url) ^ TypeError: Parameter 'url' must be a string, not object at Url.parse (url.js:118:11) at urlParse (url.js:112:5) at Url.resolve (url.js:406:29) at Object.urlResolve as resolve at Object. (/usr/local/lib/node_modules/inliner/inliner.js:269:31) at Function.b.extend.each (http://code.jquery.com/jquery.min.js:3:5257) at b.fn.b.each (http://code.jquery.com/jquery.min.js:3:2013) at /usr/local/lib/node_modules/inliner/inliner.js:267:40 at /usr/local/lib/node_modules/inliner/node_modules/jsdom/lib/jsdom.js:207:39 at process._tickCallback (node.js:427:13)

Try inliner -v -n http://index.hu inliner -v -n http://sandbox.wamped.org/pdf2html/files/pdf2htmlEX/pss_cvf/pss_cvf.html

remy commented 9 years ago

This is still present in 1.0.0 - will investigate.

remy commented 9 years ago

Note that the 2nd url throws a 500 (nothing we can do anything about) and the first url doesn't actually work (on my machine) because it consumes too much memory! But the root cause that was filed is now fixed! :)