Attempting to connect to a native host that does not allow messages from content scripts
Categories
(WebExtensions :: General, defect)
Tracking
(firefox-esr68 wontfix, firefox71 wontfix, firefox72 verified, firefox73 verified, firefox74 verified)
People
(Reporter: eynand, Assigned: robwu)
References
(Regression)
Details
(Keywords: regression)
Attachments
(6 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Steps to reproduce:
install a previously (before 68.0) working plugin that uses the managed storage.
Actual results:
Getting an error.
I trucked the error to - _tryPath resource://gre/modules/NativeManifests.jsm:109
The error is - “Attempting to connect to a native host that does not allow messages from content scripts…”
Expected results:
Before 68.0 the extension can access the manged storage.
Comment 1•5 years ago
|
||
Could you please provide exact steps in order to reproduce this bug?
Thanks.
exact steps to reproduce are:
- create a file with content:
"{
"name": "active_eue_enteprise@bmc.com",
"description": "ignored",
"type": "storage",
"data": {
"BeaconReceiverHost": "my_demo_host",
"BeaconReceiverPort": 8444,
"Version" : 11.3
}
}" - name the file "active_eue_enteprise@bmc.com.json".
- create a new registry key "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\active_eue_enteprise@bmc.com"
- in the (Default) String key put the full path to the file created in step 1.
- load the attached extension to Firefox.
- go to any web page
- the error will be visible in the Browser Console.
Comment 4•5 years ago
|
||
Agi, the particular error message is one you added, do you know what would cause this issue?
Comment 7•5 years ago
|
||
Can't reproduce on latest nightly, from the debugger I can see that the manifest is read correctly from the content script.
Comment 8•5 years ago
•
|
||
What platform/steps did try to reproduce with, because I get the error on Windows 10, both beta and latest Nightly?
This definitely looks like a wrong place for that check, as NativeManifests are used both for native messaging, managed storage and pkcs11 modules.
Updated•5 years ago
|
Comment 9•5 years ago
•
|
||
I messed up in editing the manifest registry key, I can't actually reproduce either.
Eynan, can you please test again, preferably with a new profile, and give more details about version of firefox or anything else that might be different with your setup ?
Assignee | ||
Comment 10•5 years ago
|
||
This is definitely a regression by bug 1518843 , based on code inspection.
I've also managed to reproduce, and will attach a test case in the next comment.
Assignee | ||
Comment 11•5 years ago
|
||
str |
The attached zip file has the test extension, and a directory "managed-storage" containing the manifest for the managed storage.
STR:
- Extract
managed-storage/repro@bug1575162.json
from the zip file, and put it in the system-specific location, see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#Manifest_location - Start Firefox and load the extension.
- Visit example.com and open the console.
- Open the global JS console (Ctrl-Shift-J / Cmd-Shift-J).
Expected:
- At step 3: The content of the managed storage should be printed.
- At step 4: There should not be any error.
Actual:
- At step 3: Error: "Managed storage manifest not found"
- At step 4: Attempting to connect to a native host that does not allow messages from content scripts
/usr/lib/mozilla/managed-storage/repro@bug1575162.json
.
Tested with Firefox 70.0.1 on Linux.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 15•5 years ago
|
||
Currently not able to check on Ubuntu -I do not have permission to create or copy folder and files at this moment in the /usr/lib/mozilla/ location.
On Windows 10 with 64-bit I have made use of the MDN Native manifests article.
After having navigated in the registry to HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla I created a Managed Storage Key which contained the repro@bug1575162 Key. The value Name of the last Key has remained default with the Value Data being the path to the managed-storage unzipped folder.
Using the other files in the repro@1575162 folder (the manifest, the background script and the content script files) I created and xpi file which was then loaded into Nightly about:debugging.
After performing steps 2 and 3 from comment 11 the expected results were not obtained. Attached is the screenshot with the console and browser console errors.
On the positive side, I have no longer received the "Managed storage manifest not found" error.
Could it be that the "win error 5" has been received due to some administrative permissions issue?
What about the rest? Is it possible that the registry setup was not performed correctly?
Assignee | ||
Comment 16•5 years ago
|
||
(In reply to Miruna Curtean from comment #15)
Currently not able to check on Ubuntu -I do not have permission to create or copy folder and files at this moment in the /usr/lib/mozilla/ location.
You can also try to reproduce by registering the manifest in a user-specific location (opposed to a system one):
~/.mozilla/managed-storage/repro@bug1575162.json
Could it be that the "win error 5" has been received due to some administrative permissions issue?
"Win error 5" is "ERROR_ACCESS_DENIED". This could happen if the directory or file is not readable, for example if you created the file with admin privileges without granting read access to other users.
Comment 17•5 years ago
|
||
Currently on Windows Pro 10 64-bit on FF 72.0b6 (201912122108430) I've modified registries and added the Manage Storage>repro@1575162 Keys with and modified their Default key value to point towards the extracted zip extension folder of repro@1575162. This was done in turns for both Local_Machine and Current_User sections.
However that did not change the results and then I tried created the keys under the registry created for a mozilla firefox version and that did not work out either.
At this point, after deleting some Mozilla Firefox versions registries I am, in fact, getting the Error: "Managed storage manifest not found" console error and can't seem to manage to change that result with any maneuvering of the key paths.
Another colleague verified the test case from comment 11 on a Windows 10 PC but the results were similar to what I'd obtained in comment 15.
When posing the test scenario it was noted that it was verified on Firefox 70.0.1 on Linux. Could you also check on Windows on FF 72?
Comment 18•5 years ago
|
||
Re-tested on Windows on 72.0.2 (20200117190643), 73.0b10 (20200125104833) and 74.0a1 20200128092639 successfully.
Not receiving the previous browser console errors.
The content of the managed storage is printed as expected.
Marking this as Verified fixed.
Updated•5 years ago
|
Updated•3 years ago
|
Description
•