N
N
Nadim Zakirov2021-02-04 16:40:12
JavaScript
Nadim Zakirov, 2021-02-04 16:40:12

How to install CryptoPro and Gosuslug extensions on Electron?

I tried to install the extensions of the State Services and CryptoPRO in Electron and received errors that their manifests were incorrect, or rather, some parameters in the manifests:

(node:7488) ExtensionLoadWarning: Warnings loading extension at C:\Users\Пользователь\AppData\Roaming\SberAuc\extensions\pbefkdcndngodfeigfdgiodgnmbgcfha: Unrecognized manifest key 'page_action'. Unrecognized manifest key 'update_url'. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.

(node:2052) ExtensionLoadWarning: Warnings loading extension at C:\Users\Пользователь\AppData\Roaming\SberAuc\extensions\iifchhfnnmpdbibifmljnfjhpififfog: Unrecognized manifest key 'author'. Unrecognized manifest key 'homepage_url'. Unrecognized manifest key 'page_action'. Unrecognized manifest key 'update_url'. Permission 'declarativeContent' is unknown or URL pattern is malformed. Permission 'tabs' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.

If it's not difficult, tell me, please, is it possible to do something here? Just remove invalid parameters? Or maybe there are versions of Electron in which the API is fully consistent with the Chrome API? I do not know what to do.

Code from main process
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const { default: installExtension, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } = require('electron-devtools-installer');

app.on('ready', async function() {
  
  try {
    
    var result = await installExtension('iifchhfnnmpdbibifmljnfjhpififfog');
    console.dir(result);
    
  }
  
  catch(err) {
    
    console.dir(err);
    
  }
  
});

app.on('window-all-closed', function() {
  app.quit();
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadim Zakirov, 2021-02-11
@zkrvndm

People who subscribed to my question, I write just for you. In general, I was able to install these extensions in Electron, but alas, they do not work due to the fact that Electron does not fully support the Chrome Extesion API. In short, just wasted my time. I usually make bots as browser extensions, but this time I decided to make everything beautiful and wrap all my code in Electron - it was a bad idea)
6025340fda0f8535904933.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question