Error initializing the signing plugin. The plugin is not installed. Fixing the error “The plugin is loaded, but objects are not created

Hi all! Surely, many users could see the error “Failed to load plugin” on their monitor screen when playing online audio, video, or when trying to launch some kind of flash animation (game, banner, application, etc.). If you landed on this page, then most likely you saw a similar error. Today in this short instruction we will eliminate the error “ Failed to load plugin» in the browser quickly and easily.

First, friends, let's figure out what a browser plugin is. A plugin is, in other words, an addition that expands the capabilities of an Internet browser. There are a huge number of plugins today, and they are all in different directions. Any browser has basic plugins installed in order to display web resources correctly. If a message appears in your browser stating that the plugin could not be loaded, then most likely the problem is with Flash Player. Below we will look at several ways in which you can correct this error.

1st method. Updating the Internet browser

This method is the simplest and helps in most cases. I will show all the manipulations using the example of the popular Google Chrome browser. If you use another browser, do not worry, all steps are the same. So, in order to update the browser, go to the menu - Help - About the browser.


On the “About the program” page, find and click on the “Update” button.


After the update, check to see if the “Failed to load plugin” error appears again. If these steps did not help solve the problem, move on to the next method.

2nd method. Clearing history in the browser

This method will help when such an error appears only on some resources. It's quite simple - you need to clear the cache and cookies in your browser.

Cache – temporary browser files that store all web components of viewed resources (images, pages, video files, design, etc.). Thanks to the cache, the browser quickly loads pages of previously visited sites, since resource components are loaded not via the Internet, but from the local drive of the computer.

Cookies are also temporary files that store the user’s personal data (logins, passwords, website settings, etc.). When we go to any page, the browser sends all this data to the server, and therefore we can access any resource without re-entering the login and password for authorization.

So, let's clear the Cache and Cookies in our browser to try to resolve the error. Go to the menu, select “History”.


Then click on the “Clear history” button and carefully check that the checkboxes are checked, as shown below in the screenshot.


After this, all that remains is to restart the browser.

3rd method. Disabling unnecessary plugins

If the first two methods did not help, then proceed to disabling the extra plugin. First of all, let's open the page with installed plugins. The address is different for each browser:

If you use Chrome, then type chrome://plugins in the address bar
If you use Yandex, then enter browser://plugins in the address bar
If you use Opera, then type opera://plugins in the address bar
If you use Firefox, then type in about:plugins in the address bar


When the page with plugins opens, take a closer look to see if there is an extra Flash Player plugin. If there is one, I recommend disabling it (usually it is of the PPAPI type).


After disconnecting, restart the browser and check again.

4th method. Reinstalling Adobe Flash Player

If none of the methods described above helped, then I advise you to reinstall Adobe Flash Player. To do this, first of all, uninstall the old version of the flash player in Control Panel - Programs and Features. Then download the latest version of Adobe Flash Player from the official website.


I hope my little instruction about fixing the error " Failed to load plugin"helped you. If you solved this problem in any other way, you can write in the comments, this will help many users! Thank you for your attention and all the best!

Posted on 02/03/2016 in

General information

The plugin's programming interface involves calling asynchronous operations implemented based on promise objects. You can read more about the specification used in the implementation of the plugin. You need to install two types of handlers on promises:

  • onFulfilled– fire when the promise is in the “successful” state;
  • onRejected– fire when the promise is in the “completed with error” state.
The universal method for setting handlers is as follows: promise.then(onFulfilled, onRejected)

Initializing the plugin

To work with the plugin, you need to call the initialization function of the PKCS#11 component plugin.initPKCS11 . This function takes a list of module names (in the form of an array) as parameters. The list of provided modules can be viewed. If modules are not specified, the plugin will initiate all modules.
If you need to indicate which crypto providers should be used when running the capi module, you should use the following recording format:

Capi:(prov1),(mode):(prov2),(mode)

In this entry:

  • prov1, prov2 – name of the crypto provider. The following values ​​are currently supported:
    • Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider;
    • Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider;
    • Crypto-Pro GOST R 34.10-2012 Strong Cryptographic Service Provider;
    • Signal-COM CPGOST Cryptographic Provider;
    • Signal-COM GOST R 34.10-2012 (256) Cryptographic Provider;
    • Signal-COM GOST R 34.10-2012 (512) Cryptographic Provider;
    • Infotecs Cryptographic Service Provider.
  • mode – display mode of the PIN code entry window. Can take the following values:
  • 0 – default mode provided by the crypto provider;
  • 1 – display of the native crypto provider window.
    Note: When working with Crypto-Pro on Linux, displaying the native crypto provider window is not available.
  • 2 – displays a window in the plugin interface.
    Note: when working with Signal-COM, displaying the window in the plugin interface is not available.

To obtain keys from the Windows system storage, you should specify , and the mode is My.
Example of initiating all modules:

Plugin.initPKCS11(["ISBC ESMART", "Aladdin R.D. Unified JaCarta", "Rutoken", "SafeNet", "capi:Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider,0:Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider,0:Crypto-Pro GOST R 34.10-2012 Strong Cryptographic Service Provider,0:Signal-COM CPGOST Cryptographic Provider,0:Signal-COM GOST R 34.10-2012 (256) Cryptographic Provider,0:Signal-COM GOST R 34.10-2012 (512) Cryptographic Provider,0:Infotecs Cryptographic Service Provider,0: ,My"])

An example of initiating a module to obtain keys from the Windows system storage:

Plugin.initPKCS11(["capi: ,My"])

Upon successful initialization, the function returns an object (hereinafter using the promise mechanism) that has the modules and getCertsForSign functions.

Viewing a list of modules and their status

To view the list of modules and their status, you need to call the modules function.
Example request:

Pkcs11.modules.then(onFulfilled, onRejected);

An example of a function response (breaks are given for ease of reading):

[ ( "enable": true, "name": "Aladdin R.D. Unified JaCarta" ), ( "enable": true, "name": "Rutoken ECP" ), ( "enable": false, "error": "100 :failed to load p11 module", "name": "ISBC ESMART" ) ]

View the list of certificates

To view the list of detected certificates, you must call the getCertsForSign function. As a function call parameter, you must specify whether parallel mode of polling initialized PKCS#11 modules should be used:

  • true– parallel access to modules (recommended mode);
  • false– sequential access to modules.
The list of certificates is an array (JavaScript Array), the elements of which are certificate objects. The functions full_info , cms_sign_on_it , and start_signing can be executed on a certificate object.

View information about a specific certificate

To view information about a specific certificate, you need to call the full_info property, which returns information about the certificate as a json object. It includes the following parameters:

  • sn– serial number of the certificate;
  • subject– information about the subject to whom this electronic signature certificate was issued. Returned as json in the format “parameter: value”, where parameter is the name of the corresponding object identifier (OID). All standard object identifiers are given common designations, for example, CN (Common Name).
  • issuer– information about the issuer of the electronic signature key certificate. Returned as json in the format “parameter: value”, where parameter is the name of the corresponding object identifier (OID). All standard object identifiers are given common notations;
  • not_before– certificate validity start time (data type – string in ASN1_TIME format);
  • not_after– certificate expiration time (data type – string in ASN1_TIME format);
  • key_usage– information about the purpose of the key is returned as an array.
The start/end time of a certificate in ASN1_TIME format can be converted to a standard format using the new Date(ASN1_TIME) function.

Viewing electronic signature key data

To view information about a specific digital signature key for a certificate, you must call the token_info method. The method returns a json object with the following data:

  • label– name of the key container of the electronic signature tool;
  • manufacturerID– identifier of the manufacturer of the electronic signature tool;
  • model– model of the electronic signature tool;
  • serialNumber– serial number of the electronic signature tool.
For keys working through the capi module, the returned data has a different form. The model attribute always takes the value “capi”, the serialNumber attribute is absent, manufacturerID corresponds to the name of the crypto provider, and label is the name of the container.

Signing operation using the selected certificate

Simple signing mode

To sign a string using the selected certificate, you must call the cms_sign_on_it function, which accepts the following input parameters:

  • signature line;
  • signature type - whether the signature is attached (must be true) or detached (false).
As a response, the function returns a string with a signature in CAdES-BES / PKCS#7 attached/detached format.
An example of a function call that should be called on a certificate object: cms_sign_on_it("1234", 3, true).then(function(cms)(console.log(cms)));

Advanced signing mode

Advanced mode allows you to:

  • sign large amounts of data, such as files;
  • sign multiple files without asking for a PIN code again.

To sign data using the selected certificate, you must first initialize the signer object using the start_signing function on the certificate object. Function parameters:

  • signature type - whether the signature is attached (must be true) or detached (false);
  • number of attempts to enter a PIN code (for example, a value of “1” means that the user has only one attempt, after which the function returns an error).

The following methods will be available on the signer object:

  • add_data_in_hex(hexDataString) - accepts data as input as a hex string;
  • add_data_in_base64(base64DataString) - accepts data as input as a base64 string;
  • add_data_in_string(stringData) - accepts input data in the form of a utf-8 string;
  • free() - returns true/false, which allows you to check that the certificate is ready to be signed. Required to be used for the case when several iterations of the signature are carried out on different certificates. In other words, if sequential signing is carried out on several certificates, then before signing you need to call this method and make sure that it returns true ;
  • finish() - finalizes the signature and returns it in CAdES-BES / PKCS#7 format.
As a response, the function returns a string with a signature in CAdES-BES / PKCS#7 attached/detached format.

Signing the line

An example of a command to sign a string:

Signer.add_data_in_string("1234").then(function(res)( return signer.finish();)).then(function(cms)(console.log(cms)));

In this command, “1234” is the line that needs to be signed.

Installing multiple signatures

After the signature is finalized, the signer object returns to its original state. It can be reused within a session to sign other data, for example a new file. In this case, the PIN code will not be requested again.

To sign on a different certificate, you must clear the signer object. In most browsers, this object is cleared automatically when it leaves the scope. However, in Internet Explorer there may be situations where the signer does not clear, resulting in an error. To avoid the error, it is recommended to explicitly clear signer.free() . This operation can be performed in all browsers to unify the code. An example of a signature on a certificate with the signer object cleared:

Function sign(cert, info) ( function successCms(signature) ( alert(signature); ) cert.start_signing(false, 3) .then(function(signer) ( signer.add_data_in_base64("MTIzNDU2") .then(function() ( var data = signer.finish(); var free = signer.free(); return data; ), e).then(successCms, e), e);

Signing a large file

Function readFileByChunk(file, cbToRead, cbToFinish) ( var fileSize = file.size; var chunkSize = 1024*1024; // bytes var offset = 0; var chunkReaderBlock = null; var self = this; var readEventHandler = function(evt) ( if (evt.target.error == null) ( cbToRead(evt.target.result, offset, fileSize); offset += evt.target.result.byteLength; ) else ( console.error("Read error: " + evt .target.error); showError("Error reading file: " + evt.target.error); return; if (offset >= fileSize) ( cbToFinish() return; ) // to the next chunk chunkReaderBlock(offset, chunkSize , file); .webkitSlice) ( var blob = _file.webkitSlice(_offset, _chunkSize + _offset); ) else if (_file.mozSlice) ( var blob = _file.mozSlice(_offset, _chunkSize + _offset); ) r.onload = readEventHandler r. readAsArrayBuffer(blob);

It should be noted that since signing is performed locally, in order to subsequently transfer the user-selected file and signature to the server, it is necessary to implement the appropriate logic on the side of the web page.

On some sites you have to deal with certificates and electronic keys, and at first you have to solve various problems to make everything work. This article will talk about the CAdES plugin’s error when it is loaded but objects are not created.

Solving the problem with the plugin

As follows from the contents of the error, the CAdES plugin itself seems to be loaded, i.e. it is in the system, but something is preventing it from working. Usually the problem occurs in older versions of Firefox up to version 51 (in newer ones the plugin simply does not work). This article takes an electronic trading platform as an example, and there are three ways to solve the problem.

Method 1: Enable the plugin for the current site

Enabling the plugin only for the current site is justified by security considerations when the browser is used for personal purposes and opening a wide variety of pages. And also if you need to perform a task with electronic keys only once.

Method 2: Enable the plugin for all sites

If the security issue is not much of a concern, because... The computer is used exclusively for working on several sites, you can enable the CAdES plugin for all sites. Then it will work immediately after the page loads. This can also help in cases where it is impossible to find the dark gray square to enable the plugin.

Method 3: Use a different browser

For some unforeseen reason, the CAdES plugin may still refuse to work. Therefore, another way to resolve the error is to use a different browser. Most browsers are based on the Chromium engine, they are all somewhat similar, so let's look at the example of Google Chrome.


Conclusion

As you can see, there are several ways to solve the problem with the plugin not working correctly. Depending on your preferences and circumstances, you can choose the one that suits you best.

) in the "Products" section -> "CryptoPro EDS Browser plug-in"

When you run the downloaded file, the system will ask you to elevate your rights to system administrator. Installation without administrator rights is not possible.

After installation, be sure to restart your browser! Sometimes (in case of using Chrome) a system reboot is required, because... Closing all chrome windows does not unload the browser from RAM in all cases.

Additional settings for FireFox version 52.0 and later

Don't forget to install the plugin

For the plugin to work in FireFox starting from version 52, you need to install the latest version of the plugin (not lower than 2.0.12888) (see) and a special extension for FireFox.

To install the extension, follow the link from your FireFox.

After the transition, you will be prompted to install the extension for FireFox - you must confirm the installation by clicking Install.

Additional settings for FireFox versions up to 52.0, FireFox ESR (Error: The plugin is loaded, but objects are not created)

After installing the add-on, its launch is allowed only after confirmation by the user. You can allow the add-on to run either only for the current site or forever for all sites Option 1:

setting permission to use the add-on only for the current site (https://www.site) When the error occurred: The plugin is loaded, but objects are not created

Pay attention to the address bar - an add-on icon has appeared in it:

Click on this icon - you will be asked to run the add-on and remember permission to run the add-on for this site forever. Option 2:

setting permission to use the add-on for all sites

Open the page with installed FireFox add-ons

In the list of add-ons, find CryptoPro CAdES NPAPI Browser Plug-in and change its launch mode to “Always Enable”

Additional settings for Opera

Open the page that searches for an add-on to install:

Enter "CryptoPro" in the search bar - the extension "CryptoPro Extension for CAdES Browser Plug-in" will be found. Click "Add to Opera" to install.

Additional settings for Yandex browser

For Yandex browser you need to follow a procedure similar to the case with Opera.

Additional settings for Google Chrome: permission of installed add-on

If the add-on is successfully installed, the next time you start Chrome you will receive a message asking you to confirm the launch of the add-on