Normandy console errors are displayed only when checking the "Show Content Messages" option
Categories
(Firefox :: Normandy Client, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | unaffected |
firefox68 | --- | unaffected |
firefox69 | --- | fix-optional |
firefox70 | --- | fix-optional |
People
(Reporter: ppop, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files, 1 obsolete file)
[Affected Platforms]:
- All Windows
- All Mac
- All Linux
[Affected Versions]:
- Firefox Nightly 69.0a1, Build ID 20190703162038
[Prerequisites]:
- Have access to the delivery console.
- Have 2 active opt-out recipes using the same add-on extension.
- Have a profile that can be targeted by the opt-out recipes.
[Steps to reproduce]:
- Open the browser with the profile from prerequisites.
- Open the browser console and observe the console output.
[Expected result]:
- The "Cannot install study add-on for <experiment name>: an add-on with this ID is already installed." error is displayed.
[Actual result]:
- No errors are displayed in the console.
[Regression Window]:
- I could not reproduce this issue using the Firefox Nightly build from 2019-06-15, after running a regression check using mozregression it seems that the issue was caused by one of the bugs from the following pushlog:
Last good revision: 51d26396dfafa7b5f45acc6c8c5f1dcf93bec486
First bad revision: 480fa12d68154837011c9a597f4848722ab9b805
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=51d26396dfafa7b5f45acc6c8c5f1dcf93bec486&tochange=480fa12d68154837011c9a597f4848722ab9b805 - After talking with mythmon it appears that the issue was introduced by bug 1544864.
[Notes]:
- This issue is reproducible with all the console errors.
- The console errors are redisplayed when the "Show Content Messages" checkbox is ticked.
- I have attached a screen recording of the issue:
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Nicolas, can you shed any light on why messages like this one are only seen when "Show Content Messages" is checked?
Updated•5 years ago
|
Comment 2•5 years ago
|
||
We have a new-ish mechanism to flag console messages from "Chrome", which enable us to filter out what we consider "content" messages when the checkbox is unchecked.
Unfortunately we have some false negative when setting this flag (we already fixed a couple regressions in regard to this).
Comment 3•5 years ago
•
|
||
Shorter STR:
- Open the Browser Console
- Make sure the
Show Content Messages
checkbox is unchecked - Evaluate the following
var { LogManager } = ChromeUtils.import("resource://normandy/lib/LogManager.jsm");
var log = LogManager.getLogger("recipe-runner");
log.warn("this is a warning");
log.error("this is an error");
Expected result:
Both the warning and the error message are displayed in the browser console output
Actual result:
Only the warning message is displayed. The error message only appears when the Show Content Messages
checkbox is checked
Comment 4•5 years ago
|
||
When calling log.error
, we end up calling this toolkit/modules/Log.jsm#718-728, which has a different behaviour depending on the log level.
For errors, it calls Cu.reportError
, which we know don't flag chrome messages as it should (see Bug 1561930).
This bug will probably be fixed when 1561930 lands.
Am I correct Eden?
Also, this looks like this part was temporary and should directly log things to the browser console (FIXME comment was added in 2014), I may look briefly into this to not be blocked by 1561930.
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Attached patch fixed STR from Comment 3.
Michael, could you give it a try and report back here if you see any issue remaining?
Comment 7•5 years ago
|
||
I think this should handle all the issues, but I'd like Patriciu to take a look instead. Do you have a try build that he could test with?
Comment 8•5 years ago
|
||
sure: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2b98df53ecfab17c911bae43a8880be51784790 (looks like there are tests failing, I'll have a look)
Comment 9•5 years ago
|
||
Patriciu, can you see if this problem is reproducible in the build linked to from comment 8?
Reporter | ||
Comment 10•5 years ago
|
||
Sure thing! Following the steps from comment 3 both of the warnings are displayed as expected, however the normandy console errors are still not displayed unless the "Show Content Messages" checkbox is checked. I retested the behavior using the build provided in comment 8 on Windows 10 x64, Ubuntu 18.04 and macOS 10.14.
Comment 11•5 years ago
|
||
Yes, the Cu.reportError should be fixed by bug 1561930.
Comment 12•5 years ago
|
||
Patriciu, could you check that the problem is fixed in today's Nightly since 1561930 landed?
Thanks!
Updated•5 years ago
|
Reporter | ||
Comment 13•5 years ago
|
||
I retested the issue and it is still reproducible. After following the steps from comment 3 only the warning message is displayed and the error appears when the "Show Content Messages" checkbox is checked.
However the normandy console errors are still not displayed unless the "Show Content Messages" option is checked. Tested using the latest Firefox Nightly build (Version 70.0a1, Build ID 20190718215316) on Windows 10 x64, Ubuntu 18.04 and macOS 10.14.
Comment 14•5 years ago
|
||
The priority flag is not set for this bug.
:mythmon, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 15•5 years ago
|
||
I tested with today's nightly build by the steps in comment 3. And the result is attached.
It seems that warning and error messages are shown on the browser console. And I think this is the expected behavior.
Nicolas, could you help to check if it is correct?
Comment 16•5 years ago
|
||
Nicolas, could you help to check if it is correct?
Yes, for me STR from comment 3 is fixed, but we might have other issues, I'll try to debug them.
Patriciu, I don't understand the following
[Prerequisites]:
Have access to the delivery console.
Have 2 active opt-out recipes using the same add-on extension.
Have a profile that can be targeted by the opt-out recipes.
Could you tell me specifically how I do that? Thanks
Updated•5 years ago
|
Reporter | ||
Comment 17•5 years ago
|
||
Sure thing! In order to receive Normandy recipes from the stage server there are several preferences that need to be changed. I already prepared the recipes and attached a user.js file, so you should be able to reproduce the issue following these steps:
- Open a new browser profile and navigate to the about:support page.
- Click the "Open Folder" button from the "Profile Folder" section.
- Add the attached user.js file in the folder and restart the browser.
- Open the browser console and observe the output.
Expected:
- The "Cannot install study add-on for <study name>: an add-on with this ID is already installed." error is displayed.
Actual:
- The "Cannot install study add-on for <study name>: an add-on with this ID is already installed." is displayed only after checking the "Show Content Messages" checkbox.
Also there is a chance you will encounter bug 1568770 and see the associated console errors.
Comment 18•5 years ago
|
||
Thanks a lot Patriciu!
So here's the packet we get from the server:
{
"errorMessage": "Cannot install study add-on for Cookeh: an add-on with this ID is already installed.",
"errorMessageName": "",
"sourceName": "resource://normandy/actions/BranchedAddonStudyAction.jsm",
"sourceId": null,
"lineText": "",
"lineNumber": 68,
"columnNumber": 0,
"category": "XPConnect JavaScript",
"innerWindowID": 0,
"timeStamp": 1564047954439,
"warning": false,
"error": false,
"exception": false,
"strict": false,
"info": false,
"private": false,
"stacktrace": [
{
"filename": "resource://normandy/actions/BranchedAddonStudyAction.jsm",
"sourceId": null,
"lineNumber": 68,
"columnNumber": 5,
"functionName": "AddonStudyEnrollError"
},
{
"filename": "resource://normandy/actions/BranchedAddonStudyAction.jsm",
"sourceId": null,
"lineNumber": 380,
"columnNumber": 13,
"functionName": "enroll/onInstallStarted/<"
},
{
"filename": "resource://gre/modules/AddonManager.jsm",
"sourceId": null,
"lineNumber": 1652,
"columnNumber": 33,
"functionName": "callInstallListeners"
},
{
"filename": "resource://gre/modules/AddonManager.jsm",
"sourceId": null,
"lineNumber": 3532,
"columnNumber": 54,
"functionName": "callInstallListeners"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1982,
"columnNumber": 32,
"functionName": "_callInstallListeners"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1695,
"columnNumber": 15,
"functionName": "startInstall"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1344,
"columnNumber": 14,
"functionName": "install"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 2171,
"columnNumber": 22,
"functionName": "install"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1684,
"columnNumber": 10,
"functionName": "checkForBlockers"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1341,
"columnNumber": 14,
"functionName": "install"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 2171,
"columnNumber": 22,
"functionName": "install"
},
{
"filename": "resource://gre/modules/addons/XPIInstall.jsm",
"sourceId": null,
"lineNumber": 1653,
"columnNumber": 12,
"functionName": "checkPrompt/<"
},
{
"filename": "self-hosted",
"sourceId": null,
"lineNumber": 1300,
"columnNumber": 8,
"functionName": "InterpretGeneratorResume"
},
{
"filename": "self-hosted",
"sourceId": null,
"lineNumber": 839,
"columnNumber": 5,
"functionName": "AsyncFunctionNext"
}
],
"notes": null,
"chromeContext": false,
"cssSelectors": "",
"_type": "PageError"
}
I tried to reproduce with a simpler STR, but firing code from the browser console seems to print an error with the appropriate flag.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Updated•2 years ago
|
Description
•