Native message communication between UWP application and FIrefox extension
Categories
(WebExtensions :: Compatibility, defect, P2)
Tracking
(Not tracked)
People
(Reporter: choi_vr92, Assigned: robwu)
Details
Attachments
(1 file)
205 bytes,
application/json
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Steps to reproduce:
Windows 10.
- Register manifest for native messaging in registry HCU\Software\Mozilla\NativeMessagingHosts as described in https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging
- UWP application package contains win32 uap3:Extension with EntryPoint="Windows.FullTrustApplication" witch path uses in manifest (C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\NativeHost.exe)
- Start firefox extension. Start UWP application.
Actual results:
Firefox extension couldn't communicate with uwp. (more precisely with win32 app). Looks like firefox doesn't have permissions.
According to ProcessMonitor, Firefox engine successfully parse manifest file and try to start registered in its path win32 application. There are two calls with REPARSE status and nothing going on. If we register manifest and win32 application for native messaging outside 'C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps' directory native messaging set up successfully, except parsing messages issue due PackageFamilyName check (in this case win32 app down't have family identity).
BTW, chrome extension communicates fine with win32 app from UWP package.
Expected results:
- Firefox engine should run win32 app from uwp package.
- uwp app should process Native messages from firefox extension.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Can you please provide a complete example of your manifest file?
Here is a manifest, located in the C:\Users\USERNAME\AppData\Local\Packages\FApp.626177A9E4282_0wysm1pfwxg2e\LocalState\FApp.BrowserRegistrator\com.fapp.firefox.host-manifest.json
Registry path: Computer\HKEY_CURRENT_USER\Software\Mozilla\NativeMessagingHosts\com.fapp.host
Comment 3•6 years ago
|
||
Could you also post the way to generate a simple UWP app that corresponds to your use case, please?
Link to a how-to, or a project zip would probably also work I guess?
I built UWP project allows registering host application communicating with firefox extension via com.fapp.host name.
All sources and appx installer are presenting in App1.zip (granted email access to oneDrive for <email redacted>).
To install UWP just execute ..\App1\WapProjTemplate1\AppPackages\WapProjTemplate1_1.0.2.0_Debug_Test\WapProjTemplate1_1.0.2.0_x86_Debug.appxbundle
If you would have troubles with the appx certificate, follow instructions on https://stackoverflow.com/questions/23812471/installing-appx-without-trusted-certificate
Thank you.
Updated•6 years ago
|
Updated•6 years ago
|
(In reply to Tomislav Jovanovic :zombie from comment #5)
Will take a look later this week.
Hello. Do you have any updates on this issue?
Assignee | ||
Comment 7•6 years ago
|
||
I ran the following steps, but am not even able to find the native messaging manifest and host:
- Extracted your zip file (forwarded by Tom).
- Ran Add-AppDevPackage.ps1 , enabled Developer Mode at settings and imported the certificate to the Trusted People group.
Then I looked for a registry key at HKCU\Software\Mozilla , but it was missing.
I also looked at %USERPROFILE%\AppData\Local\Packages\ and did not find a directory starting with "fapp". I did however find a folder with a seemingly random name that was created around the time that I installed the app. When I looked inside, it did look like part of your application, but there was no native messaging manifest inside.
Please provide the exact steps to reproduce your problem, and attach the necessary files to do so (including: UWP with native messaging host, native messaging manifest, .reg
file with the native messaging host registration in the Windows Registry, and a zip/xpi file with your Firefox add-on (try to have a minimal example).
Comment 8•6 years ago
|
||
(Thanks Rob for investigating)
Closing as incomplete, feel free to reopen if you can provide steps to reproduce.
Assignee | ||
Updated•5 years ago
|
Description
•