RealFaviconGenerator / gulp-real-favicon

Gulp plugin to generate a multiplatform favicon with RealFaviconGenerator
76 stars 6 forks source link

Error: ENAMETOOLONG, name too long #6

Open tbredin opened 8 years ago

tbredin commented 8 years ago

Didn't work for me with recommended size png as source:

Error: ENAMETOOLONG, name too long 'iVBORw0KGgoAAAANSUhEUgAAAZA [...] rkJggg==' at Error (native) at Object.fs.openSync (fs.js:500:18) at Object.fs.readFileSync (fs.js:352:15) at Object.exports.fileToBase64Sync (/Users/tom/Sites/crikey-prototype/node_modules/rfg-api/index.js:35:15) at Object.exports.normalizeMasterPicture (/Users/tom/Sites/crikey-prototype/node_modules/rfg-api/index.js:189:47) at Object.exports.normalizeAllMasterPictures (/Users/tom/Sites/crikey-prototype/node_modules/rfg-api/index.js:218:38) at Object.exports.normalizeAllMasterPictures (/Users/tom/Sites/crikey-prototype/node_modules/rfg-api/index.js:221:38) at Object.exports.createRequest (/Users/tom/Sites/crikey-prototype/node_modules/rfg-api/index.js:254:38) at Object.module.exports.generateFavicon (/Users/tom/Sites/crikey-prototype/node_modules/gulp-real-favicon/index.js:13:23) at Gulp.<anonymous> (/Users/tom/Sites/crikey-prototype/gulpfile.babel.js:254:16)

phbernard commented 8 years ago

When sending the pictures to RFG, the plugin turns picture paths (eg. img/master_pic.png) into base64 strings. It seems that, at some point, the plugin processed the picture as if it was still a path but it was actually a base64 string (thus the rubbish data iVBORw0KGgoAAAANSUhEUgAAAZA [...] rkJggg== and the path-too-long issue).

Could your copy/paste the whole Gulp task?

fenixkim commented 8 years ago

I'm getting this error too when use the masterPicture property in order to customize the safariPinnedTab:

safariPinnedTab: {
  pictureAspect: 'silhouette',
  themeColor: '#e72068',
  masterPicture: {
    type: 'inline',
    content: 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL........'
  }
}

Is there a workaround?