Skip to content
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

All browser extensions don't work. #2788

Closed
wcimediastudios opened this issue Mar 4, 2021 · 4 comments
Closed

All browser extensions don't work. #2788

wcimediastudios opened this issue Mar 4, 2021 · 4 comments
Labels

Comments

@wcimediastudios
Copy link

(node:14160) ExtensionLoadWarning: Warnings loading extension at C:\Users\User\AppData\Roaming\Electron\extensions\fmkadmapgofadopljbjfkapdkoienihi: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'minimum_chrome_version'. Unrecognized manifest key 'update_url'. Cannot load extension with file or directory name metadata. Filenames starting with "" are reserved for use by the system.
10:01:28.657 > Skip checkForUpdatesAndNotify because application is not packed

@timsgardner
Copy link

Same issue (with same fmkad.... id).

@timsgardner
Copy link

timsgardner commented Apr 1, 2021

I found an extremely unpleasant solution. Following the suggestion here:

  • Add the latest (unreleased) build of electron-devtools-installer via yarn add git+https://github.com/MarshallOfSound/electron-devtools-installer.git, as suggested here.
  • In main.dev.ts, replace installExtensions with this:
const installExtensions = async () => {
  const installer = require('electron-devtools-installer');
  const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
  const extensions = ['REACT_DEVELOPER_TOOLS'];

  return installer
    .default(
      extensions.map((name) => installer[name]),
      { forceDownload, loadExtensionOptions: { allowFileAccess: true } }
    )
    .catch(console.log);
};
  • Go into the directory of the extensions themselves. For React Developer Tools on my (Windows) machine, that's C:\Users\<user>\AppData\Roaming\Electron\extensions\fmkadmapgofadopljbjfkapdkoienihi.
    • Delete the _metadata directory.
    • In manifest.json, delete the update_url, minimum_chrome_version, and browser_action entries.
  • Upgrade Electron to 12.0.2 (the latest as of writing) via yarn upgrade electron@12.0.2.
  • In main.dev.ts, when creating the new BrowserWindow, set contextIsolation to false (I can't vouch for security implications etc of this):
  mainWindow = new BrowserWindow({
    show: false,
    width: 1024,
    height: 728,
    icon: getAssetPath('icon.png'),
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
    },
  });

Then it should work. Clearly not a great solution but perhaps a stopgap. The problem seems to be spread across multiple infrastructure repos, I'm not sure if extensions are working for anyone right now. Then again if they were broken for everyone I'd expect more noise on this issue, I had to dig to find this workaround.

@Sensiblemnd
Copy link

@timsgardner I did not have to upgrade to electron 12 I stayed on 11.4.3 and it still worked

@lgh06
Copy link

lgh06 commented Aug 4, 2021

electron-devtools-installer released 3.2.0 already.
however { forceDownload, loadExtensionOptions: { allowFileAccess: true } } not updated yet, and electron-devtools-installer not updated to 3.2.0 yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants