-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400: could not publish request to the RealFaviconGenerator API. #36
Comments
Creating my API key and changing it directly into the configuration json had no effect in my case. |
@phbernard Any ideas matey? |
FYI: This only seems to be an issue when inline images are used, if you pass an image URL then the script works correctly. |
@jamesryanbell Ahh okay. The module inlines images automatically so we'll need to allow inline images too. |
Not sure to understand what's wrong. Do you have an error message with the 400 itself? I realize the API gives the message along with the status. Some HTTP libs don't return it because it's not in the response body. @haydenbleasel, could it help if the API would return a JSON document, along with the 400? (the |
Trying to run via node with: var favicons = require('favicons');
var options = { files: { src: './src/img/logo.png', dest: './build/' } };
favicons(options); but getting: 400: could not publish request to the RealFaviconGenerator API. |
I get this error when calling like so; var config = {};
config.srcPath = path.join(__dirname, srcDir);
config.destPath = path.join(__dirname, destDir);
favicons({
files: {
src: path.join(config.srcPath, 'favicon.png'),
dest: config.destPath
},
icons: {
opengraph: false
}
}, function (error, metadata) {
if(error) {
console.error(error);
}
console.log('favicon task finished');
}); |
Also fails if I inline the base64 data myself like so var iconFile = path.join(config.srcPath, 'favicon.png');
fs.readFile(iconFile, function (err, data) {
favicons({
files: {
src: path.join(config.srcPath, 'favicon.png'),
dest: config.destPath
},
icons: {
opengraph: false
},
favicon_generation: {
master_picture: {
type: 'inline',
content: new Buffer(data).toString('base64')
}
}
}, function (error, metadata) {
if(error) {
console.error(error);
}
console.log('favicon task finished');
});
}); |
adding an api_key didn't help |
In my case, I got this error because the png i was trying to use was not large enough. Since the callback doesn't send back the original error message, its difficult to troubleshoot. |
@webchaz @dmnsgn @jamesryanbell @mashi @jessehattabaugh @phbernard @brianberlin Hey all, I'm merging this issue into Favicons 4.0. I'd love for you to join in the discussion: #51 |
According to their docs we need an api_key, but I don't see an api_key config option. I'm not sure if this is the issue here exactly, but the error above is what's being returned.
The text was updated successfully, but these errors were encountered: