I created an extension that uses native messaging to a host.
The manifest.json of the extension is:
{
"manifest_version": 2,
"version": "1.0",
"name": "Native Messaging Example",
"description": "Send a message to a native application",
"permissions": [
"nativeMessaging"
],
"browser_action": {
"default_popup": "popup.html"
}
}
The popup.html:
<html>
<head>
<script src="./main.js"></script>
</head>
<body>
<button id="buttonToPress">Press</button>
</body>
</html>
The main.js file:
var port = null;
function connect() {
port = chrome.runtime.connectNative('com.google.chrome.example.echo');
port.onMessage.addListener(function(message) {
alert(message);
port.disconnect();
});
port.onDisconnect.addListener(function() {
port = null;
alert(chrome.runtime.lastError.message);
});
var message = {
'filePath': 'C:\Users\username\Desktop\themes\Wallpaper\Architecture\img13.jpg'
};
port.postMessage(message);
}
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('buttonToPress').addEventListener('click', connect);
});
I have a native application abc.exe
.
The native application manifest.json:
{
"name": "com.google.chrome.example.echo",
"description": "Chrome Native Messaging API Example Host",
"path": "./abc.exe",
"type": "stdio",
"allowed_origins": [
"chrome-extensions://fegpbklgdffjmfjmhknpmgepbddbcghk/"
]
}
In the registrey, The Default Value of HKEY_CURRENT_USERSoftwareGoogleChromeNativeMessagingHostscom.google.chrome.example.echo
is C:UsersusernameDesktopExtension1NativeAppmanifest.json
(This is where the manifest file is physically exists).
The problem is, that each time i run it, it keep saying: ‘Specified Native Messaging Host Not Found’… I rechecked my code and it seems to be fine, just like the google’s guide of native messaging. The error that logged in the debugger’s console is: ‘Uncaught Error: Attempting to use a disconnected port object’, which i don’t know why it keeps happening.
Also, after the chrome.runtime.connectNative
, the .exe doesn’t start (after seeing in the task manager), and it just seems likes there something that not code-related, but more likely to be in the configuration.
I need some help in figuring it out, so any help would be usefull!
Thanks
layout | title | date | updated | description |
---|---|---|---|---|
layouts/doc-post.njk |
Native Messaging |
2014-12-15 |
2018-05-14 |
How to exchange messages with native applications from your Chrome App. |
{% Aside ‘caution’ %}
Important: Chrome will be removing support for Chrome Apps on all platforms. Chrome browser and
the Chrome Web Store will continue to support extensions. Read the announcement and learn
more about migrating your app.
{% endAside %}
Extensions and apps can exchange messages with native applications using an API that is similar to
the other message passing APIs. Native applications that support this feature must register a
native messaging host that knows how to communicate with the extension. Chrome starts the host in
a separate process and communicates with it using standard input and standard output streams.
Native messaging host {: #native-messaging-host }
In order to register a native messaging host the application must install a manifest file that
defines the native messaging host configuration. Below is an example of the manifest file:
{ "name": "com.my_company.my_application", "description": "My Application", "path": "C:\Program Files\My Application\chrome_native_messaging_host.exe", "type": "stdio", "allowed_origins": [ "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/" ] }
The native messaging host manifest file must be valid JSON and contains the following fields:
Name | Description |
---|---|
name |
Name of the native messaging host. Clients pass this string to runtime.connectNative or runtime.sendNativeMessage. This name can only contain lowercase alphanumeric characters, underscores and dots. The name cannot start or end with a dot, and a dot cannot be followed by another dot. |
description |
Short application description. |
path |
Path to the native messaging host binary. On Linux and OSX the path must be absolute. On Windows it can be relative to the directory in which the manifest file is located. The host process is started with the current directory set to the directory that contains the host binary. For example if this parameter is set to C:Applicationnm_host.exe then it will be started with current directory C:Application . |
type |
Type of the interface used to communicate with the native messaging host. Currently there is only one possible value for this parameter: stdio . It indicates that Chrome should use stdin and stdout to communicate with the host. |
allowed_origins |
List of extensions that should have access to the native messaging host. Wildcards such as chrome-extension://*/* are not allowed. |
Native messaging host location {: #native-messaging-host-location }
The location of the manifest file depends on the platform.
On Windows, the manifest file can be located anywhere in the file system. The application
installer must create registry key
HKEY_LOCAL_MACHINESOFTWAREGoogleChromeNativeMessagingHosts_com.my_company.my_application_
or
HKEY_CURRENT_USERSOFTWAREGoogleChromeNativeMessagingHosts_com.my_company.my_application_
, and
set default value of that key to the full path to the manifest file. For example, using the
following command:
REG ADD "HKCUSoftwareGoogleChromeNativeMessagingHostscom.my_company.my_application" /ve /t REG_SZ /d "C:pathtonmh-manifest.json" /f
or using the following .reg
file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareGoogleChromeNativeMessagingHostscom.my_company.my_application]
@="C:\path\to\nmh-manifest.json"
When Chrome looks for native messaging hosts, first the 32-bit registry is queried, then the 64-bit
registry.
On OS X and Linux, the location of the native messaging host’s manifest file varies by the
browser (Google Chrome or Chromium). The system-wide native messaging hosts are looked up at a fixed
location, while the user-level native messaging hosts are looked up in a subdirectory within the
user profile directory called NativeMessagingHosts
.
- OS X (system-wide)
- Google Chrome:
/Library/Google/Chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
/Library/Application Support/Chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
- OS X (user-specific, default path)
- Google Chrome:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
~/Library/Application Support/Chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
- Linux (system-wide)
- Google Chrome:
/etc/opt/chrome/native-messaging-hosts/_com.my_company.my_application_.json
- Chromium:
/etc/chromium/native-messaging-hosts/_com.my_company.my_application_.json
- Google Chrome:
- Linux (user-specific, default path)
- Google Chrome:
~/.config/google-chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
~/.config/chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
Native messaging protocol {: #native-messaging-host-protocol }
Chrome starts each native messaging host in a separate process and communicates with it using
standard input (stdin
) and standard output (stdout
). The same format is used to send messages in
both directions: each message is serialized using JSON, UTF-8 encoded and is preceded with 32-bit
message length in native byte order. The maximum size of a single message from the native messaging
host is 1 MB, mainly to protect Chrome from misbehaving native applications. The maximum size of the
message sent to the native messaging host is 4 GB.
The first argument to the native messaging host is the origin of the caller, usually
chrome-extension://[ID of allowed extension]
. This allows native messaging hosts to identify the
source of the message when multiple extensions are specified in the allowed_origins
key in the
native messaging host manifest.
Warning: In Windows, in Chrome 54 and earlier, the origin was passed as the second parameter
instead of the first parameter.
When a messaging port is created using runtime.connectNative Chrome starts native messaging
host process and keeps it running until the port is destroyed. On the other hand, when a message is
sent using runtime.sendNativeMessage, without creating a messaging port, Chrome starts a new
native messaging host process for each message. In that case the first message generated by the host
process is handled as a response to the original request, i.e. Chrome will pass it to the response
callback specified when runtime.sendNativeMessage is called. All other messages generated by
the native messaging host in that case are ignored.
On Windows, the native messaging host is also passed a command line argument with a handle to the
calling Chrome native window: --parent-window=<decimal handle value>
. This lets the native
messaging host create native UI windows that are correctly parented. Note that this value will be
0 if the calling context is a background script page.
Connecting to a native application {: #native-messaging-client }
Sending and receiving messages to and from a native application is very similar to cross-extension
messaging. The main difference is that runtime.connectNative is used instead of
runtime.connect, and runtime.sendNativeMessage is used instead of
runtime.sendMessage.
These methods can only be used if the «nativeMessaging» permission is declared in your app’s
manifest file.
The Following example creates a runtime.Port object that’s connected to native messaging host
com.my_company.my_application
, starts listening for messages from that port and sends one outgoing
message:
var port = chrome.runtime.connectNative('com.my_company.my_application'); port.onMessage.addListener(function(msg) { console.log("Received" + msg); }); port.onDisconnect.addListener(function() { console.log("Disconnected"); }); port.postMessage({ text: "Hello, my_application" });
runtime.sendNativeMessage can be used to send a message to native application without creating
a port, e.g.:
chrome.runtime.sendNativeMessage('com.my_company.my_application', { text: "Hello" }, function(response) { console.log("Received " + response); });
Debugging native messaging {: #native-messaging-debugging }
When the native messaging host fails to start, writes to stderr
or when it violates the
communication protocol, output is written to the error log of Chrome. On Linux and OS X, this log
can easily be accessed by starting Chrome from the command line and watching its output in the
terminal. On Windows, use --enable-logging
as explained at How to enable logging.
Here are some errors and tips for solving the issues:
- Failed to start native messaging host.
- Check whether you have sufficient permissions to execute the file.
- Invalid native messaging host name specified.
- Check whether the name contains any invalid characters. Only lowercase alphanumeric characters,
underscores and dots are allowed. A name cannot start or end with a dot, and a dot cannot be
followed by another dot.
- Check whether the name contains any invalid characters. Only lowercase alphanumeric characters,
- Native host has exited.
- The pipe to the native messaging host was broken before the message was read by Chrome. This is most
likely initiated from your native messaging host.
- The pipe to the native messaging host was broken before the message was read by Chrome. This is most
- Specified native messaging host not found.
- Is the name spelled correctly in the extension and in the manifest file?
- Is the manifest put in the right directory and with the correct name? See native messaging host
location for the expected formats. - Is the manifest file in the correct format? In particular, is the JSON syntax correct and do the
values match the definition of a native messaging host manifest? - Does the file specified in
path
exist? On Windows, paths may be relative, but on OS X and Linux,
the paths must be absolute.
- Native messaging host host name is not registered. (Windows-only)
- The native messaging host was not found in the Windows registry. Double-check using
regedit
whether the key was really created and matches the required format as documented at native
messaging host location.
- The native messaging host was not found in the Windows registry. Double-check using
- Access to the specified native messaging host is forbidden.
- Is the extension’s origin listed in
allowed_origins
?
- Is the extension’s origin listed in
- Error when communicating with the native messaging host.
- This is a very common error and indicates an incorrect implementation of the communication protocol
in the native messaging host.- Make sure that all output in
stdout
adheres to the native messaging protocol. If you want
to print some data for debugging purposes, write tostderr
. - Make sure that the 32-bit message length is in the platform’s native integer format (little-endian
/ big-endian). - The message length must not exceed 1024*1024.
- The message size must be equal to the number of bytes in the message. This may differ from the
«length» of a string, because characters may be represented by multiple bytes. - Windows-only: Make sure that the program’s I/O mode is set to
O_BINARY
. By default, the I/O
mode isO_TEXT
, which corrupts the message format as line breaks (n
=0A
) are replaced with
Windows-style line endings (rn
=0D 0A
). The I/O mode can be set using__setmode
.
- Make sure that all output in
- This is a very common error and indicates an incorrect implementation of the communication protocol
Important: Chrome will be removing support for Chrome Apps on all platforms. Chrome browser and the Chrome Web Store will continue to support extensions. Read the announcement and learn more about migrating your app.
Extensions and apps can exchange messages with native applications using an API that is similar to the other message passing APIs. Native applications that support this feature must register a native messaging host that knows how to communicate with the extension. Chrome starts the host in a separate process and communicates with it using standard input and standard output streams.
Native messaging host
In order to register a native messaging host the application must install a manifest file that defines the native messaging host configuration. Below is an example of the manifest file:
{
"name": "com.my_company.my_application",
"description": "My Application",
"path": "C:\Program Files\My Application\chrome_native_messaging_host.exe",
"type": "stdio",
"allowed_origins": [
"chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
]
}
The native messaging host manifest file must be valid JSON and contains the following fields:
Name | Description |
---|---|
name |
Name of the native messaging host. Clients pass this string to runtime.connectNative or runtime.sendNativeMessage. This name can only contain lowercase alphanumeric characters, underscores and dots. The name cannot start or end with a dot, and a dot cannot be followed by another dot. |
description |
Short application description. |
path |
Path to the native messaging host binary. On Linux and OSX the path must be absolute. On Windows it can be relative to the directory in which the manifest file is located. The host process is started with the current directory set to the directory that contains the host binary. For example if this parameter is set to C:Applicationnm_host.exe then it will be started with current directory C:Application . |
type |
Type of the interface used to communicate with the native messaging host. Currently there is only one possible value for this parameter: stdio . It indicates that Chrome should use stdin and stdout to communicate with the host. |
allowed_origins |
List of extensions that should have access to the native messaging host. Wildcards such as chrome-extension://*/* are not allowed. |
Native messaging host location
The location of the manifest file depends on the platform.
On Windows, the manifest file can be located anywhere in the file system. The application installer must create registry key HKEY_LOCAL_MACHINESOFTWAREGoogleChromeNativeMessagingHosts_com.my_company.my_application_
or HKEY_CURRENT_USERSOFTWAREGoogleChromeNativeMessagingHosts_com.my_company.my_application_
, and set default value of that key to the full path to the manifest file. For example, using the following command:
REG ADD "HKCUSoftwareGoogleChromeNativeMessagingHostscom.my_company.my_application" /ve /t REG_SZ /d "C:pathtonmh-manifest.json" /f
or using the following .reg
file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareGoogleChromeNativeMessagingHostscom.my_company.my_application]
@="C:\path\to\nmh-manifest.json"
When Chrome looks for native messaging hosts, first the 32-bit registry is queried, then the 64-bit registry.
On OS X and Linux, the location of the native messaging host’s manifest file varies by the browser (Google Chrome or Chromium). The system-wide native messaging hosts are looked up at a fixed location, while the user-level native messaging hosts are looked up in a subdirectory within the user profile directory called NativeMessagingHosts
.
- OS X (system-wide)
- Google Chrome:
/Library/Google/Chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
/Library/Application Support/Chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
- OS X (user-specific, default path)
- Google Chrome:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
~/Library/Application Support/Chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
- Linux (system-wide)
- Google Chrome:
/etc/opt/chrome/native-messaging-hosts/_com.my_company.my_application_.json
- Chromium:
/etc/chromium/native-messaging-hosts/_com.my_company.my_application_.json
- Google Chrome:
- Linux (user-specific, default path)
- Google Chrome:
~/.config/google-chrome/NativeMessagingHosts/_com.my_company.my_application_.json
- Chromium:
~/.config/chromium/NativeMessagingHosts/_com.my_company.my_application_.json
- Google Chrome:
Native messaging protocol
Chrome starts each native messaging host in a separate process and communicates with it using standard input (stdin
) and standard output (stdout
). The same format is used to send messages in both directions: each message is serialized using JSON, UTF-8 encoded and is preceded with 32-bit message length in native byte order. The maximum size of a single message from the native messaging host is 1 MB, mainly to protect Chrome from misbehaving native applications. The maximum size of the message sent to the native messaging host is 4 GB.
The first argument to the native messaging host is the origin of the caller, usually chrome-extension://[ID of allowed extension]
. This allows native messaging hosts to identify the source of the message when multiple extensions are specified in the allowed_origins
key in the native messaging host manifest. Warning: In Windows, in Chrome 54 and earlier, the origin was passed as the second parameter instead of the first parameter.
When a messaging port is created using runtime.connectNative Chrome starts native messaging host process and keeps it running until the port is destroyed. On the other hand, when a message is sent using runtime.sendNativeMessage, without creating a messaging port, Chrome starts a new native messaging host process for each message. In that case the first message generated by the host process is handled as a response to the original request, i.e. Chrome will pass it to the response callback specified when runtime.sendNativeMessage is called. All other messages generated by the native messaging host in that case are ignored.
On Windows, the native messaging host is also passed a command line argument with a handle to the calling Chrome native window: --parent-window=<decimal handle value>
. This lets the native messaging host create native UI windows that are correctly parented. Note that this value will be 0 if the calling context is a background script page.
Connecting to a native application
Sending and receiving messages to and from a native application is very similar to cross-extension messaging. The main difference is that runtime.connectNative is used instead of runtime.connect, and runtime.sendNativeMessage is used instead of runtime.sendMessage. These methods can only be used if the «nativeMessaging» permission is declared in your app’s manifest file.
The Following example creates a runtime.Port object that’s connected to native messaging host com.my_company.my_application
, starts listening for messages from that port and sends one outgoing message:
var port = chrome.runtime.connectNative('com.my_company.my_application');
port.onMessage.addListener(function(msg) {
console.log("Received" + msg);
});
port.onDisconnect.addListener(function() {
console.log("Disconnected");
});
port.postMessage({ text: "Hello, my_application" });
runtime.sendNativeMessage can be used to send a message to native application without creating a port, e.g.:
chrome.runtime.sendNativeMessage('com.my_company.my_application',
{ text: "Hello" },
function(response) {
console.log("Received " + response);
});
Debugging native messaging
When the native messaging host fails to start, writes to stderr
or when it violates the communication protocol, output is written to the error log of Chrome. On Linux and OS X, this log can easily be accessed by starting Chrome from the command line and watching its output in the terminal. On Windows, use --enable-logging
as explained at How to enable logging.
Here are some errors and tips for solving the issues:
- Failed to start native messaging host.
- Check whether you have sufficient permissions to execute the file.
- Invalid native messaging host name specified.
- Check whether the name contains any invalid characters. Only lowercase alphanumeric characters, underscores and dots are allowed. A name cannot start or end with a dot, and a dot cannot be followed by another dot.
- Native host has exited.
- The pipe to the native messaging host was broken before the message was read by Chrome. This is most likely initiated from your native messaging host.
- Specified native messaging host not found.
- Is the name spelled correctly in the extension and in the manifest file?
- Is the manifest put in the right directory and with the correct name? See native messaging host location for the expected formats.
- Is the manifest file in the correct format? In particular, is the JSON syntax correct and do the values match the definition of a native messaging host manifest?
- Does the file specified in
path
exist? On Windows, paths may be relative, but on OS X and Linux, the paths must be absolute.
- Native messaging host host name is not registered. (Windows-only)
- The native messaging host was not found in the Windows registry. Double-check using
regedit
whether the key was really created and matches the required format as documented at native messaging host location.
- The native messaging host was not found in the Windows registry. Double-check using
- Access to the specified native messaging host is forbidden.
- Is the extension’s origin listed in
allowed_origins
?
- Is the extension’s origin listed in
- Error when communicating with the native messaging host.
- This is a very common error and indicates an incorrect implementation of the communication protocol in the native messaging host.
- Make sure that all output in
stdout
adheres to the native messaging protocol. If you want to print some data for debugging purposes, write tostderr
. - Make sure that the 32-bit message length is in the platform’s native integer format (little-endian / big-endian).
- The message length must not exceed 1024*1024.
- The message size must be equal to the number of bytes in the message. This may differ from the «length» of a string, because characters may be represented by multiple bytes.
- Windows-only: Make sure that the program’s I/O mode is set to
O_BINARY
. By default, the I/O mode isO_TEXT
, which corrupts the message format as line breaks (n
=0A
) are replaced with Windows-style line endings (rn
=0D 0A
). The I/O mode can be set using__setmode
.
- Make sure that all output in
- This is a very common error and indicates an incorrect implementation of the communication protocol in the native messaging host.
beholder |
|
Статус: Новичок Группы: Участники
|
Окружение:
Что делаю:
Не понимаю в чем проблема, помогите плиз. Сделал лог установки на всякий случай, хотя установка прошла успешно. Здесь Отредактировано пользователем 16 июля 2015 г. 14:49:39(UTC) |
|
|
beholder |
|
Статус: Новичок Группы: Участники
|
Здравствуйте. Есть ли у кого-нибудь какие-нибудь мысли по этому поводу? |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
http://www.cryptopro.ru/…des/demopage/simple.html |
Техническую поддержку оказываем тут. |
|
|
|
beholder |
|
Статус: Новичок Группы: Участники
|
Да, спасибо. Понял свою ошибку. Код:
который никак не обрабатывает сообщение с типом type: «init» Отредактировано пользователем 22 июля 2015 г. 14:54:40(UTC) |
|
|
beholder |
|
Статус: Новичок Группы: Участники
|
Покопался еще. Код:
Google подсказывает, что для работы через native messaging host необходимо этот хост зарегистрировать в системе используя специальный manifest file |
|
|
beholder |
|
Статус: Новичок Группы: Участники
|
Похоже у вас сломался инсталятор. Поставил версию плагина 2.0.2051, и тестовая страничка заработала. |
|
|
paradoxm |
|
Статус: Активный участник Группы: Участники Сказал «Спасибо»: 1 раз |
Недавно обновили расширение для хрома на 1.0.7, а так же поменяли код работы с плагином. Вроде все поправил у себя На нашем сайте отображает и версию плагина и что он установлен Но получаю ошибку в консоль браузера Uncaught TypeError: g_resolve_function[event.data.data.requestid] is not a function Подскажите куда копать? Где чего не дописал? Сейчас попробовал вставить полностью ваш код с демо страницы и все равно такая ошибка валится. Отредактировано пользователем 21 августа 2015 г. 23:52:51(UTC) |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
Таких сообщений не видел, можете сделать тестовую страницу что бы это воспроизвести? На нашей тестовой странице тоже такие ошибки идут? |
Техническую поддержку оказываем тут. |
|
|
|
paradoxm |
|
Статус: Активный участник Группы: Участники Сказал «Спасибо»: 1 раз |
На вашей странице таких сообщений нет. Не могу найти причину (((. Сделать тестовую страницу? Что вы имеете ввиду? |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
Сделать страницу test.html что бы можно было ее открыть в chrome и посмотреть на эту ошибку. |
Техническую поддержку оказываем тут. |
|
|
|
Пользователи, просматривающие эту тему |
Guest |
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
Статистическая отчетность в электронном виде
1. Отправка заявки на получение доступа к личному кабинету
а) Если организация ранее уже отчитывалась в Росстат (например, на бумажных носителях)
* В этом случае при попытке регистрации появляется ошибка: «Организация c ОКПО … уже зарегистрирована в системе. Воспользуйтесь функцией восстановления пароля для входа в приложение».
Необходимо направить электронным письмом запрос для восстановления пароля по адресу P29_FatenkovaYV@gks.ru. В письме указать ОКПО организации (ОКПО используется в качестве логина), а также прикрепить сертификат открытого ключа электронной подписи в .zip архиве (инструкция как извлечь сертификат из контейнера). В ответном письме будет выслан пароль для доступа в личный кабинет. Запросы без прикрепленного сертификата и ОКПО организации не рассматриваются. Пароль к учетной записи высылается по e-mail после получения корректно составленного запроса, по телефону пароли не сообщаются.
б) Для новых организаций
Требуется пройти первичную регистрацию в системе (ссылка)
2. Настройка браузера для работы с электронной подписью
* Требуется наличие на компьютере пользователя программы КриптоПро CSP
* Для работы с личным кабинетом в операционной системе Windows XP рекомендуется использовать браузер Mozilla Firefox ESR 52.9.0 (ссылка)
2.1 Установка Компоненты формирования ЭП для ЕССО (ссылка)
2.2 Установка расширения Croc XML Signer в браузере:
а) для Google Chrome и Яндекс.Браузер (ссылка)
б) для Mozilla Firefox (ссылка)
3. Установка Microsoft .NET Framework:
а) Для Windows XP (ссылка)
б) Для Windows 7 (ссылка)
в) Windows 8 и выше (ссылка)
4. Установка пакета Visual C++ 2015 (если при подписании отчета возникает ошибка «Specified native messaging host not found») (ссылка)
5. Установка корневых сертификатов в список доверенных (если используется ОС Windows XP) (ссылка)
6. Вход в личный кабинет респондента со своим ОКПО и паролем (ссылка)
Рекомендуется ознакомиться с Руководством пользователя на ON-line модуль подготовки отчетов-ЭВФ (ссылка).
* Для подписания отчетов требуется загрузить сертификат открытого ключа электронной подписи в разделе «Профиль — Сертификаты» (инструкция как извлечь сертификат из контейнера), в противном случае при попытке подписать отчет будет появляться ошибка «Не найдены действительные сертификаты организации по отпечатку…»
Архангельскстат осуществляет прием отчетов от организаций в форме электронного документа и предлагает Вам предоставлять формы в электронном виде через систему Web-сбора. Для этого необходимо иметь персональный компьютер, доступ в Интернет, электронно-цифровую подпись (ЭП) и средства криптографической защиты информации (СКЗИ).
Система Web-сбора позволяет предоставлять статистическую отчетность в электронном виде следующими способами:
- режим ON-line: заполнение и сдача отчетности выполняется через веб-браузер на сайте Системы сбора отчетности;
- режим OFF-line: необходима установка программного обеспечения «Заполнение форм статистической отчетности» на компьютере респондента, позволяющего заполнять, подписывать и направлять отчеты в Систему сбора отчетности;
- через электронную почту по адресу: websbor-report@gks.ru, подписав отчет в XML-формате электронной подписью.
Для работы с системой Web-сбора необходимо заполнить заявку на регистрацию в системе, прикрепив к ней сертификат открытого ключа (инструкция как извлечь сертификат из контейнера). Перед отправкой заявки на регистрацию рекомендуется ознакомиться со следующими документами:
- Руководство пользователя на ON-line модуль подготовки отчетов-ЭВФ — информация о требованиях к программно-аппаратному обеспечению, настройке интернет-браузеров и о работе в системе Web-сбора.
- Руководство пользователя на OFF-line модуль подготовки отчетов-ЭВФ — информация о требованиях к программно-аппаратному обеспечению, настройке интернет-браузеров, установке программного обеспечения и о работе с OFF-line модулем подготовки отчетов.
Для передачи отчетности с применением электронной подписи на рабочем месте пользователя должны быть установлены средства криптографической защиты информации (например, КриптоПро CSP) и квалифицированный сертификат электронной подписи (см. раздел «Программное обеспечение для работы с системой Web-сбора»).
Архангельскстат принимает электронные документы, подписанные электронной подписью, выданной одним из удостоверяющих центров, входящим в сеть доверенных удостоверяющих центров Росстата (список УЦ, аккредитованных в сети доверенных УЦ Росстата)
Управление Федеральной службы государственной статистики по Архангельской области и Ненецкому автономному округу (Архангельскстат) осуществляет сбор статистической и бухгалтерской отчетности в электронном виде через специализированных операторов связи.
Для перехода на предоставление статистической и годовой бухгалтерской отчетности в электронном виде через спецоператора необходимо:
— ознакомиться с Порядком организации обработки первичных статистических данных по формам федерального статистического наблюдения, поступивших от респондентов в электронном виде по телекоммуникационным каналам связи;
— заполнить заявку.
Архангельскстат заключил соглашения о совместных действиях по организации и функционированию системы предоставления статистической и годовой бухгалтерской отчетности в электронном виде со специализированными операторами связи, предоставляющими услуги защищенного электронного документооборота на территории Архангельской области и Ненецкого автономного округа со следующими спецоператорами.
- ООО «Компания «Тензор»
Адрес: 163000, г. Архангельск ул. Свободы, д. 29, офис 32
Телефон: (8182) 42-21-72, (8182) 42-21-70
E-mail: info@arhangelsk.tensor.ru
Сайт: http://www.tensor.ru/ - ООО «Эксперт-Центр» (партнёр компании Тензор в Архангельской обл.)
Адрес: г. Архангельск, пр. Обводный канал, д.119, 4-й этаж
Телефон: (8182) 21-21-30, 21-21-75
E-mail: nalog@expertc.ru
Сайт: http://www.expertc.ru/ - АО «ЦентрИнформ»
Адрес: 191123, а/я 149, г. Санкт-Петербург, ул. Шпалерная, д. 26; г. Санкт-Петербург, ул. Комсомола, 1-3, литера АС
Телефон/Факс: (812) 740-54-05, (812) 740-36-51
E-mail: info@center-inform.ru
Сайт: https://www.center-inform.ruОфициальный представитель в Архангельской области и Ненецком автономном округе
ООО «Штурман ИТ»
Адрес: 163001, г. Архангельск, а/я 249, ул. Шубина, д. 32, оф. 417.
Телефон: (8182) 60-86-00 (многоканальный), 46-02-44
E-mail: help@shturman-it.ru
Сайт: http://www.shturman-it.ru/ - OOO «Такском»
Адрес: г. Москва, 127051, ул. Садовая-Самотечная, д. 12, корп. 1
Телефон/Факс: (495) 730-73-45
E-mail: service@taxcom.ru
Сайт: http://taxcom.ruОфициальные представители в Архангельской области и Ненецком автономном округе
ООО «ФальконПлюс»
Адрес: 163002, г. Архангельск, ул. Вельская, д. 1
Телефон/Факс: (8182) 63-60-85, 68-51-42, 68-43-90
E-mail: office@falconplus.ru
Сайт: http://falconplus.ru/eoks/ИП Гудин Владимир Николаевич
Адрес: 163512, Архангельская обл., Приморский р-н, п. Васьково, 74-29.
Телефон: (909) 555-68-07, (921) 720-62-07
E-mail: 206207@mail.ru - ОП ООО «Русь-Телеком»
Адрес: 214019, г. Смоленск, проезд Маршала Конева, д. 29
Телефон/факс: 8(4812) 65-32-42, 8(4812) 65-78-96
E-mail: info@rus-telecom.ru
Сайт: http://www.rus-telecom.ruОфициальный представитель в Архангельской области и Ненецком автономном округе
ИП Чемерис Константин Эдуардович
Адрес: 163002, г. Архангельск, пр. Ленинградский, д. 3, корп. 1 (1 этаж)
Телефон: (8182) 46-09-32
Факс: (8182) 68-39-40
E-mail: info@ivex29.ru, chemeris@ivex29.ru - ООО «КОРУС Консалтинг СНГ»
Адрес: 194100, г. Санкт-Петербург, Большой Сампсониевский пр., д. 68, лит. Н, пом. 1Н
Телефон/факс: (812) 334-38-12, 8-800-100-8-812 (бесплатно по России)
E-mail: sales@esphere.ru, help@esphere.ru
Сайт: https://www.esphere.ru/ - OOO «АРГОС»
Адрес: 196191, г. Санкт-Петербург, Ленинский пр., д. 168, офис 302
Телефон/факс: (812) 610-5-610
E-mail: e-nalog@argosgrp.ru, support@argosgrp.ru
Сайт: http://www.argos-nalog.ru/ОП OOO «АРГОС» г. Москва
Адрес: г. Москва, Переведеновкий пер. д. 18 корп.6.
Телефон: (495) 640-88-98
E-mail: msk@argosgrp.ru
Сайт: http://msk.argos-nalog.ru - OOO «Электронный экспресс»
Адрес: 119991, г. Москва, Ленинские горы, д. 1, стр. 77, Центр информационных технологий МГУ
Телефон/факс: (495) 647-98-99, 8-800-333-88-88 (бесплатно даже для мобильных)
E-mail: ee@garant.ru
Сайт: http://www.garantexpress.ru/ - ЗАО «Калуга Астрал»
Адрес: 248600, г. Калуга ул. Циолковского, д. 4
Телефон: (4842) 78-89-99, (812) 309-29-23, 8 (800) 700-86-68
E-mail: client@astralnalog.ru
Сайт: http://astralnalog.ru/ - АО «УДОСТОВЕРЯЮЩИЙ ЦЕНТР»
Адрес: 195112, г. Санкт-Петербург, Малоохтинский пр., д. 68
Телефон:
E-mail: 5780196@nwudc.ru
Сайт: http://www.nwudc.ru/ОП ЗАО «УДОСТОВЕРЯЮЩИЙ ЦЕНТР» г. Москва
Адрес: 107078, Москва, ул. Каланчевская 15А, 4 эт.
Телефон/Факс: (495) 783-15-25
E-mail: 7831525@comita.ru
Сайт: http://www.nwudc.ru/moscow - ОАО «ИнфоТеКС Интернет Траст»
Адрес: г. Москва, Старый Петровско-Разумовский проезд, д. 1/23, стр. 1
Телефон: (495) 737-93-72, (495) 737-93-72
E-mail: 77@iitrust.ru
Сайт: https://iitrust.ru/ - ЗАО «ТаксНет»
Адрес: 420021, г. Казань, ул. К.Насыри, д. 28
Телефон: (843) 231-92-00
Факс: (843) 231-92-01
E-mail: office@taxnet.ru
Сайт: https://taxnet.ru/ - Удостоверяющий центр «БЕЛИНФОНАЛОГ»
Адрес: 308007, г. Белгород, ул. Мичурина, д. 48Б, 2-й этаж
Телефон: (4722) 232-702
Факс: (4722) 31-76-07
E-mail: client@belinfonalog.ru
Сайт: http://www.belinfonalog.ru - ООО «Мостинфо-Екатеринбург» (ООО «МОСТИНФО»)
Адрес: 620075, Свердловская область, г. Екатеринбург, ул. Первомайская, д.15, офис 1205
Телефон: (343) 287-04-67
Факс: (343) 287-11-15
E-mail: info@most-info.ru
Сайт: http://most-info.ru - АО «ГНИВЦ»
Адрес: 125373, г. Москва, Походный проезд, домовладение 3, стр.1
Телефон: (495) 913-02-24, (495) 913-07-15
E-mail: info@gnivc.ru
Сайт: https://www.gnivc.ru - ООО «НТСсофт»
Адрес: 620062, Екатеринбург, ул.Чебышева, 4, оф. 308
Телефон: (343) 375-77-50, 8 800 333-22-05
E-mail: sales@ents.ru
Сайт: https://www.ntssoft.ru
Архангельскстат не несет ответственности за взаимодействие отчитывающихся субъектов и спецоператора, не оказывает консультации по работе с программно-техническими средствами спецоператора, используемыми на стороне отчитывающихся субъектов.
Руководство пользователя на ON-line модуль подготовки отчетов-ЭВФ
8.73 Мб, 31.03.2021
Руководство пользователя на OFF-line модуль подготовки отчетов-ЭВФ.pdf
5.86 Мб, 31.03.2021
Инструкция по извлечению сертификата электронной подписи из контейнера
725.38 Кб, 31.03.2021
Приказ Росстата от 27.10.2010 №370 «Об утверждении Порядка организации обработки первичных статистических данных по формам федерального статистического наблюдения, поступивших от респондентов в электронном виде по телекоммуникационным каналам связи»
22.75 Кб, 08.10.2018
Приказ Росстата от 28.10.2010 №372 «Об утверждении Унифицированного формата электронных версий форм статистической отчетности»
58.43 Кб, 08.10.2018
Приказ Росстата от 07.07.2011 №313 «Об утверждении Унифицированного формата транспортного сообщения при обмене электронными документами между территориальными органами Росстата и респондентами»
76.24 Кб, 08.10.2018
Федеральный закон от 06.04.2011 № 63-ФЗ «Об электронной подписи»
08.10.2018
Федеральный закон от 27.07.2006 № 149-ФЗ «Об информации, информационных технологиях и о защите информации»
08.10.2018
Консультации по вопросам предоставления отчетности, шаблонам, протоколам, срокам сдачи, уточнение данных для регистрации в системе:
тел. (8182) 63-50-13, доб. 420 или доб. 421 — Отдел государственной статистики
Информация по классификаторам (ОКОПФ, ОКТМО, ОКАТО, ОКФС, ОКВЭД) по телефону:
тел. (8182) 63-50-54, доб. 443 или на сайте
По вопросам обработки заявок на регистрацию в системе обращаться по телефону: (8182) 63-50-05 доб. 232 или доб. 487 — Отдел статистики предприятий, региональных счетов, ведения Статистического регистра и общероссийских классификаторов
Консультации только по техническим вопросам:
тел. (8182) 63-50-56, доб. 437 или P29_FatenkovaYV@gks.ru — Отдел информационных ресурсов и технологий
ФОРУМ ВЗАИМОДЕЙСТВИЯ С РЕСПОНДЕНТАМИ ПО ВОПРОСАМ ПРЕДОСТАВЛЕНИЯ СТАТИСТИЧЕСКОЙ ОТЧЕТНОСТИ В ЭЛЕКТРОННОМ ВИДЕ
Архангельскстат не оказывает консультации по работе с программно-техническими средствами спецоператора, используемыми на стороне отчитывающихся субъектов.
Согласно документам Chrome Native Messaging успешный вызов connectNative() возвращает порт, с помощью которого вы можете отправлять сообщения в собственное приложение (приложение Mac). В моем случае nativeConnect() возвращает верный порт в моем случае, но вызов onDisconnected() прослушивателя запускается почти сразу. Всякий раз, когда слушатель запускается, он выводит свойство «lastError» на консоль браузера, и это дает:
Specified native messaging host not found.
Почему он это делает? Слушатель, создающий msg, выглядит так:
function onDisconnected() {
console.log("Inside onDisconnected(): " + chrome.runtime.lastError.message);
port = null;
}
Там весь раздел об этой конкретной ошибке в нижней части документации (Native Messaging), и предлагаемые средства защиты говорят, что либо файл манифеста назван, помещен или определен (JSON) некорректно, либо хост-приложение не названо или не расположено где манифест говорит, что это должно быть. Документ говорит, что connectNative() будет «запускать хост в отдельном процессе», но Activity Monitor не дает никаких доказательств того, что приложение для основного хоста было запущено.
Я вызываю connectNative() следующим образом:
chrome.runtime.onMessageExternal.addListener(
function(request, sender, sendResponse) {
//var imgdata = JSON.stringify(request.imgdata);
//process it somehow here
port = chrome.runtime.connectNative("com.allinlearning.nmhforbrowserextension");
if (port)
{
console.log("connectNative() returned a non-null port");
port.onMessage.addListener(onNativeMessage);
port.onDisconnect.addListener(onDisconnected);
}
});
Мой файл манифеста моего хозяина находится в правильной папке в соответствии с документами, отлично разбирается как JSON и выглядит так:
{
"name": "com.allinlearning.nmhforbrowserextension",
"description": "Manifest for native messaging host for Google browser extension",
"path": "/Users/mycomputer1/Documents/nmhost.app",
"type": "stdio",
"allowed_origins": ["chrome-extension://gldheanjpgopipommeingjlnoiamdfol/"]
}
Для расширения Chrome требуется также манифест, и пока я не получу раздел прав доступа, мне не удалось получить ненулевой порт обратно из connectNative(), поэтому я уверен, что теперь это правильно:
"permissions": [
"nativeMessaging",
"tabs",
"activeTab",
"background",
"http://*/", "https://*/"
]
ОБНОВИТЬ:
Выяснилось, как запустить браузер Chrome с терминала Mac с помощью флагов, позволяющих просматривать более «подробные» протоколирования. Затем, когда я побежал, я заметил этот вывод:
[21285:38915:1231/164417:ERROR:native_process_launcher.cc(131)] Can't find manifest for native messaging host com.allinlearning.nmhforbrowserextension
Довольно ясно, что он не может найти манифест хозяина, но почему?