imaging
imaging copied to clipboard
https urls are not working
I tried to execute this
$ imaging https://www.clever-cloud.com/blog/img/medias/npm.png
and an error occurred: Running error, please check the image URI!

It work fine, are your working behind network proxy ?
http url running fine ?
http urls ran fine, https still broken. I am not behind a proxy. My version is 2.0.2.
What's your system (OSX or Windows) and which node.js version ?
Mac OSX (latest), node 4.2.1, npm 3.3.9

Fine, in my computer. Could you try another url, like this:
imaging https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
And try use curl to check the network:
curl https://www.clever-cloud.com/blog/img/medias/npm.png > npm.png && imaging npm.png
imaging https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png → Error
curl https://www.clever-cloud.com/blog/img/medias/npm.png > npm.png && imaging npm.png → works
Could you help me check phantomjs ?
- touch test.js
test.js's content:
var img = new Image()
img.src = 'https://www.clever-cloud.com/blog/img/medias/npm.png'
img.onload = function() {console.log('loaded');phantom.exit()}
img.onerror = function(){console.log('error');phantom.exit()}
console.log('loading image...')
- sudo npm install phantomjs -g
- phantomjs test.js
if work, it will print:
loading image...
loaded
Otherwise will print as below or phantomjs throws error:
loading image...
error

@martinheidegger thanks.
Can it work ?
phantomjs test.js --ssl-protocol=any --ignore-ssl-errors
error :unamused:
Thanks guy !
I need to get more error message, change test.js to below content:
var page = require('webpage').create()
page.onResourceError = function(resourceError) {
console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')');
console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString);
}
page.open('https://www.clever-cloud.com/blog/img/medias/npm.png', function (status) {
phantom.exit()
})
Run phantomjs test.js will get the error message if load resource fail.
And I am sorry, --ignore-ssl-errors missing value, it should be --ignore-ssl-errors=true
+1 on failing https
@ev1stensberg,can you paste the https url ? And what's your system (mac or win) and node.js's version.
Mac OSX 10.12.1, Current version of node. It's the same for all urls. ( From the docs )
Currently, I have upgraded phantomjs, and add some ssl options for ignoring ssl error.
Can you update [email protected] then try again ? @ev1stensberg
npm i imaging@latest -g