diff --git a/lib/browser/chrome-extension.js b/lib/browser/chrome-extension.js index e480d88f9a9b..05368f9541df 100644 --- a/lib/browser/chrome-extension.js +++ b/lib/browser/chrome-extension.js @@ -20,7 +20,15 @@ const generateExtensionIdFromName = function (name) { // Create or get manifest object from |srcDirectory|. const getManifestFromPath = function (srcDirectory) { - const manifest = JSON.parse(fs.readFileSync(path.join(srcDirectory, 'manifest.json'))) + let manifest + + try { + manifest = JSON.parse(fs.readFileSync(path.join(srcDirectory, 'manifest.json'))) + } catch (err) { + console.warn(`Attempted to load extension from ${srcDirectory}, but parsing the manifest failed.`) + console.warn('Error encountered:', err) + } + if (!manifestNameMap[manifest.name]) { const extensionId = generateExtensionIdFromName(manifest.name) console.log(extensionId)